diff options
author | 2018-06-04 13:53:22 -0700 | |
---|---|---|
committer | 2018-06-04 13:54:52 -0700 | |
commit | c3495858f097451e06044778bc806e94e06d6da7 (patch) | |
tree | 6350516aaddd9bf93643c86d936a92fc9256d385 /src/main/java/com/google/devtools/build/lib/skyframe/SkyFunctions.java | |
parent | ba25d49ce2c6bb86e93e19cfe9bb8da1399a3c43 (diff) |
Process 'repo_mapping' attribute from WORKSPACE rules. 'repo_mapping' is a way to remap references to repositories within an external repository by another name. This CL only adds the mappings to the Package object, but it does not actually enable the reassignments.
Example usage (in a WORKSPACE file):
local_repository(
name = ?a?,
path = ?../a?,
repo_mapping = {?@x? : ?@y?}
)
This change also creates a new SkyKey which represents the mappings. This is to prevent all packages from depending on the external package, and instead depending just on the mappings. i.e. a change to the WORKSPACE file that does not touch the mappings shouldn't cause a reload of the package.
RELNOTES:None
PiperOrigin-RevId: 199187963
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/SkyFunctions.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/SkyFunctions.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SkyFunctions.java b/src/main/java/com/google/devtools/build/lib/skyframe/SkyFunctions.java index 4d347e8783..7b9ca6d81f 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/SkyFunctions.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/SkyFunctions.java @@ -114,6 +114,8 @@ public final class SkyFunctions { SkyFunctionName.create("REGISTERED_TOOLCHAINS"); public static final SkyFunctionName TOOLCHAIN_RESOLUTION = SkyFunctionName.create("TOOLCHAIN_RESOLUTION"); + public static final SkyFunctionName REPOSITORY_MAPPING = + SkyFunctionName.create("REPOSITORY_MAPPING"); public static Predicate<SkyKey> isSkyFunction(final SkyFunctionName functionName) { return new Predicate<SkyKey>() { |