Skip to content
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 8.0.0rc2: autoload does not work with WORKSPACE repos #24235

Open
gergelyfabian opened this issue Nov 7, 2024 · 2 comments
Open

Bazel 8.0.0rc2: autoload does not work with WORKSPACE repos #24235

gergelyfabian opened this issue Nov 7, 2024 · 2 comments
Assignees
Labels
team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website team-Rules-API API for writing rules/aspects: providers, runfiles, actions, artifacts type: bug untriaged

Comments

@gergelyfabian
Copy link

gergelyfabian commented Nov 7, 2024

Description of the bug:

Testing Bazel 8.0.0rc2 I got such an error:

$ 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.

Reproduction: https://github.com/gergelyfabian/bazel-scala-example/tree/bazel-8.0.0rc1

Simply run bazel build //... in this repo at branch bazel-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 returns development 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 ?

[email protected]:gergelyfabian/bazel-scala-example.git
b44d1811b34b69e28c30f99ec4b92c04b1ca93a5

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: #23899

@gergelyfabian gergelyfabian changed the title Bazel 8.0.0rc1: autoload does not work with WORKSPACE repos Bazel 8.0.0rc2: autoload does not work with WORKSPACE repos Nov 7, 2024
@gergelyfabian
Copy link
Author

Moved here after initial clarification in #23899

@sgowroji sgowroji added the team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website label Nov 7, 2024
@meteorcloudy meteorcloudy added the team-Rules-API API for writing rules/aspects: providers, runfiles, actions, artifacts label Nov 7, 2024
@meteorcloudy
Copy link
Member

@bazel-io fork 8.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website team-Rules-API API for writing rules/aspects: providers, runfiles, actions, artifacts type: bug untriaged
Projects
None yet
Development

No branches or pull requests

6 participants