From 4e5037520e3067f9d8784e1c59f9545b96111cd4 Mon Sep 17 00:00:00 2001 From: Lukacs Berki Date: Thu, 17 Sep 2015 11:52:33 +0000 Subject: 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 --- .../build/lib/skyframe/PackageFunction.java | 35 ---------------------- 1 file changed, 35 deletions(-) (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/PackageFunction.java') 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.of(), ImmutableList.