diff options
author | 2015-09-17 11:52:33 +0000 | |
---|---|---|
committer | 2015-09-17 19:34:26 +0000 | |
commit | 4e5037520e3067f9d8784e1c59f9545b96111cd4 (patch) | |
tree | 080163800a9e1a0c02e513d396dc41a400ee6a37 /src/main/java/com/google/devtools/build/lib/skyframe/PackageFunction.java | |
parent | 59dbf684fbba5b6f3a99cd1761dd7c7f5cf69a3e (diff) |
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=103279943
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/PackageFunction.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/PackageFunction.java | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/PackageFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/PackageFunction.java index eb580be9ba..427e758b29 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/PackageFunction.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/PackageFunction.java @@ -21,7 +21,6 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.google.common.collect.Sets; -import com.google.devtools.build.lib.cmdline.LabelSyntaxException; import com.google.devtools.build.lib.cmdline.PackageIdentifier; import com.google.devtools.build.lib.cmdline.PackageIdentifier.RepositoryName; import com.google.devtools.build.lib.events.Event; @@ -525,32 +524,6 @@ public class PackageFunction implements SkyFunction { return new PackageValue(pkg); } - /** - * Returns true if includes referencing a different repository have already been computed. - */ - private boolean fetchIncludeRepositoryDeps(Environment env, BuildFileAST ast) { - boolean ok = true; - for (String include : ast.getIncludes()) { - Label label; - try { - label = Label.parseAbsolute(include); - } catch (LabelSyntaxException e) { - // Ignore. This will be reported when the BUILD file is actually evaluated. - continue; - } - if (!label.getPackageIdentifier().getRepository().isDefault()) { - // If this is the default repository, the include refers to the same repository, whose - // RepositoryValue is already a dependency of this PackageValue. - if (env.getValue(RepositoryValue.key( - label.getPackageIdentifier().getRepository())) == null) { - ok = false; - } - } - } - - return ok; - } - // TODO(bazel-team): this should take the AST so we don't parse the file twice. @Nullable private SkylarkImportResult discoverSkylarkImports( @@ -567,24 +540,16 @@ public class PackageFunction implements SkyFunction { inputSource, preludeStatements, eventHandler, - /* package locator */ null, /* parse python */ false); SkylarkImportResult importResult; - boolean includeRepositoriesFetched; if (eventHandler.hasErrors()) { importResult = new SkylarkImportResult( ImmutableMap.<PathFragment, Extension>of(), ImmutableList.<Label>of()); - includeRepositoriesFetched = true; } else { importResult = fetchImportsFromBuildFile(buildFilePath, buildFileFragment, packageId, buildFileAST, env); - includeRepositoriesFetched = fetchIncludeRepositoryDeps(env, buildFileAST); - } - - if (!includeRepositoriesFetched) { - return null; } return importResult; |