Skip to content
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

Merged
merged 1 commit into from
May 14, 2024
Merged

Conversation

aaronmondal
Copy link
Member

@aaronmondal aaronmondal commented May 13, 2024

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

Copy link
Member Author

@aaronmondal aaronmondal left a 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)

Copy link
Contributor

@blakehatch blakehatch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

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)

Copy link
Collaborator

@MarcusSorealheis MarcusSorealheis left a 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)

Copy link
Contributor

@adam-singer adam-singer left a 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.

@MarcusSorealheis
Copy link
Collaborator

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.
@aaronmondal aaronmondal changed the title Migrate to Bazel 8 Migrate to Bazelisk May 14, 2024
Copy link
Member Author

@aaronmondal aaronmondal left a 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.

@aaronmondal aaronmondal mentioned this pull request May 14, 2024
8 tasks
@steedmicro steedmicro requested a review from adam-singer May 14, 2024 14:32
Copy link
Member

@allada allada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

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)

Copy link
Member Author

@aaronmondal aaronmondal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-@adam-singer

Dismissed @adam-singer from a discussion.
Reviewable status: :shipit: complete! 2 of 2 LGTMs obtained

@aaronmondal aaronmondal dismissed adam-singer’s stale review May 14, 2024 18:32

Comment was addressed

@aaronmondal aaronmondal merged commit ab46197 into TraceMachina:main May 14, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants