Upgrade to Bazel 9.1.1#3846
Conversation
50140d8 to
c3475e6
Compare
| shell: bash | ||
| run: | | ||
| sudo rm -rf /usr/share/dotnet | ||
| sudo rm -rf /usr/local/lib/android |
There was a problem hiding this comment.
Seems like protobuf now depends on rules_android, which needs the Android SDK
| # See https://docs.bazel.build/versions/master/remote-caching.html#disk-cache | ||
| build --disk_cache=~/.cache/thunderbots_bazel_disk_cache | ||
|
|
||
| build --experimental_remote_merkle_tree_cache # partial repo caching optimization |
There was a problem hiding this comment.
It appears that this option is no longer supported
|
|
||
| build --experimental_remote_merkle_tree_cache # partial repo caching optimization | ||
| common --incompatible_enable_proto_toolchain_resolution # protoc caching | ||
| common --@protobuf//bazel/toolchains:prefer_prebuilt_protoc |
There was a problem hiding this comment.
I'm not sure that the prebuilt binaries will actually work in the nanopb pipeline for compiling the onboard protobufs. This will need to be tested with a real robot to verify, but for some context, this feature is simply the now upstream variant of the alex eagle toolchains protobuf repo. During the Bazel 8 migration, I had attempted to use this optimization (622a89a), but to no avail.
Here is the thread I inquired upon the issue with, but to no response aspect-archives/toolchains_protoc#21
I can't quite recall what exactly didn't work, so it is probably a good idea to test on-robot.
There was a problem hiding this comment.
I think I've got the nanopb pipeline using prebuilt protoc now. bazel cquery deps(//proto:tbots_nanopb_proto) shows the prebuilt binary (@@protobuf++protoc+prebuilt_protoc.linux_x86_64//:bin/protoc) in the build graph instead of @protobuf//:protoc which builds from source.
Description
Upgrades our repo from Bazel 8.2.1 to 9.1.1. I see two advantages to upgrading:
bazel clean,bazel queryworks offline when fuzzy-finding viatbots.py, etc.Testing Done
Resolved Issues
Length Justification and Key Files to Review
Bazel 9 requires explicit
load()statements for rules previously available as built-ins (cc_library, cc_binary, cc_test, py_binary, py_library, etc.). The bulk of this PR is dedicated to adding theseload()statements. Some of our dependencies (googletest, platformio_rules, pybind11_protobuf, hedron_compile_commands) have not been updated yet for Bazel 9 and require patches due to this breaking change.Review Checklist
It is the reviewers responsibility to also make sure every item here has been covered
.hfile) should have a javadoc style comment at the start of them. For examples, see the functions defined inthunderbots/software/geom. Similarly, all classes should have an associated Javadoc comment explaining the purpose of the class.TODO(or similar) statements should either be completed or associated with a github issue