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

WARNING: Couldn't auto load rules or symbols #23929

Open
criemen opened this issue Oct 9, 2024 · 2 comments
Open

WARNING: Couldn't auto load rules or symbols #23929

criemen opened this issue Oct 9, 2024 · 2 comments
Labels
team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. team-Rules-API API for writing rules/aspects: providers, runfiles, actions, artifacts type: bug

Comments

@criemen
Copy link
Contributor

criemen commented Oct 9, 2024

Description of the bug:

I've tried out 8.0.0rc1 on our codebase, and we're seeing

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.

We're not actively using either of these rules in our codebase, but I wouldn't rule out that we have them as transitive dependencies in our dependency tree.
We're using bzlmod, our WORKSPACE file exists and is empty.

How can we silence these warnings? They are not helpful for us, and I'd be reluctant to roll out this upgrade to our users, as they'll be confused by warnings that aren't actionable or relevant to them.

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.

No response

Which operating system are you running Bazel on?

macos

What is the output of bazel info release?

8.0.0rc1

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 ?

No response

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?

Slack discussion: https://bazelbuild.slack.com/archives/CA31HN1T3/p1728481396695989

@Wyverald Wyverald added team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. team-Rules-API API for writing rules/aspects: providers, runfiles, actions, artifacts and removed untriaged labels Oct 9, 2024
@Wyverald
Copy link
Member

Wyverald commented Oct 9, 2024

cc @comius

@comius
Copy link
Contributor

comius commented Oct 12, 2024

You may silence the warning by removing rules_android and protobuf from incompatible_autoload_externally. At the moment that means setting it to „+@rules_java,+@rules_python,+@rules_shell“.

Futhermore if you have load statements for some of the remaining rules or if you’re not using them, you may also omit them from the flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. team-Rules-API API for writing rules/aspects: providers, runfiles, actions, artifacts type: bug
Projects
None yet
Development

No branches or pull requests

6 participants