diff options
author | Lukacs Berki <lberki@google.com> | 2015-09-17 13:09:03 +0000 |
---|---|---|
committer | David Chen <dzc@google.com> | 2015-09-17 19:35:38 +0000 |
commit | afc93a6645d6c8b5be933b48137ac5d0c6aafd61 (patch) | |
tree | 6abe4576b2351bbba046816ddf27a601ff442f00 /src/main/java/com/google/devtools/build/lib/skyframe/ASTFileLookupFunction.java | |
parent | de27f9e46892f6dd95966185a7cf09e256dfe5ff (diff) |
Rollback of commit 4e5037520e3067f9d8784e1c59f9545b96111cd4.
*** Reason for rollback ***
Broke tests, I mistakenly assumed it was flakiness.
*** Original change description ***
Remove support for the deprecated include() statement.
This is part of the crusade to eliminate as every dependency in Skylark on the rest of the code so that it can be moved deeper in the dependency graph.
RELNOTES: The include() statement in BUILD files is not supported anymore.
--
MOS_MIGRATED_REVID=103284257
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.java | 8 |
1 files changed, 6 insertions, 2 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 a7cd395b33..9bc6bf226c 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 @@ -16,6 +16,7 @@ package com.google.devtools.build.lib.skyframe; import com.google.common.collect.ImmutableList; import com.google.devtools.build.lib.cmdline.PackageIdentifier; +import com.google.devtools.build.lib.packages.CachingPackageLocator; import com.google.devtools.build.lib.packages.RuleClassProvider; import com.google.devtools.build.lib.pkgcache.PathPackageLocator; import com.google.devtools.build.lib.syntax.BuildFileAST; @@ -111,10 +112,13 @@ public class ASTFileLookupFunction implements SkyFunction { private final AtomicReference<PathPackageLocator> pkgLocator; private final RuleClassProvider ruleClassProvider; + private final CachingPackageLocator packageManager; public ASTFileLookupFunction(AtomicReference<PathPackageLocator> pkgLocator, + CachingPackageLocator packageManager, RuleClassProvider ruleClassProvider) { this.pkgLocator = pkgLocator; + this.packageManager = packageManager; this.ruleClassProvider = ruleClassProvider; } @@ -139,7 +143,7 @@ public class ASTFileLookupFunction implements SkyFunction { if (parseAsSkylark) { try (Mutability mutability = Mutability.create("validate")) { ast = BuildFileAST.parseSkylarkFile(path, fileSize, env.getListener(), - new ValidationEnvironment( + packageManager, new ValidationEnvironment( ruleClassProvider.createSkylarkRuleClassEnvironment( mutability, env.getListener(), @@ -149,7 +153,7 @@ public class ASTFileLookupFunction implements SkyFunction { .setupDynamic(Runtime.PKG_NAME, Runtime.NONE))); } } else { - ast = BuildFileAST.parseBuildFile(path, fileSize, env.getListener(), false); + ast = BuildFileAST.parseBuildFile(path, fileSize, env.getListener(), packageManager, false); } } catch (IOException e) { throw new ASTLookupFunctionException(new ErrorReadingSkylarkExtensionException( |