Make load
ignore modules marked as dev_dependency
#25187
Labels
P2
We'll consider working on this in future. (Assignee optional)
team-ExternalDeps
External dependency handling, remote repositiories, WORKSPACE file.
team-Loading-API
BUILD file and macro processing: labels, package(), visibility, glob
type: feature request
Description of the feature request:
load
should ignore modules marked asdev_dependency
forBUILD.bazel
files not in the root module. If a public target depends (directly or indirectly) on such module, it should error with something like "target A depends on B, but B is marked as a dev dependency".Which category does this issue belong to?
External Dependency
What underlying problem are you trying to solve with this feature?
Currently, you can't have public targets in the same
BUILD.bazel
file as you're loading a dev dependency:When trying to use
:genrule
from another module, you get an error saying the dev dependency can't be found:Which operating system are you running Bazel on?
Linux
What is the output of
bazel info release
?release 7.4.0
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
?Have you found anything relevant by searching the web?
No, but I've asked about this in the Bazel Slack.
Any other information, logs, or outputs that you want to share?
Here's a reproduction of the current behaviour. The current workaround seem to be to split targets which depend on the dev dependency into a separate
BUILD.bazel
file.The text was updated successfully, but these errors were encountered: