-
-
Notifications
You must be signed in to change notification settings - Fork 610
Closed
Description
🐞 bug report
Affected Rule
Gazelle plugin
Is this a regression?
Not that I know of.
Description
When using gazelle with bzlmod you have to run bazel build //:modules_map
before you run bazel build //...
. I assume that
we should be able to run bazel build //...
and not depend on running modules_map first. I am getting this error:
$ bazel clean --expunge
INFO: Starting clean (this may take a while). Consider using --async if the clean takes more than several minutes.
# clove @ DESKTOP in ~/Workspace/src/github.com/bazelbuild/rules_python/examples/bzlmod on git:gazelle-updates o [8:56:29]
$ bazel build //...
Starting local Bazel server and connecting to it...
DEBUG: gazelle@0.27.0/MODULE.bazel:7:6: WARNING: The bazel_gazelle Bazel module is still highly experimental and subject to change at any time. Only use it to try out bzlmod for now.
DEBUG: rules_go@0.37.0/MODULE.bazel:8:6: WARNING: The rules_go Bazel module is still highly experimental and subject to change at any time. Only use it to try out bzlmod for now.
DEBUG: rules_go@0.33.0/MODULE.bazel:7:6: WARNING: The rules_go Bazel module is still highly experimental and subject to change at any time. Only use it to try out bzlmod for now.
ERROR: /home/clove/Workspace/src/github.com/bazelbuild/rules_python/examples/bzlmod/BUILD.bazel:68:11: no such target '@rules_python~override~pip~pip//:pylint_pkg': target 'pylint_pkg' not declared in package '' defined by /home/clove/.cache/bazel/_bazel_clove/4d81ba2c4676ec44765d3282b1133dda/external/rules_python~override~pip~pip/BUILD.bazel (Tip: use `query "@pip//:*"` to see all the targets in that package) and referenced by '//:lib'
ERROR: /home/clove/Workspace/src/github.com/bazelbuild/rules_python/examples/bzlmod/BUILD.bazel:68:11: no such target '@rules_python~override~pip~pip//:tabulate_pkg': target 'tabulate_pkg' not declared in package '' defined by /home/clove/.cache/bazel/_bazel_clove/4d81ba2c4676ec44765d3282b1133dda/external/rules_python~override~pip~pip/BUILD.bazel (Tip: use `query "@pip//:*"` to see all the targets in that package) and referenced by '//:lib'
ERROR: /home/clove/Workspace/src/github.com/bazelbuild/rules_python/examples/bzlmod/BUILD.bazel:68:11: no such target '@rules_python~override~pip~pip//:python_dateutil_pkg': target 'python_dateutil_pkg' not declared in package '' defined by /home/clove/.cache/bazel/_bazel_clove/4d81ba2c4676ec44765d3282b1133dda/external/rules_python~override~pip~pip/BUILD.bazel (Tip: use `query "@pip//:*"` to see all the targets in that package) and referenced by '//:lib'
ERROR: Analysis of target '//:lib' failed; build aborted: Analysis failed
INFO: Elapsed time: 3.733s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (67 packages loaded, 18 targets configured)
Fetching https://bcr.bazel.build/bazel_registry.json
🔬 Minimal Reproduction
Run the example for bzlmod.
🔥 Exception or Error
ERROR: /home/clove/Workspace/src/github.com/bazelbuild/rules_python/examples/bzlmod/BUILD.bazel:68:11: no such target '@rules_python~override~pip~pip//:pylint_pkg': target 'pylint_pkg' not declared in package '' defined by /home/clove/.cache/bazel/_bazel_clove/4d81ba2c4676ec44765d3282b1133dda/external/rules_python~override~pip~pip/BUILD.bazel (Tip: use `query "@pip//:*"` to see all the targets in that package) and referenced by '//:lib'
ERROR: /home/clove/Workspace/src/github.com/bazelbuild/rules_python/examples/bzlmod/BUILD.bazel:68:11: no such target '@rules_python~override~pip~pip//:tabulate_pkg': target 'tabulate_pkg' not declared in package '' defined by /home/clove/.cache/bazel/_bazel_clove/4d81ba2c4676ec44765d3282b1133dda/external/rules_python~override~pip~pip/BUILD.bazel (Tip: use `query "@pip//:*"` to see all the targets in that package) and referenced by '//:lib'
ERROR: /home/clove/Workspace/src/github.com/bazelbuild/rules_python/examples/bzlmod/BUILD.bazel:68:11: no such target '@rules_python~override~pip~pip//:python_dateutil_pkg': target 'python_dateutil_pkg' not declared in package '' defined by /home/clove/.cache/bazel/_bazel_clove/4d81ba2c4676ec44765d3282b1133dda/external/rules_python~override~pip~pip/BUILD.bazel (Tip: use `query "@pip//:*"` to see all the targets in that package) and referenced by '//:lib'
ERROR: Analysis of target '//:lib' failed; build aborted: Analysis failed
INFO: Elapsed time: 3.733s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (67 packages loaded, 18 targets configured)
Fetching https://bcr.bazel.build/bazel_registry.json
🌍 Your Environment
Operating System:
Linux DESKTOP-BRJVH3P 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Output of bazel version
:
Using bazelisk:
$ bazel --version
bazel 6.0.0
Rules_python version:
main
Anything else relevant?
Metadata
Metadata
Assignees
Labels
No labels