aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/ASTFileLookupFunction.java
diff options
context:
space:
mode:
authorGravatar Kristina Chodorow <kchodorow@google.com>2016-03-21 16:20:06 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2016-03-21 18:39:21 +0000
commit6f15335deac0c04cfae11623efbe745f11e177ff (patch)
tree6782a0a789abcb2e97d45c9624bbb306a0e8106a /src/main/java/com/google/devtools/build/lib/skyframe/ASTFileLookupFunction.java
parenta15c426bc5dfe9aa16f22553657dee60ccf1b5f5 (diff)
Make labels in .bzl files in remote repos resolve relative to their repo
For example, if you have a BUILD file that does: load('@foo//bar:baz.bzl', 'my_rule') my_rule(...) If baz.bzl uses Label('//whatever'), this change makes //whatever resolve to @foo//whatever. Previous to this change, it would be resolved to the repository the BUILD file using my_rule was in. RELNOTES[INC]: Labels in .bzl files in remote repositories will be resolved relative to their repository (instead of the repository the Skylark rule is used in). -- MOS_MIGRATED_REVID=117720181
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/ASTFileLookupFunction.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/ASTFileLookupFunction.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/ASTFileLookupFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/ASTFileLookupFunction.java
index c030cccb15..e0bafdfd46 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/ASTFileLookupFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/ASTFileLookupFunction.java
@@ -105,6 +105,7 @@ public class ASTFileLookupFunction implements SkyFunction {
ast = BuildFileAST.parseSkylarkFile(path, astFileSize, env.getListener(),
new ValidationEnvironment(
ruleClassProvider.createSkylarkRuleClassEnvironment(
+ fileLabel,
mutability,
env.getListener(),
// the two below don't matter for extracting the ValidationEnvironment: