-
Notifications
You must be signed in to change notification settings - Fork 13
Add load statements after disabling autoloads #391
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
Merged
Conversation
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
Explicitly loads all symbols affected by `--incompatible_disable_autoloads_in_main_repo` to fix `last_green` Bazel builds. Adds the flag to `.bazelrc`, adds `rules_shell` as a dependency, and contains lots of other Buildifier formatting touch ups. bazelbuild/bazel@d87eaf5 from 2025-05-08 at 8:03am EDT flipped `--incompatible_disable_autoloads_in_main_repo` to `true` to prepare for Bazel 9. See also bazel-contrib/rules_scala#1738. Before this change, setting the flag caused these errors: ```txt $ bazel build --incompatible_disable_autoloads_in_main_repo //... ERROR: java/com/engflow/notificationqueue/demoserver/BUILD:5:1: name 'proto_library' is not defined ERROR: /demoserver/BUILD:10:1: name 'java_proto_library' is not defined (did you mean 'java_grpc_library'?) ERROR: docker/network/BUILD:19:10: //docker/network:docker-network-test: no such attribute 'srcs' in 'java_test' rule ERROR: docker/network/BUILD:19:10: //docker/network:docker-network-test: no such attribute 'test_class' in 'java_test' rule ERROR: docker/sandbox/BUILD:15:12: //docker/sandbox:hello-java: no such attribute 'srcs' in 'java_binary' rule ERROR: docker/sandbox/BUILD:15:12: //docker/sandbox:hello-java: no such attribute 'main_class' in 'java_binary' rule ERROR: docker/sysbox/dind_test/BUILD:15:1: name 'sh_test' is not defined (did you mean 'cc_test'?) ERROR: package contains errors: docker/sysbox/dind_test ERROR: python/pytest/BUILD:3:1: name 'py_library' is not defined (did you mean 'cc_library'?) ERROR: package contains errors: docker/sandbox ERROR: package contains errors: java/com/engflow/notificationqueue/demoserver ERROR: docker/network/BUILD:39:13: //docker/network:jdk: no such attribute 'java_home' in 'java_runtime' rule ERROR: package contains errors: docker/network ERROR: package contains errors: python/pytest ERROR: java/com/engflow/example/BUILD:3:13: //java/com/engflow/example:example: no such attribute 'srcs' in 'java_library' rule ERROR: java/com/engflow/example/BUILD:8:10: //java/com/engflow/example:ExampleTest: no such attribute 'srcs' in 'java_test' rule ERROR: java/com/engflow/example/BUILD:8:10: //java/com/engflow/example:ExampleTest: no such attribute 'deps' in 'java_test' rule ERROR: package contains errors: java/com/engflow/example ERROR: java/com/engflow/notificationqueue/BUILD:5:12: //java/com/engflow/notificationqueue:client: no such attribute 'srcs' in 'java_binary' rule ERROR: java/com/engflow/notificationqueue/BUILD:5:12: //java/com/engflow/notificationqueue:client: no such attribute 'main_class' in 'java_binary' rule ERROR: java/com/engflow/notificationqueue/BUILD:5:12: //java/com/engflow/notificationqueue:client: no such attribute 'deps' in 'java_binary' rule ERROR: package contains errors: java/com/engflow/notificationqueue WARNING: Target pattern parsing failed. ERROR: Skipping '//...': Error evaluating '//...': error loading package 'docker/network': Package 'docker/network' contains errors ERROR: Error evaluating '//...': error loading package 'docker/network': Package 'docker/network' contains errors INFO: Elapsed time: 2.821s INFO: 0 processes. ERROR: Build did NOT complete successfully ``` Applied the fixes using Buildifier 8.2.0 with the following script: ```bash WARNINGS=( $(buildifier --lint=warn -r . 2>&1 | grep -- native- | awk '{print $2}' | sort | uniq | sed -e 's/:$//') ) IFS=, WARNINGS="${WARNINGS[*]}" echo "warnings: ${WARNINGS}" buildifier --lint=fix --warnings="$WARNINGS" -r . ```
jayconrod
approved these changes
May 20, 2025
lugehorsam
pushed a commit
that referenced
this pull request
Jun 13, 2025
Explicitly loads all symbols affected by `--incompatible_disable_autoloads_in_main_repo` to fix `last_green` Bazel builds. Adds the flag to `.bazelrc`, adds `rules_shell` as a dependency, and contains lots of other Buildifier formatting touch ups. bazelbuild/bazel@d87eaf5 from 2025-05-08 at 8:03am EDT flipped `--incompatible_disable_autoloads_in_main_repo` to `true` to prepare for Bazel 9. See also bazel-contrib/rules_scala#1738. Before this change, setting the flag caused these errors: ```txt $ bazel build --incompatible_disable_autoloads_in_main_repo //... ERROR: java/com/engflow/notificationqueue/demoserver/BUILD:5:1: name 'proto_library' is not defined ERROR: /demoserver/BUILD:10:1: name 'java_proto_library' is not defined (did you mean 'java_grpc_library'?) ERROR: docker/network/BUILD:19:10: //docker/network:docker-network-test: no such attribute 'srcs' in 'java_test' rule ERROR: docker/network/BUILD:19:10: //docker/network:docker-network-test: no such attribute 'test_class' in 'java_test' rule ERROR: docker/sandbox/BUILD:15:12: //docker/sandbox:hello-java: no such attribute 'srcs' in 'java_binary' rule ERROR: docker/sandbox/BUILD:15:12: //docker/sandbox:hello-java: no such attribute 'main_class' in 'java_binary' rule ERROR: docker/sysbox/dind_test/BUILD:15:1: name 'sh_test' is not defined (did you mean 'cc_test'?) ERROR: package contains errors: docker/sysbox/dind_test ERROR: python/pytest/BUILD:3:1: name 'py_library' is not defined (did you mean 'cc_library'?) ERROR: package contains errors: docker/sandbox ERROR: package contains errors: java/com/engflow/notificationqueue/demoserver ERROR: docker/network/BUILD:39:13: //docker/network:jdk: no such attribute 'java_home' in 'java_runtime' rule ERROR: package contains errors: docker/network ERROR: package contains errors: python/pytest ERROR: java/com/engflow/example/BUILD:3:13: //java/com/engflow/example:example: no such attribute 'srcs' in 'java_library' rule ERROR: java/com/engflow/example/BUILD:8:10: //java/com/engflow/example:ExampleTest: no such attribute 'srcs' in 'java_test' rule ERROR: java/com/engflow/example/BUILD:8:10: //java/com/engflow/example:ExampleTest: no such attribute 'deps' in 'java_test' rule ERROR: package contains errors: java/com/engflow/example ERROR: java/com/engflow/notificationqueue/BUILD:5:12: //java/com/engflow/notificationqueue:client: no such attribute 'srcs' in 'java_binary' rule ERROR: java/com/engflow/notificationqueue/BUILD:5:12: //java/com/engflow/notificationqueue:client: no such attribute 'main_class' in 'java_binary' rule ERROR: java/com/engflow/notificationqueue/BUILD:5:12: //java/com/engflow/notificationqueue:client: no such attribute 'deps' in 'java_binary' rule ERROR: package contains errors: java/com/engflow/notificationqueue WARNING: Target pattern parsing failed. ERROR: Skipping '//...': Error evaluating '//...': error loading package 'docker/network': Package 'docker/network' contains errors ERROR: Error evaluating '//...': error loading package 'docker/network': Package 'docker/network' contains errors INFO: Elapsed time: 2.821s INFO: 0 processes. ERROR: Build did NOT complete successfully ``` Applied the fixes using Buildifier 8.2.0 with the following script: ```bash WARNINGS=( $(buildifier --lint=warn -r . 2>&1 | grep -- native- | awk '{print $2}' | sort | uniq | sed -e 's/:$//') ) IFS=, WARNINGS="${WARNINGS[*]}" echo "warnings: ${WARNINGS}" buildifier --lint=fix --warnings="$WARNINGS" -r . ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Explicitly loads all symbols affected by
--incompatible_disable_autoloads_in_main_repo
to fixlast_green
Bazel builds. Adds the flag to.bazelrc
, addsrules_shell
as a dependency, and contains lots of other Buildifier formatting touch ups.bazelbuild/bazel@d87eaf5 from 2025-05-08 at 8:03am EDT flipped
--incompatible_disable_autoloads_in_main_repo
totrue
to prepare for Bazel 9. See also bazel-contrib/rules_scala#1738.Before this change, setting the flag caused these errors:
$ bazel build --incompatible_disable_autoloads_in_main_repo //... ERROR: java/com/engflow/notificationqueue/demoserver/BUILD:5:1: name 'proto_library' is not defined ERROR: /demoserver/BUILD:10:1: name 'java_proto_library' is not defined (did you mean 'java_grpc_library'?) ERROR: docker/network/BUILD:19:10: //docker/network:docker-network-test: no such attribute 'srcs' in 'java_test' rule ERROR: docker/network/BUILD:19:10: //docker/network:docker-network-test: no such attribute 'test_class' in 'java_test' rule ERROR: docker/sandbox/BUILD:15:12: //docker/sandbox:hello-java: no such attribute 'srcs' in 'java_binary' rule ERROR: docker/sandbox/BUILD:15:12: //docker/sandbox:hello-java: no such attribute 'main_class' in 'java_binary' rule ERROR: docker/sysbox/dind_test/BUILD:15:1: name 'sh_test' is not defined (did you mean 'cc_test'?) ERROR: package contains errors: docker/sysbox/dind_test ERROR: python/pytest/BUILD:3:1: name 'py_library' is not defined (did you mean 'cc_library'?) ERROR: package contains errors: docker/sandbox ERROR: package contains errors: java/com/engflow/notificationqueue/demoserver ERROR: docker/network/BUILD:39:13: //docker/network:jdk: no such attribute 'java_home' in 'java_runtime' rule ERROR: package contains errors: docker/network ERROR: package contains errors: python/pytest ERROR: java/com/engflow/example/BUILD:3:13: //java/com/engflow/example:example: no such attribute 'srcs' in 'java_library' rule ERROR: java/com/engflow/example/BUILD:8:10: //java/com/engflow/example:ExampleTest: no such attribute 'srcs' in 'java_test' rule ERROR: java/com/engflow/example/BUILD:8:10: //java/com/engflow/example:ExampleTest: no such attribute 'deps' in 'java_test' rule ERROR: package contains errors: java/com/engflow/example ERROR: java/com/engflow/notificationqueue/BUILD:5:12: //java/com/engflow/notificationqueue:client: no such attribute 'srcs' in 'java_binary' rule ERROR: java/com/engflow/notificationqueue/BUILD:5:12: //java/com/engflow/notificationqueue:client: no such attribute 'main_class' in 'java_binary' rule ERROR: java/com/engflow/notificationqueue/BUILD:5:12: //java/com/engflow/notificationqueue:client: no such attribute 'deps' in 'java_binary' rule ERROR: package contains errors: java/com/engflow/notificationqueue WARNING: Target pattern parsing failed. ERROR: Skipping '//...': Error evaluating '//...': error loading package 'docker/network': Package 'docker/network' contains errors ERROR: Error evaluating '//...': error loading package 'docker/network': Package 'docker/network' contains errors INFO: Elapsed time: 2.821s INFO: 0 processes. ERROR: Build did NOT complete successfully
Applied the fixes using Buildifier 8.2.0 with the following script: