-
Notifications
You must be signed in to change notification settings - Fork 128
Andrewyx/Upgrade Bazel 8 #3459
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
Merged
Andrewyx
merged 91 commits into
UBC-Thunderbots:master
from
Andrewyx:Andrewyx/Upgrade_bazel_8
Sep 16, 2025
Merged
Andrewyx/Upgrade Bazel 8 #3459
Changes from all commits
Commits
Show all changes
91 commits
Select commit
Hold shift + click to select a range
2acb047
init
Andrewyx 2eb6ad6
partial migration
Andrewyx d01e6ba
new bazel upgrade
Andrewyx 136acf4
partial convert
Andrewyx 1335c81
libs
Andrewyx 3ed74a1
workaround on eigen
Lmh-java c921654
changes
Andrewyx 5d8ee06
deduplicate proto lib
Lmh-java e6d7efb
instanity
Andrewyx 8ff5e83
mergeed
Andrewyx 00069ad
chaos
Andrewyx 830ebae
WIP: fix protobuf headers
Lmh-java 4421035
diffs
Andrewyx d19541a
Merge branch 'Andrewyx/Upgrade_bazel_8' of https://github.com/Andrewy…
Andrewyx 3493dc4
working
Andrewyx 6a8a0c3
logging change
Andrewyx 77b2217
use eigen from bcr
Lmh-java 8dc4c04
estop fixed
Andrewyx 7da3528
caching working + offline usage
Andrewyx 7099a81
merged
Andrewyx d1c33e6
minor cleanup
Andrewyx 622a89a
toolchain protoc
Andrewyx f223e95
g3log repo rules
Andrewyx daef692
merged
Andrewyx 93f2639
changes
Andrewyx 841232f
use bazelisk
Andrewyx aa3f8c4
cleanup
Andrewyx 54f0b6b
use bazelisk & cleanup
Andrewyx 0c28b8e
refactored
Andrewyx c33f7d2
merged
Andrewyx edb69c7
rework gen
Andrewyx ebd2c25
removed
Andrewyx aeefc1a
building
Andrewyx 42a21e6
protos compile
Andrewyx 91344ae
Add grpcio-tools to requirements
williamckha 6a05376
almost working
Andrewyx 93f00bb
Merge branch 'Andrewyx/Upgrade_bazel_8' of https://github.com/Andrewy…
Andrewyx 5401e23
building
Andrewyx f03ac53
pathing issues
Andrewyx 7acd718
hacky
Andrewyx 742d4ac
fix g3log
Lmh-java 52511e5
fix cross compile on aarch64
Lmh-java 45cee49
revise util.sh
Lmh-java f381061
fix nanopb pb.h
Lmh-java bc34160
[may revert] fix powerloop tar package
Lmh-java 913e95e
rename generated nanopb files to .nanopb.c and .nanopb.h
Lmh-java 96db9bb
got nanopb to work
Lmh-java 832d5ec
fix aarch64 absolute path issue
Lmh-java 96453c0
fix ci
Lmh-java 3e9a0db
cleanup comments
Lmh-java aa54064
deps fix
Lmh-java 3584f10
remove sensor_msg from src
Lmh-java 2ed63b7
fixes protolibs
Andrewyx 2df37e0
merged
Andrewyx 69f0c63
missing deps
Andrewyx 05f3f4f
debug removed
Andrewyx e17158d
missing deps
Andrewyx f395f0a
missing deps
Andrewyx 9d64a37
deps fixes
Andrewyx 349aeff
linking fixes
Andrewyx ac7a0f8
updated crc
Andrewyx fcee549
proto fixes
Andrewyx 0467d6a
hermit fixes
Andrewyx e726c1d
fix uart test case failure
Lmh-java 7a40c0d
fixes
Andrewyx 266bb51
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] 2cc5abc
fix nanopb constraints
Lmh-java b3e7db0
generalize nanopb options
Lmh-java 3fdcc1d
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] 42fd15b
remove hacky copts
Lmh-java dd6cae9
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] aef0acb
rework buildifier
Lmh-java fba6d39
integrate new buildifier to ci
Lmh-java ef253f7
Merge branch 'master' of https://github.com/UBC-Thunderbots/Software …
williamckha 5c9d219
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] 79e37e7
fixes and changed platformio build upstream
Andrewyx d5185d0
working on robot
Thunderbots 07727ab
address comments
Lmh-java b8f4920
pass ci
Lmh-java 0845115
Merge branch 'master' of https://github.com/UBC-Thunderbots/Software …
Thunderbots 7642f62
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] a1d66cf
Add nanopb requirements to compile_pip_requirements.sh
Thunderbots 682bdea
Merge branch 'Andrewyx/Upgrade_bazel_8' of https://github.com/Andrewy…
Thunderbots 1669768
cleanup
Andrewyx 2e526c6
merged
Andrewyx 521ec25
removed trinamic hacks
Lmh-java c7bdcfc
Merge branch 'Andrewyx/Upgrade_bazel_8' of github.com:Andrewyx/Softwa…
Andrewyx 16a6c85
working on robot, tar broken
Thunderbots 8e60dd2
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] 6a543cb
tar fixes
Andrewyx f97c2e6
partial fix to warnings
Thunderbots File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,3 +10,4 @@ PyOpenGL==3.1.6 | |
| ruff==0.5.5 | ||
| pyqt-toast-notification==1.3.2 | ||
| md-toc==9.0.0 | ||
| grpcio-tools==1.71.0 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,3 +11,4 @@ numpy==1.26.4 | |
| ruff==0.5.5 | ||
| pyqt-toast-notification==1.3.2 | ||
| md-toc==9.0.0 | ||
| grpcio-tools==1.71.0 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,3 +8,4 @@ PyOpenGL==3.1.6 | |
| ruff==0.5.5 | ||
| pyqt-toast-notification==1.3.2 | ||
| md-toc==9.0.0 | ||
| grpcio-tools==1.71.0 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,28 +1,20 @@ | ||
|
|
||
| # We rely on all symbols being included when linking for our implementation of | ||
| # the "factory" design pattern. | ||
| build --incompatible_remove_legacy_whole_archive=False | ||
| ################## Base Bazel Configs ################## | ||
| common --enable_bzlmod | ||
| common --lockfile_mode=update | ||
| common --noincompatible_disallow_empty_glob # Allow globs to be empty without failing | ||
| common --incompatible_disallow_struct_provider_syntax=false | ||
|
|
||
| # We want bazel to output the results of our gtests | ||
| test --test_output=all | ||
|
|
||
| # Use Our Custom Toolchain | ||
| build --crosstool_top=//cc_toolchain:toolchain | ||
|
|
||
| # Add warnings to Thunderbots code only | ||
| build --per_file_copt=//proto/.*,//proto/message_translation/.*,//proto/primitive/.*,//software/.*,//shared/.*@-Wall,-Wextra,-Wconversion,-Wno-unused-parameter,-Wno-deprecated,-Werror,-Wno-deprecated-declarations | ||
| ################## Bazel Debug Configs ################## | ||
|
|
||
| # Warn variable length arrays only when compiling cpp | ||
| build --per_file_copt=.*\.cpp@-Wvla | ||
|
|
||
| # Automatically set the CPU environment based on the `--cpu` flag as per our | ||
| # defined CPU environments | ||
| build --auto_cpu_environment_group=//cc_toolchain:cpus | ||
| # Enable the following commands to debug Bazel. Note that the additional overhead from these commands will | ||
| # cause CI to fail | ||
| # common --verbose_failures | ||
| # common --sandbox_debug | ||
|
|
||
| # Use a local directory as a remote cache. This shares artifacts when switching | ||
| # between git branches or workspaces for the same project. | ||
| # See https://docs.bazel.build/versions/master/remote-caching.html#disk-cache | ||
| build --disk_cache=~/.cache/thunderbots_bazel_disk_cache | ||
| ################ Machine Configurations ################ | ||
|
|
||
| # The XDR_RUNTIME_DIR and DISPLAY environment variables must be passed to the tests | ||
| # so that our GUIs can be enabled for simulated tests. This is needed for Qt | ||
|
|
@@ -34,6 +26,54 @@ build --test_env=DISPLAY | |
| build --action_env=PYTHON_BIN_PATH=/opt/tbotspython/bin/python3.12 | ||
| build --action_env=PYTHON_LIB_PATH=/opt/tbotspython/lib/python3.12 | ||
|
|
||
| # Enable the new cc_toolchain resolution strategy | ||
| # #TODO(#3382): Delete when we upgrade to Bazel 7.0 | ||
| build --incompatible_enable_cc_toolchain_resolution | ||
| # Automatically set the CPU environment based on the `--cpu` flag as per our | ||
| # defined CPU environments | ||
| build --auto_cpu_environment_group=//toolchains/cc:cpus | ||
|
|
||
| # Use Our Custom Toolchain | ||
| build --crosstool_top=//toolchains/cc:toolchain | ||
| common --features=external_include_paths | ||
|
|
||
| ################# Build Optimizations ################# | ||
|
|
||
| # Use a local directory as a remote cache. This shares artifacts when switching | ||
| # between git branches or workspaces for the same project. | ||
| # 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 | ||
| build --incompatible_enable_proto_toolchain_resolution # protoc caching | ||
|
|
||
| # Ensure that we don't accidentally build gRPC | ||
| common --per_file_copt=external/.*grpc.*@--GRPC_WAS_NOT_SUPPOSED_TO_BE_BUILT | ||
| common --host_per_file_copt=external/.*grpc.*@--GRPC_WAS_NOT_SUPPOSED_TO_BE_BUILT | ||
|
|
||
| ################# Build Configurations ################# | ||
| # Lock C++ version | ||
| build --cxxopt="-std=c++2a" | ||
| # Warn variable length arrays only when compiling cpp | ||
| build --per_file_copt=.*\.cpp@-Wvla | ||
|
|
||
| # Enable runfiles symlink tree | ||
| build --enable_runfiles | ||
|
|
||
| # Allow usage of platform specific .bazelrc configs (e.g. build:linux, common:windows, etc) | ||
| common --enable_platform_specific_config | ||
|
|
||
| # We rely on all symbols being included when linking for our implementation of | ||
| # the "factory" design pattern. | ||
| build --incompatible_remove_legacy_whole_archive=False | ||
|
|
||
| # Escalate Warnings to fail Compile for Thunderbots code | ||
| build --features=external_include_paths | ||
| build --per_file_copt=proto/.*,proto/message_translation/.*,proto/primitive/.*,software/.*,shared/.*,-external/.*@-Wall,-Wextra,-Wno-unused-parameter,-Wno-deprecated,-Werror,-Wno-deprecated-declarations | ||
| # TODO: #3492 | ||
| # build --per_file_copt=software/.*,shared/.*,-external/.*@-Wconversion | ||
|
|
||
| build --per_file_copt=.*\.pb\.(h|cc|cpp)$@-w | ||
| build --per_file_copt=./external/.*,./bazel-out/.*@-w | ||
|
|
||
| ############## External Deps Compatibility ############## | ||
| build --noincompatible_disallow_ctx_resolve_tools | ||
| build --check_direct_dependencies=off | ||
|
Comment on lines
+77
to
+78
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what do these options do? |
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 5.4.0 | ||
| 8.2.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.