$ bazel build //...
Starting local Bazel server and connecting to it...
INFO: Invocation ID: 94b17434-9dc8-4f06-8612-54cdc65e5c92
WARNING: WORKSPACE support will be removed in Bazel 9 (late 2025), please migrate to Bzlmod, see https://bazel.build/external/migration.
WARNING: Couldn't auto load rules or symbols, because no dependency on module/repository 'protobuf' found. This will result in a failure if there's a reference to those rules or symbols.
WARNING: Couldn't auto load rules or symbols, because no dependency on module/repository 'rules_android' found. This will result in a failure if there's a reference to those rules or symbols.
WARNING: Couldn't auto load rules or symbols, because no dependency on module/repository 'rules_java' found. This will result in a failure if there's a reference to those rules or symbols.
WARNING: Couldn't auto load rules or symbols, because no dependency on module/repository 'rules_python' found. This will result in a failure if there's a reference to those rules or symbols.
WARNING: Couldn't auto load rules or symbols, because no dependency on module/repository 'rules_shell' found. This will result in a failure if there's a reference to those rules or symbols.
ERROR: /home/user/opt/bazel-scala-example/example-lib/BUILD:13:13: //example-lib:hello-world: no such attribute 'srcs' in 'java_library' rule
ERROR: /home/user/opt/bazel-scala-example/example-lib/BUILD:18:10: //example-lib:java_test: no such attribute 'test_class' in 'java_test' rule
ERROR: /home/user/opt/bazel-scala-example/example-lib/BUILD:18:10: //example-lib:java_test: no such attribute 'srcs' in 'java_test' rule
ERROR: /home/user/opt/bazel-scala-example/example-lib/BUILD:18:10: //example-lib:java_test: no such attribute 'deps' in 'java_test' rule
ERROR: package contains errors: example-lib
ERROR: package contains errors: example-lib: //example-lib:hello-world: no such attribute 'srcs' in 'java_library' rule
WARNING: Target pattern parsing failed.
ERROR: Skipping '//...': Error evaluating '//...': error loading package 'example-lib': Package 'example-lib' contains errors
ERROR: Error evaluating '//...': error loading package 'example-lib': Package 'example-lib' contains errors
INFO: Elapsed time: 2.845s
INFO: 0 processes.
ERROR: Build did NOT complete successfully
This worked with Bazel 7.3.2.
Which category does this issue belong to?
No response
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Description of the bug:
Testing Bazel 8.0.0rc2 I got such an error:
This worked with Bazel 7.3.2.
Which category does this issue belong to?
No response
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Reproduction: https://github.com/gergelyfabian/bazel-scala-example/tree/bazel-8.0.0rc1
Simply run
bazel build //...
in this repo at branchbazel-8.0.0rc1
Which operating system are you running Bazel on?
Ubuntu 24.04
What is the output of
bazel info release
?release 8.0.0rc2
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse HEAD
?If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.
No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
Related: https://github.com/bazelbuild/bazel/issues/23899