Depend on directories in repo rules (recursively) #19928
Labels
P2
We'll consider working on this in future. (Assignee optional)
team-ExternalDeps
External dependency handling, remote repositiories, WORKSPACE file.
type: feature request
Description of the feature request:
We have two repo rules internally that depend on whole directories.
We have a rust binary that needs to generate a repository. Because of that, it can't depend on a toolchain, and we have to it in a repo rule.
In order to build the rust binary, we need our repo rule to depend on.
At the moment, we need to write
build_rust_binary(srcs=["src/main.rs", "src/foo/bar.rs", ...])
. However, that means that if we add a new filesrc/foo/baz.rs
, for example, it won't trigger a rebuild, and it may or may not actually build successfully, depending on the implementation.We have similar issues with another repo rule that depends on a directory, where each directory in the input corresponds to a directory in the output.
I'd like to be able to specify a directory as a label for inputs, so any changes to the transitive closure of the direcotry will trigger a rebuild.
Which category does this issue belong to?
External Dependency
What underlying problem are you trying to solve with this feature?
Ensure that rebuilds are triggered when a directory is modified (or any subdirectory)
Which operating system are you running Bazel on?
Linux
What is the output of
bazel info release
?6.2.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 master; git rev-parse HEAD
?No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: