From 630be025a3e8803e6b81017f4073b5e877c29dc3 Mon Sep 17 00:00:00 2001 From: wyv Date: Mon, 4 Oct 2021 07:55:36 -0700 Subject: [PATCH] Target pattern parsing cleanup ================ * `TargetPattern#renameRepository` is merged into `TargetPattern.Parser#parse`. This is much less error-prone -- repo mapping should not be an afterthought, but something that should always be applied if possible (sometimes it's not, for example for `blaze query`). * This also fixes the bug where calling `native.register_toolchains("//:all")` in `@some_repo//:defs.bzl` registers `@//:all` instead of `@some_repo//:all` (see change in RegisteredExecutionPlatformsTest) * A new class `SignedTargetPattern` is introduced, which can store whether the pattern is positive or negative (with the `sign` method). * `TargetPatternValue#keys` is greatly simplified thanks to the changes above; the exception throwing is confined to the parsing step, and the construction of `TargetPatternKey` can happen as a separate step, obviating the whole "skykey or exception" dance. * Following from the above, the //external package now stores registered toolchains and execution platforms as parsed target patterns, instead of simple strings. Among other things, this would help implement toolchain registration in bzlmod. PiperOrigin-RevId: 400720457 --- .../build/lib/bazel/commands/SyncCommand.java | 12 +- .../AnalysisAndExecutionPhaseRunner.java | 2 +- .../lib/buildtool/AnalysisPhaseRunner.java | 2 +- .../google/devtools/build/lib/cmdline/BUILD | 2 + .../lib/cmdline/SignedTargetPattern.java | 44 +++++ .../build/lib/cmdline/TargetPattern.java | 156 +++++++--------- .../devtools/build/lib/packages/Package.java | 17 +- .../lib/packages/WorkspaceFactoryHelper.java | 15 +- .../build/lib/packages/WorkspaceGlobals.java | 23 ++- .../build/lib/pkgcache/FilteringPolicies.java | 10 +- .../build/lib/pkgcache/FilteringPolicy.java | 4 +- .../query2/PostAnalysisQueryEnvironment.java | 7 +- .../build/lib/query2/SkyQueryEnvironment.java | 8 +- .../build/lib/rules/genquery/GenQuery.java | 7 +- .../skyframe/PrepareDepsOfPatternValue.java | 16 +- .../PrepareDepsOfPatternsFunction.java | 1 + .../RegisteredExecutionPlatformsFunction.java | 59 +++--- .../RegisteredToolchainsFunction.java | 33 +++- .../SkyframeTargetPatternEvaluator.java | 5 +- .../TargetExcludingFilteringPolicy.java | 20 +- .../skyframe/TargetPatternPhaseFunction.java | 63 ++++--- .../build/lib/skyframe/TargetPatternUtil.java | 71 ++++---- .../lib/skyframe/TargetPatternValue.java | 171 ++++-------------- .../build/lib/cmdline/TargetPatternTest.java | 42 ++--- .../lib/packages/WorkspaceFactoryTest.java | 28 ++- .../repository/ExternalPackageHelperTest.java | 17 +- ...isteredExecutionPlatformsFunctionTest.java | 8 +- .../RegisteredToolchainsFunctionTest.java | 17 -- .../skyframe/WorkspaceFileFunctionTest.java | 16 ++ src/test/shell/bazel/toolchain_test.sh | 2 +- 30 files changed, 444 insertions(+), 434 deletions(-) create mode 100644 src/main/java/com/google/devtools/build/lib/cmdline/SignedTargetPattern.java diff --git a/src/main/java/com/google/devtools/build/lib/bazel/commands/SyncCommand.java b/src/main/java/com/google/devtools/build/lib/bazel/commands/SyncCommand.java index 3b7884686de1c9..ea765a6aabdd20 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/commands/SyncCommand.java +++ b/src/main/java/com/google/devtools/build/lib/bazel/commands/SyncCommand.java @@ -13,6 +13,8 @@ // limitations under the License. package com.google.devtools.build.lib.bazel.commands; +import static com.google.common.collect.ImmutableList.toImmutableList; + import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; @@ -24,6 +26,7 @@ import com.google.devtools.build.lib.cmdline.LabelConstants; import com.google.devtools.build.lib.cmdline.LabelSyntaxException; import com.google.devtools.build.lib.cmdline.RepositoryName; +import com.google.devtools.build.lib.cmdline.TargetPattern; import com.google.devtools.build.lib.events.Event; import com.google.devtools.build.lib.events.ExtendedEventHandler.ResolvedEvent; import com.google.devtools.build.lib.packages.Rule; @@ -166,12 +169,17 @@ public BlazeCommandResult exec(CommandEnvironment env, OptionsParsingResult opti env.getReporter() .post( genericArgsCall( - "register_toolchains", fileValue.getPackage().getRegisteredToolchains())); + "register_toolchains", + fileValue.getPackage().getRegisteredToolchains().stream() + .map(TargetPattern::getOriginalPattern) + .collect(toImmutableList()))); env.getReporter() .post( genericArgsCall( "register_execution_platforms", - fileValue.getPackage().getRegisteredExecutionPlatforms())); + fileValue.getPackage().getRegisteredExecutionPlatforms().stream() + .map(TargetPattern::getOriginalPattern) + .collect(toImmutableList()))); env.getReporter().post(new RepositoryOrderEvent(repositoryOrder.build())); // take all Starlark workspace rules and get their values diff --git a/src/main/java/com/google/devtools/build/lib/buildtool/AnalysisAndExecutionPhaseRunner.java b/src/main/java/com/google/devtools/build/lib/buildtool/AnalysisAndExecutionPhaseRunner.java index e9c3e2ced82fcd..850bdec00fc28e 100644 --- a/src/main/java/com/google/devtools/build/lib/buildtool/AnalysisAndExecutionPhaseRunner.java +++ b/src/main/java/com/google/devtools/build/lib/buildtool/AnalysisAndExecutionPhaseRunner.java @@ -228,7 +228,7 @@ private static ImmutableSet getExplicitTargetPatterns( CommandEnvironment env, List requestedTargetPatterns) throws ViewCreationFailedException { ImmutableSet.Builder explicitTargetPatterns = ImmutableSet.builder(); - TargetPattern.Parser parser = new TargetPattern.Parser(env.getRelativeWorkingDirectory()); + TargetPattern.Parser parser = TargetPattern.mainRepoParser(env.getRelativeWorkingDirectory()); for (String requestedTargetPattern : requestedTargetPatterns) { if (requestedTargetPattern.startsWith("-")) { diff --git a/src/main/java/com/google/devtools/build/lib/buildtool/AnalysisPhaseRunner.java b/src/main/java/com/google/devtools/build/lib/buildtool/AnalysisPhaseRunner.java index aeb23977d87b2e..3e0b428a02583e 100644 --- a/src/main/java/com/google/devtools/build/lib/buildtool/AnalysisPhaseRunner.java +++ b/src/main/java/com/google/devtools/build/lib/buildtool/AnalysisPhaseRunner.java @@ -315,7 +315,7 @@ private static ImmutableSet getExplicitTargetPatterns( CommandEnvironment env, List requestedTargetPatterns) throws ViewCreationFailedException { ImmutableSet.Builder explicitTargetPatterns = ImmutableSet.builder(); - TargetPattern.Parser parser = new TargetPattern.Parser(env.getRelativeWorkingDirectory()); + TargetPattern.Parser parser = TargetPattern.mainRepoParser(env.getRelativeWorkingDirectory()); for (String requestedTargetPattern : requestedTargetPatterns) { if (requestedTargetPattern.startsWith("-")) { diff --git a/src/main/java/com/google/devtools/build/lib/cmdline/BUILD b/src/main/java/com/google/devtools/build/lib/cmdline/BUILD index bd3fff071412e3..1f204fe5c49e4e 100644 --- a/src/main/java/com/google/devtools/build/lib/cmdline/BUILD +++ b/src/main/java/com/google/devtools/build/lib/cmdline/BUILD @@ -16,6 +16,7 @@ java_library( "LabelConstants.java", "LabelSerializationProxy.java", "ResolvedTargets.java", + "SignedTargetPattern.java", "TargetParsingException.java", "TargetPattern.java", "TargetPatternResolver.java", @@ -38,6 +39,7 @@ java_library( "//src/main/java/net/starlark/java/annot", "//src/main/java/net/starlark/java/eval", "//src/main/protobuf:failure_details_java_proto", + "//third_party:auto_value", "//third_party:error_prone_annotations", "//third_party:guava", "//third_party:jsr305", diff --git a/src/main/java/com/google/devtools/build/lib/cmdline/SignedTargetPattern.java b/src/main/java/com/google/devtools/build/lib/cmdline/SignedTargetPattern.java new file mode 100644 index 00000000000000..a8dc762be9b1bc --- /dev/null +++ b/src/main/java/com/google/devtools/build/lib/cmdline/SignedTargetPattern.java @@ -0,0 +1,44 @@ +// Copyright 2021 The Bazel Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package com.google.devtools.build.lib.cmdline; + +import com.google.auto.value.AutoValue; + +/** A {@link TargetPattern} with a potential minus sign in front of it, signifying exclusion. */ +@AutoValue +public abstract class SignedTargetPattern { + public abstract TargetPattern pattern(); + + public abstract Sign sign(); + + public static SignedTargetPattern create(TargetPattern pattern, Sign sign) { + return new AutoValue_SignedTargetPattern(pattern, sign); + } + + /** Whether this target pattern begins with a minus sign (NEGATIVE) or not (POSITIVE). */ + public enum Sign { + POSITIVE, + NEGATIVE + } + + public static SignedTargetPattern parse(String pattern, TargetPattern.Parser parser) + throws TargetParsingException { + if (pattern.startsWith("-")) { + return create(parser.parse(pattern.substring(1)), SignedTargetPattern.Sign.NEGATIVE); + } else { + return create(parser.parse(pattern), SignedTargetPattern.Sign.POSITIVE); + } + } +} diff --git a/src/main/java/com/google/devtools/build/lib/cmdline/TargetPattern.java b/src/main/java/com/google/devtools/build/lib/cmdline/TargetPattern.java index 4015c1a89bcd83..536c0f711e3965 100644 --- a/src/main/java/com/google/devtools/build/lib/cmdline/TargetPattern.java +++ b/src/main/java/com/google/devtools/build/lib/cmdline/TargetPattern.java @@ -31,6 +31,7 @@ import com.google.devtools.build.lib.cmdline.LabelValidator.PackageAndTarget; import com.google.devtools.build.lib.concurrent.BatchCallback; import com.google.devtools.build.lib.server.FailureDetails.TargetPatterns; +import com.google.devtools.build.lib.server.FailureDetails.TargetPatterns.Code; import com.google.devtools.build.lib.supplier.InterruptibleSupplier; import com.google.devtools.build.lib.util.StringUtilities; import com.google.devtools.build.lib.vfs.PathFragment; @@ -63,19 +64,28 @@ public abstract class TargetPattern implements Serializable { private static final Splitter SLASH_SPLITTER = Splitter.on('/'); private static final Joiner SLASH_JOINER = Joiner.on('/'); - private static final Parser DEFAULT_PARSER = new Parser(PathFragment.EMPTY_FRAGMENT); + private static final Parser DEFAULT_PARSER = mainRepoParser(PathFragment.EMPTY_FRAGMENT); private final String originalPattern; - private final PathFragment offset; /** - * Returns a parser with no offset. Note that the Parser class is immutable, so this method may - * return the same instance on subsequent calls. + * Returns a parser defaulting to the main repo, with no offset or repo mapping. Note that the + * Parser class is immutable, so this method may return the same instance on subsequent calls. */ public static Parser defaultParser() { return DEFAULT_PARSER; } + /** + * Returns a parser defaulting to the main repo, with repo mapping, but using the given offset. + */ + // NOTE(wyv): This is only strictly correct within a monorepo. If external repos exist, there + // should always be a proper repo mapping. We should audit calls to this function and add a repo + // mapping wherever appropriate. + public static Parser mainRepoParser(PathFragment offset) { + return new Parser(offset, RepositoryName.MAIN, RepositoryMapping.ALWAYS_FALLBACK); + } + private static String removeSuffix(String s, String suffix) { if (s.endsWith(suffix)) { return s.substring(0, s.length() - suffix.length()); @@ -119,10 +129,9 @@ static String normalize(String path) { return SLASH_JOINER.join(pieces); } - private TargetPattern(String originalPattern, PathFragment offset) { + private TargetPattern(String originalPattern) { // Don't allow inheritance outside this class. this.originalPattern = Preconditions.checkNotNull(originalPattern); - this.offset = Preconditions.checkNotNull(offset); } /** @@ -138,11 +147,6 @@ public String getOriginalPattern() { return originalPattern; } - /** Returns the offset this target pattern was parsed with. */ - public PathFragment getOffset() { - return offset; - } - /** * Evaluates the current target pattern, excluding targets under directories in both {@code * ignoredSubdirectories} and {@code excludedSubdirectories}, and returns the result. @@ -163,7 +167,7 @@ public abstract void eval( * Evaluates this {@link TargetPattern} synchronously, feeding the result to the given {@code * callback}, and then returns an appropriate immediate {@link ListenableFuture}. * - *

If the returned {@link ListenableFuture}'s {@link ListenableFuture#get} throws an {@link + *

If the returned {@link ListenableFuture}'s {@link ListenableFuture#get} throws an {@code * ExecutionException}, the cause will be an instance of either {@link TargetParsingException} or * the given {@code exceptionClass}. */ @@ -192,7 +196,7 @@ public final ListenableFuture evalAdaptedForAsync * Returns a {@link ListenableFuture} representing the asynchronous evaluation of this {@link * TargetPattern} that feeds the results to the given {@code callback}. * - *

If the returned {@link ListenableFuture}'s {@link ListenableFuture#get} throws an {@link + *

If the returned {@link ListenableFuture}'s {@link ListenableFuture#get} throws an {@code * ExecutionException}, the cause will be an instance of either {@link TargetParsingException} or * the given {@code exceptionClass}. */ @@ -256,12 +260,8 @@ private static final class SingleTarget extends TargetPattern { private final String targetName; private final PackageIdentifier directory; - private SingleTarget( - String targetName, - PackageIdentifier directory, - String originalPattern, - PathFragment offset) { - super(originalPattern, offset); + private SingleTarget(String targetName, PackageIdentifier directory, String originalPattern) { + super(originalPattern); this.targetName = Preconditions.checkNotNull(targetName); this.directory = Preconditions.checkNotNull(directory); } @@ -323,8 +323,8 @@ public int hashCode() { private static final class InterpretPathAsTarget extends TargetPattern { private final String path; - private InterpretPathAsTarget(String path, String originalPattern, PathFragment offset) { - super(originalPattern, offset); + private InterpretPathAsTarget(String path, String originalPattern) { + super(originalPattern); this.path = normalize(Preconditions.checkNotNull(path)); } @@ -412,13 +412,12 @@ private static final class TargetsInPackage extends TargetPattern { private TargetsInPackage( String originalPattern, - PathFragment offset, PackageIdentifier packageIdentifier, String suffix, boolean wasOriginallyAbsolute, boolean rulesOnly, boolean checkWildcardConflict) { - super(originalPattern, offset); + super(originalPattern); Preconditions.checkArgument(!packageIdentifier.getRepository().isDefault()); this.packageIdentifier = packageIdentifier; this.suffix = Preconditions.checkNotNull(suffix); @@ -476,16 +475,24 @@ public boolean equals(Object o) { return false; } TargetsInPackage that = (TargetsInPackage) o; - return wasOriginallyAbsolute == that.wasOriginallyAbsolute && rulesOnly == that.rulesOnly + return wasOriginallyAbsolute == that.wasOriginallyAbsolute + && rulesOnly == that.rulesOnly && checkWildcardConflict == that.checkWildcardConflict && getOriginalPattern().equals(that.getOriginalPattern()) - && packageIdentifier.equals(that.packageIdentifier) && suffix.equals(that.suffix); + && packageIdentifier.equals(that.packageIdentifier) + && suffix.equals(that.suffix); } @Override public int hashCode() { - return Objects.hash(getType(), getOriginalPattern(), packageIdentifier, suffix, - wasOriginallyAbsolute, rulesOnly, checkWildcardConflict); + return Objects.hash( + getType(), + getOriginalPattern(), + packageIdentifier, + suffix, + wasOriginallyAbsolute, + rulesOnly, + checkWildcardConflict); } /** @@ -538,11 +545,8 @@ public static final class TargetsBelowDirectory extends TargetPattern { private final boolean rulesOnly; private TargetsBelowDirectory( - String originalPattern, - PathFragment offset, - PackageIdentifier directory, - boolean rulesOnly) { - super(originalPattern, offset); + String originalPattern, PackageIdentifier directory, boolean rulesOnly) { + super(originalPattern); Preconditions.checkArgument(!directory.getRepository().isDefault()); this.directory = Preconditions.checkNotNull(directory); this.rulesOnly = rulesOnly; @@ -800,7 +804,8 @@ public boolean equals(Object o) { return false; } TargetsBelowDirectory that = (TargetsBelowDirectory) o; - return rulesOnly == that.rulesOnly && getOriginalPattern().equals(that.getOriginalPattern()) + return rulesOnly == that.rulesOnly + && getOriginalPattern().equals(that.getOriginalPattern()) && directory.equals(that.directory); } @@ -810,42 +815,6 @@ public int hashCode() { } } - /** - * Apply a renaming to the repository part of a pattern string, returning the renamed pattern - * string. This function only looks at the repository part of the pattern string, not the rest; so - * any syntactic errors will not be handled here, but simply remain. Similarly, if the repository - * part of the pattern is not syntactically valid, the renaming simply does not match and the - * string is returned unchanged. - */ - public static String renameRepository(String pattern, RepositoryMapping renaming) { - if (pattern.startsWith("-")) { - return "-" + renameRepositoryInternal(pattern.substring(1), renaming); - } - return renameRepositoryInternal(pattern, renaming); - } - - private static String renameRepositoryInternal(String pattern, RepositoryMapping renaming) { - if (!pattern.startsWith("@")) { - return pattern; - } - int pkgStart = pattern.indexOf("//"); - if (pkgStart < 0) { - return pattern; - } - RepositoryName repository; - try { - repository = RepositoryName.create(pattern.substring(0, pkgStart)); - } catch (LabelSyntaxException e) { - return pattern; - } - RepositoryName newRepository = renaming.get(repository); - if (newRepository == null) { - // No renaming required - return pattern; - } - return newRepository.getName() + pattern.substring(pkgStart); - } - @Immutable public static final class Parser { // A valid pattern either starts with exactly 0 slashes (relative pattern) or exactly two @@ -902,9 +871,19 @@ public static boolean isSimpleTargetPattern(String pattern) { */ private final PathFragment relativeDirectory; + // The repo to use for any repo-relative target patterns (so "//foo" becomes + // "@currentRepo//foo"). + private final RepositoryName currentRepo; + + // The repo mapping to use for the @repo part of target patterns. + private final RepositoryMapping repoMapping; + /** Creates a new parser with the given offset for relative patterns. */ - public Parser(PathFragment relativeDirectory) { + public Parser( + PathFragment relativeDirectory, RepositoryName currentRepo, RepositoryMapping repoMapping) { this.relativeDirectory = relativeDirectory; + this.currentRepo = currentRepo; + this.repoMapping = repoMapping; } /** @@ -919,18 +898,27 @@ public TargetPattern parse(String pattern) throws TargetParsingException { String originalPattern = pattern; final boolean includesRepo = pattern.startsWith("@"); - RepositoryName repository = null; - if (includesRepo) { + RepositoryName repository; + if (!includesRepo) { + repository = currentRepo; + } else { int pkgStart = pattern.indexOf("//"); if (pkgStart < 0) { throw new TargetParsingException( "Couldn't find package in target " + pattern, TargetPatterns.Code.PACKAGE_NOT_FOUND); } try { - repository = RepositoryName.create(pattern.substring(0, pkgStart)); + repository = repoMapping.get(RepositoryName.create(pattern.substring(0, pkgStart))); } catch (LabelSyntaxException e) { throw new TargetParsingException(e.getMessage(), TargetPatterns.Code.LABEL_SYNTAX_ERROR); } + if (!repository.isVisible()) { + throw new TargetParsingException( + String.format( + "%s is not visible from %s", + repository.getName(), repository.getOwnerRepoIfNotVisible()), + Code.PACKAGE_NOT_FOUND); + } pattern = pattern.substring(pkgStart); } @@ -968,10 +956,6 @@ public TargetPattern parse(String pattern) throws TargetParsingException { TargetPatterns.Code.PACKAGE_PART_CANNOT_END_IN_SLASH); } - if (repository == null) { - repository = RepositoryName.MAIN; - } - if (packagePart.endsWith("/...")) { String realPackagePart = removeSuffix(packagePart, "/..."); PackageIdentifier packageIdentifier; @@ -984,11 +968,9 @@ public TargetPattern parse(String pattern) throws TargetParsingException { TargetPatterns.Code.LABEL_SYNTAX_ERROR); } if (targetPart.isEmpty() || ALL_RULES_IN_SUFFIXES.contains(targetPart)) { - return new TargetsBelowDirectory( - originalPattern, relativeDirectory, packageIdentifier, true); + return new TargetsBelowDirectory(originalPattern, packageIdentifier, true); } else if (ALL_TARGETS_IN_SUFFIXES.contains(targetPart)) { - return new TargetsBelowDirectory( - originalPattern, relativeDirectory, packageIdentifier, false); + return new TargetsBelowDirectory(originalPattern, packageIdentifier, false); } } @@ -1001,8 +983,8 @@ public TargetPattern parse(String pattern) throws TargetParsingException { "Invalid package name '" + packagePart + "': " + e.getMessage(), TargetPatterns.Code.LABEL_SYNTAX_ERROR); } - return new TargetsInPackage(originalPattern, relativeDirectory, packageIdentifier, - targetPart, wasOriginallyAbsolute, true, true); + return new TargetsInPackage( + originalPattern, packageIdentifier, targetPart, wasOriginallyAbsolute, true, true); } if (ALL_TARGETS_IN_SUFFIXES.contains(targetPart)) { @@ -1014,8 +996,8 @@ public TargetPattern parse(String pattern) throws TargetParsingException { "Invalid package name '" + packagePart + "': " + e.getMessage(), TargetPatterns.Code.LABEL_SYNTAX_ERROR); } - return new TargetsInPackage(originalPattern, relativeDirectory, packageIdentifier, - targetPart, wasOriginallyAbsolute, false, true); + return new TargetsInPackage( + originalPattern, packageIdentifier, targetPart, wasOriginallyAbsolute, false, true); } if (includesRepo || wasOriginallyAbsolute || pattern.contains(":")) { @@ -1030,7 +1012,7 @@ public TargetPattern parse(String pattern) throws TargetParsingException { String error = "invalid target format '" + originalPattern + "': " + e.getMessage(); throw new TargetParsingException(error, TargetPatterns.Code.TARGET_FORMAT_INVALID); } - return new SingleTarget(fullLabel, packageIdentifier, originalPattern, relativeDirectory); + return new SingleTarget(fullLabel, packageIdentifier, originalPattern); } // This is a stripped-down version of interpretPathAsTarget that does no I/O. We have a basic @@ -1050,7 +1032,7 @@ public TargetPattern parse(String pattern) throws TargetParsingException { "Bad target pattern '" + originalPattern + "': " + e.getMessage(), TargetPatterns.Code.LABEL_SYNTAX_ERROR); } - return new InterpretPathAsTarget(pattern, originalPattern, relativeDirectory); + return new InterpretPathAsTarget(pattern, originalPattern); } /** diff --git a/src/main/java/com/google/devtools/build/lib/packages/Package.java b/src/main/java/com/google/devtools/build/lib/packages/Package.java index 77b729847569dd..25c5112544455d 100644 --- a/src/main/java/com/google/devtools/build/lib/packages/Package.java +++ b/src/main/java/com/google/devtools/build/lib/packages/Package.java @@ -34,6 +34,7 @@ import com.google.devtools.build.lib.cmdline.PackageIdentifier; import com.google.devtools.build.lib.cmdline.RepositoryMapping; import com.google.devtools.build.lib.cmdline.RepositoryName; +import com.google.devtools.build.lib.cmdline.TargetPattern; import com.google.devtools.build.lib.collect.CollectionUtils; import com.google.devtools.build.lib.concurrent.ThreadSafety.ThreadCompatible; import com.google.devtools.build.lib.events.Event; @@ -238,8 +239,8 @@ public enum ConfigSettingVisibilityPolicy { private ImmutableSet features; - private ImmutableList registeredExecutionPlatforms; - private ImmutableList registeredToolchains; + private ImmutableList registeredExecutionPlatforms; + private ImmutableList registeredToolchains; private long computationSteps; @@ -801,11 +802,11 @@ public Set