-
Notifications
You must be signed in to change notification settings - Fork 771
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
[bazel] Update Bazel to version 7.3.1 #24392
Conversation
I was too hasty in marking as ready for review. The strange |
4af21d0
to
9d74cd7
Compare
The Some examples of new warnings (which it treats as errors):
|
Wrong target, probably (or more accurately, the wrong configuration). This target triggers errors, for example:
If you compare the subcommands, you'll notice that Edit: Aww, bummer, I thought C23 was finalized already. In that case, for an ISO standard, we still only get sized enums in c++ compilation modes. |
@pamaury and I found the cause of the pedantic errors: Bazel has changed Added a commit which adds We also found that the
To fix this, I have had to bundle the We cannot upgrade |
rules_rust
to 0.47.1
rules_rust
to 0.47.1rules_rust
to 0.49.3
rules_rust
to 0.49.3
Sorry for the spam, we found a simpler way to fix the Rust issue without upgrading the toolchain just yet. |
Hmm, using symlinks doesn't seem to work because I guess I can't think of a way to make this work, so reverting back to the previous implementation. |
ff72e09
to
785543f
Compare
Signed-off-by: James Wainwright <[email protected]>
We were previously taking these from the Bazel repository at the version we were using. This has broken, but Bazel has a documented way of doing this now independent of version: https://bazel.build/run/build#repository_cache_with_bazel_7_or_later Signed-off-by: James Wainwright <[email protected]>
Bazel 7 does not like a rule which outputs a directory _and_ something from that directory's contents. This commit removes the build directory from the outputs and exposes only those requested by `output_groups`. The paths should stay the same. Signed-off-by: James Wainwright <[email protected]>
Signed-off-by: James Wainwright <[email protected]>
Signed-off-by: James Wainwright <[email protected]>
This release includes a fix for Bazel 7 that we need. Signed-off-by: James Wainwright <[email protected]>
When we build our C files for `bindgen` to consume, we use the `host` configuration. The `--features` flag is no longer applied to `host` in Bazel 7, so we must add this extra flag. Signed-off-by: James Wainwright <[email protected]>
Even though we're not using these, Bazel 7 hits errors if we try to run `bazel query deps($something)` on a Rust dependency. Fixed in `rules_rust>=0.38.0`. bazelbuild/rules_rust#1166 (comment) Signed-off-by: James Wainwright <[email protected]>
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.
That's great, thanks a lot @jwnrt for this work!
This is a major version upgrade from Bazel 6.1.1 to Bazel 7.3.1. This is the latest version.
This PR includes a couple of fixes required due to changes between versions:
fusesoc_build
rule no longer outputs the whole of fusesoc's$X.build/
directory, it now only exposes the parts explicitly listed inoutput_groups
. This is required because Bazel 7 does not allow rules to output both a directory and its contents at once.This PR is motivated in part because some of our dependencies (e.g.
rules_rust
) no longer support version 6. Migrating to Bzlmod will also require Bazel 7 since version 6 is missing a couple of features we need.Potential for breakage
CI should pick up any breakages, but we should also check that contributors using non-Ubuntu distributions can still use this new Bazel version.
Contributors using
./bazelisk.sh
should not need to manually install the new Bazel version, it should be installed automatically. Those using a native Bazel will have to update, but Bazel will read the.bazelversion
file and tell them how to do this.