forked from bazelbuild/bazel
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix up dependency between RepositoryDirectoryValue and FileStateValue
In `RepositoryFunction#addExternalFilesDependencies`, we introduce a dependency from `FileStateValue($outputBase/external/foo/$SOME_PATH)` to `RepositoryDirectoryValue(@foo)`, _except_ when `$SOME_PATH` is empty (i.e. the "foo" directory itself), or when `@foo` is a local_repository and $SOME_PATH is "WORKSPACE". These two exceptions are a bit strange (why would we expect anyone to mess with the external directory? and why should that result in a re-fetch?) and exist only because there is a dependency in the reverse direction (that is, `RepositoryDirectoryValue(@foo)` depends on `FileStateValue($outputBase/external/foo)`, and additionally on `FileStateValue($outputBase/external/foo/WORKSPACE)` if `@foo` is a local_repository). This CL removes these exceptions. This means that the dependency is always from FileStateValue to RepositoryDirectoryValue. Meaning that if the repo definition changes in any way, we'll refetch the files in the external directory; but if the files in the external directory somehow change from under us, we don't trigger a refetch. This change will also make our lives easier in the future with the external deps overhaul. PiperOrigin-RevId: 374830398
- Loading branch information
1 parent
4fc24bc
commit 9732d23
Showing
12 changed files
with
98 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.