-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate to Bazelisk #912
Migrate to Bazelisk #912
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+@adam-singer +@allada +@blakehatch
Reviewable status: 0 of 3 LGTMs obtained, and pending CI: Analyze (javascript-typescript), Analyze (python), Bazel Dev / ubuntu-22.04, Cargo Dev / macos-13, Cargo Dev / ubuntu-22.04, Local / ubuntu-22.04, Publish image, Publish nativelink-worker-lre-cc, Remote / large-ubuntu-22.04, asan / ubuntu-22.04, docker-compose-compiles-nativelink (20.04), docker-compose-compiles-nativelink (22.04), integration-tests (20.04), integration-tests (22.04), macos-13, pre-commit-checks, ubuntu-20.04 / stable, ubuntu-22.04, ubuntu-22.04 / stable, vale, windows-2022 / stable (waiting on @adam-singer, @allada, and @blakehatch)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 1 of 3 LGTMs obtained, and pending CI: Bazel Dev / ubuntu-22.04, Cargo Dev / macos-13, Cargo Dev / ubuntu-22.04, Remote / large-ubuntu-22.04, asan / ubuntu-22.04, docker-compose-compiles-nativelink (20.04), docker-compose-compiles-nativelink (22.04), macos-13, ubuntu-20.04 / stable, ubuntu-22.04, ubuntu-22.04 / stable, windows-2022 / stable (waiting on @adam-singer and @allada)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is absolutely not something we should rush. We should consider compatibility? It we must also consider our customers. Maybe you can prepare a blog breakdown of everything that changes in 8.
Reviewable status: 1 of 3 LGTMs obtained, and pending CI: Cargo Dev / macos-13, macos-13 (waiting on @adam-singer and @allada)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed all commit messages.
Reviewable status: 1 of 3 LGTMs obtained, and pending CI: macos-13, and 1 discussions need to be resolved (waiting on @allada)
.bazelversion
line 1 at r1 (raw file):
8.0.0-pre.20240422.4
tbh, I don't think we should depend on any pre
tag of bazel unless we get something major from it that we are blocked on.
Please make this a draft PR. |
This commit changes the Nix-side Bazel setup to Bazelisk which decouples the Bazel version from what's available in the nix store. This lets us more freely increment Bazel versions while still providing the correct versions automatically. A nice side effect of this is that we can finally remove the WORKSPACE file. This change has no effect on the Bazel versions that NativeLink supports as clients. This is purely an internal build dependency change.
074c82f
to
a029090
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MarcusSorealheis Technically, this isn't too big of a change, as we haven't used the workspace logic for a long time and IIRC Bazel 8 just flips it off by default. Compatibility-wise it wouldn't have any effect since our production builds are using Nix/Cargo. We only use Bazel as a convenient way to get incremental builds during development, i.e. we can consider it a devtool
dependency.
That said, the thing I'm after with this commit works with Bazel 7 as well (removing the obsolete empty WORKSPACE file), so I set it to 7.1.2
now.
Reviewable status: 1 of 3 LGTMs obtained, and pending CI: Analyze (javascript-typescript), Analyze (python), Bazel Dev / ubuntu-22.04, Cargo Dev / macos-13, Cargo Dev / ubuntu-22.04, Local / ubuntu-22.04, Publish image, Publish nativelink-worker-lre-cc, Remote / large-ubuntu-22.04, asan / ubuntu-22.04, docker-compose-compiles-nativelink (20.04), docker-compose-compiles-nativelink (22.04), integration-tests (20.04), integration-tests (22.04), macos-13, pre-commit-checks, ubuntu-20.04 / stable, ubuntu-22.04, ubuntu-22.04 / stable, vale, windows-2022 / stable, and 1 discussions need to be resolved (waiting on @adam-singer and @allada)
.bazelversion
line 1 at r1 (raw file):
Previously, adam-singer (Adam Singer) wrote…
tbh, I don't think we should depend on any
pre
tag of bazel unless we get something major from it that we are blocked on.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 4 of 5 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: 2 of 3 LGTMs obtained, and 1 discussions need to be resolved (waiting on @adam-singer)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dismissed @adam-singer from a discussion.
Reviewable status:complete! 2 of 2 LGTMs obtained
This commit changes the Nix-side Bazel setup to Bazelisk which decouples the Bazel version from what's available in the nix store.
This lets us more freely increment Bazel versions while still providing the correct versions automatically.
A nice side effect of this is that we can finally remove the WORKSPACE file.
This change has no effect on the Bazel versions that NativeLink supports as clients. This is purely an internal build dependency change.
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)