From ec4be003ec328ca593e93a724947259a5330a476 Mon Sep 17 00:00:00 2001 From: gregce Date: Mon, 12 Jul 2021 08:07:31 -0700 Subject: [PATCH] Simplify ConfiguredValueCreationException - Reduce excessive constructor overload - Move withoutMessage() logic to the caller (where the intention is expressed). - Replaced ConfiguredTargetFunctionException with ReportedException / UnreportedException to force explicit declaration of whether the error was directly reported in CTF. PiperOrigin-RevId: 384235733 --- .../google/devtools/build/lib/analysis/BUILD | 17 ++- .../config/ConfigurationResolver.java | 24 +--- .../google/devtools/build/lib/query2/BUILD | 1 + .../google/devtools/build/lib/skyframe/BUILD | 3 +- .../skyframe/ConfiguredTargetFunction.java | 134 +++++++----------- .../ConfiguredValueCreationException.java | 84 ++++------- .../google/devtools/build/lib/analysis/BUILD | 1 + .../devtools/build/lib/analysis/util/BUILD | 1 + .../google/devtools/build/lib/skyframe/BUILD | 1 + 9 files changed, 106 insertions(+), 160 deletions(-) diff --git a/src/main/java/com/google/devtools/build/lib/analysis/BUILD b/src/main/java/com/google/devtools/build/lib/analysis/BUILD index b10d26a6cd9f6f..a98c1b7618c86f 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/BUILD +++ b/src/main/java/com/google/devtools/build/lib/analysis/BUILD @@ -207,7 +207,6 @@ java_library( "SingleRunfilesSupplier.java", "SourceManifestAction.java", "StarlarkProviderValidationUtil.java", - "TargetAndConfiguration.java", "TargetCompleteEvent.java", "TargetContext.java", "TopLevelArtifactHelper.java", @@ -346,6 +345,7 @@ java_library( ":starlark/starlark_exec_group_collection", ":starlark/starlark_late_bound_default", ":starlark/starlark_toolchain_context", + ":target_and_configuration", ":template_variable_info", ":test/analysis_failure", ":test/analysis_failure_info", @@ -598,6 +598,7 @@ java_library( ":constraints/top_level_constraint_semantics", ":extra_action_artifacts_provider", ":make_environment_event", + ":target_and_configuration", ":target_configured_event", ":test/coverage_report_action_factory", ":test/instrumented_files_info", @@ -1033,6 +1034,20 @@ java_library( ], ) +java_library( + name = "target_and_configuration", + srcs = ["TargetAndConfiguration.java"], + deps = [ + ":config/build_configuration", + "//src/main/java/com/google/devtools/build/lib/cmdline", + "//src/main/java/com/google/devtools/build/lib/concurrent", + "//src/main/java/com/google/devtools/build/lib/packages", + "//src/main/java/com/google/devtools/build/lib/skyframe:configured_target_key", + "//third_party:guava", + "//third_party:jsr305", + ], +) + java_library( name = "target_configured_event", srcs = ["TargetConfiguredEvent.java"], diff --git a/src/main/java/com/google/devtools/build/lib/analysis/config/ConfigurationResolver.java b/src/main/java/com/google/devtools/build/lib/analysis/config/ConfigurationResolver.java index e20297a84051d7..47f66dd878cadd 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/config/ConfigurationResolver.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/config/ConfigurationResolver.java @@ -219,11 +219,7 @@ private ImmutableList resolveGenericTransition( return null; // Need more Skyframe deps for a Starlark transition. } } catch (TransitionException e) { - throw new ConfiguredValueCreationException( - ctgValue.getTarget().getLocation(), - e.getMessage(), - ctgValue.getLabel(), - ctgValue.getConfiguration()); + throw new ConfiguredValueCreationException(ctgValue, e.getMessage()); } if (depFragments.equals(getCurrentConfiguration().fragmentClasses()) @@ -258,11 +254,7 @@ private ImmutableList resolveGenericTransition( configurationKeys.put(transitionKey, buildConfigurationValueKey); } } catch (OptionsParsingException e) { - throw new ConfiguredValueCreationException( - ctgValue.getTarget().getLocation(), - e.getMessage(), - ctgValue.getLabel(), - ctgValue.getConfiguration()); + throw new ConfiguredValueCreationException(ctgValue, e.getMessage()); } Map> depConfigValues = @@ -294,11 +286,7 @@ private ImmutableList resolveGenericTransition( return null; // Need dependency configurations. } } catch (InvalidConfigurationException e) { - throw new ConfiguredValueCreationException( - ctgValue.getTarget().getLocation(), - e.getMessage(), - ctgValue.getLabel(), - ctgValue.getConfiguration()); + throw new ConfiguredValueCreationException(ctgValue, e.getMessage()); } return ImmutableList.sortedCopyOf(SPLIT_DEP_ORDERING, dependencies); @@ -327,11 +315,7 @@ private ImmutableList collectTransitionKeys(Attribute attribute) return null; // Need more Skyframe deps for a Starlark transition. } } catch (TransitionException e) { - throw new ConfiguredValueCreationException( - ctgValue.getTarget().getLocation(), - e.getMessage(), - ctgValue.getLabel(), - ctgValue.getConfiguration()); + throw new ConfiguredValueCreationException(ctgValue, e.getMessage()); } if (!SplitTransition.equals(getCurrentConfiguration().getOptions(), toOptions.values())) { return ImmutableList.copyOf(toOptions.keySet()); diff --git a/src/main/java/com/google/devtools/build/lib/query2/BUILD b/src/main/java/com/google/devtools/build/lib/query2/BUILD index 36dddcaa9338e1..28cf369c5f81a8 100644 --- a/src/main/java/com/google/devtools/build/lib/query2/BUILD +++ b/src/main/java/com/google/devtools/build/lib/query2/BUILD @@ -46,6 +46,7 @@ java_library( "//src/main/java/com/google/devtools/build/lib/analysis:inconsistent_aspect_order_exception", "//src/main/java/com/google/devtools/build/lib/analysis:platform_configuration", "//src/main/java/com/google/devtools/build/lib/analysis:required_config_fragments_provider", + "//src/main/java/com/google/devtools/build/lib/analysis:target_and_configuration", "//src/main/java/com/google/devtools/build/lib/analysis:toolchain_collection", "//src/main/java/com/google/devtools/build/lib/analysis:toolchain_context", "//src/main/java/com/google/devtools/build/lib/buildeventstream", diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/BUILD b/src/main/java/com/google/devtools/build/lib/skyframe/BUILD index 11861344c2cbea..d9142425d2caf2 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/BUILD +++ b/src/main/java/com/google/devtools/build/lib/skyframe/BUILD @@ -266,6 +266,7 @@ java_library( "//src/main/java/com/google/devtools/build/lib/analysis:platform_options", "//src/main/java/com/google/devtools/build/lib/analysis:resolved_toolchain_context", "//src/main/java/com/google/devtools/build/lib/analysis:rule_configured_object_value", + "//src/main/java/com/google/devtools/build/lib/analysis:target_and_configuration", "//src/main/java/com/google/devtools/build/lib/analysis:toolchain_collection", "//src/main/java/com/google/devtools/build/lib/analysis:toolchain_context", "//src/main/java/com/google/devtools/build/lib/analysis:top_level_artifact_context", @@ -1228,7 +1229,7 @@ java_library( srcs = ["ConfiguredValueCreationException.java"], deps = [ ":sane_analysis_exception", - "//src/main/java/com/google/devtools/build/lib/analysis:config/build_configuration", + "//src/main/java/com/google/devtools/build/lib/analysis:target_and_configuration", "//src/main/java/com/google/devtools/build/lib/buildeventstream/proto:build_event_stream_java_proto", "//src/main/java/com/google/devtools/build/lib/causes", "//src/main/java/com/google/devtools/build/lib/cmdline", diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/ConfiguredTargetFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/ConfiguredTargetFunction.java index 8e091c5daa5e81..5f1a8f6f9e1843 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/ConfiguredTargetFunction.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/ConfiguredTargetFunction.java @@ -76,7 +76,6 @@ import com.google.devtools.build.lib.packages.RuleClass; import com.google.devtools.build.lib.packages.RuleClassProvider; import com.google.devtools.build.lib.packages.Target; -import com.google.devtools.build.lib.packages.TargetUtils; import com.google.devtools.build.lib.server.FailureDetails.Analysis; import com.google.devtools.build.lib.server.FailureDetails.Analysis.Code; import com.google.devtools.build.lib.server.FailureDetails.FailureDetail; @@ -184,8 +183,8 @@ private void maybeReleaseSemaphore() { } @Override - public SkyValue compute(SkyKey key, Environment env) throws ConfiguredTargetFunctionException, - InterruptedException { + public SkyValue compute(SkyKey key, Environment env) + throws ReportedException, UnreportedException, InterruptedException { if (shouldUnblockCpuWorkWhenFetchingDeps) { env = new StateInformingSkyFunctionEnvironment( @@ -231,12 +230,13 @@ public SkyValue compute(SkyKey key, Environment env) throws ConfiguredTargetFunc if (!e.getMessage().isEmpty()) { env.getListener().handle(Event.error(pkg.getBuildFile().getLocation(), e.getMessage())); } - throw new ConfiguredTargetFunctionException( + throw new ReportedException( new ConfiguredValueCreationException( pkg.getBuildFile().getLocation(), e.getMessage(), label, - configuration, + configuration.getEventId(), + null, e.getDetailedExitCode())); } if (pkg.containsErrors()) { @@ -307,11 +307,10 @@ public SkyValue compute(SkyKey key, Environment env) throws ConfiguredTargetFunc NestedSet causes = transitiveRootCauses.build(); env.getListener() .handle(Event.error(target.getLocation(), "Cannot compute config conditions")); - throw new ConfiguredTargetFunctionException( + throw new ReportedException( new ConfiguredValueCreationException( - target.getLocation(), + ctgValue, "Cannot compute config conditions", - configuration, causes, getPrioritizedDetailedExitCode(causes))); } @@ -334,17 +333,11 @@ public SkyValue compute(SkyKey key, Environment env) throws ConfiguredTargetFunc transitiveRootCauses); if (!transitiveRootCauses.isEmpty()) { NestedSet causes = transitiveRootCauses.build(); - throw new ConfiguredTargetFunctionException( + // TODO(bazel-team): consider reporting the error in this class vs. exporting it for + // BuildTool to handle. Calling code needs to be untangled for that to work and pass tests. + throw new UnreportedException( new ConfiguredValueCreationException( - target.getLocation(), - "Analysis failed", - configuration, - causes, - getPrioritizedDetailedExitCode(causes)), - // TODO(bazel-team): consider reporting the error in this class vs. exporting it for - // BuildTool to handle, as stripMessage=false applies. Calling code needs to be - // untangled for that to work and pass tests. - /*stripMessage=*/ false); + ctgValue, "Analysis failed", causes, getPrioritizedDetailedExitCode(causes))); } if (env.valuesMissing()) { return null; @@ -375,9 +368,7 @@ public SkyValue compute(SkyKey key, Environment env) throws ConfiguredTargetFunc createConfiguredTarget( view, env, - target, - configuration, - configuredTargetKey, + ctgValue, depValueMap, configConditions, toolchainContexts, @@ -414,29 +405,21 @@ public SkyValue compute(SkyKey key, Environment env) throws ConfiguredTargetFunc } } - throw new ConfiguredTargetFunctionException( + throw new ReportedException( cvce != null ? cvce : new ConfiguredValueCreationException( - target.getLocation(), - errorMessage, - target.getLabel(), - configuration, - e.getDetailedExitCode())); + ctgValue, errorMessage, null, e.getDetailedExitCode())); } catch (ConfiguredValueCreationException e) { if (!e.getMessage().isEmpty()) { // Report the error to the user. env.getListener().handle(Event.error(e.getLocation(), e.getMessage())); } - throw new ConfiguredTargetFunctionException(e); + throw new ReportedException(e); } catch (AspectCreationException e) { - throw new ConfiguredTargetFunctionException( + throw new ReportedException( new ConfiguredValueCreationException( - target.getLocation(), - e.getMessage(), - configuration, - e.getCauses(), - e.getDetailedExitCode())); + ctgValue, e.getMessage(), e.getCauses(), e.getDetailedExitCode())); } catch (ToolchainException e) { String message = String.format( @@ -445,18 +428,13 @@ public SkyValue compute(SkyKey key, Environment env) throws ConfiguredTargetFunc ConfiguredValueCreationException cvce = asConfiguredValueCreationException(e); if (cvce == null) { cvce = - new ConfiguredValueCreationException( - target.getLocation(), - message, - target.getLabel(), - configuration, - e.getDetailedExitCode()); + new ConfiguredValueCreationException(ctgValue, message, null, e.getDetailedExitCode()); } if (!message.isEmpty()) { // Report the error to the user. env.getListener().handle(Event.error(target.getLocation(), message)); } - throw new ConfiguredTargetFunctionException(cvce); + throw new ReportedException(cvce); } finally { maybeReleaseSemaphore(); } @@ -686,7 +664,7 @@ static OrderedSetMultimap computeDepend env.getListener().post(new AnalysisRootCauseEvent(configuration, label, e.getMessage())); throw new DependencyEvaluationException( new ConfiguredValueCreationException( - e.getLocation(), e.getMessage(), label, configuration), + e.getLocation(), e.getMessage(), label, configuration.getEventId(), null, null), // These errors occur within DependencyResolver, which is attached to the current target. // i.e. no dependent ConfiguredTargetFunction call happens to report its own error. /*depReportedOwnError=*/ false); @@ -733,8 +711,7 @@ static OrderedSetMultimap computeDepend return AspectResolver.mergeAspects(depValueNames, depValues, depAspects); } catch (DuplicateException e) { throw new DependencyEvaluationException( - new ConfiguredValueCreationException( - ctgValue.getTarget().getLocation(), e.getMessage(), label, configuration), + new ConfiguredValueCreationException(ctgValue, e.getMessage()), /*depReportedOwnError=*/ false); } } @@ -803,12 +780,9 @@ static ConfigConditions getConfigConditions( // One of the config dependencies doesn't exist, and we need to report that. Unfortunately, // there's not enough information to know which configurable attribute has the problem. throw new ConfiguredValueCreationException( - target.getLocation(), // The precise error is reported by the dependency that failed to load. // TODO(gregce): beautify this error: https://github.com/bazelbuild/bazel/issues/11984. - "errors encountered resolving select() keys for " + target.getLabel(), - target.getLabel(), - ctgValue.getConfiguration()); + ctgValue, "errors encountered resolving select() keys for " + target.getLabel()); } ImmutableMap.Builder asConfiguredTargets = @@ -833,11 +807,7 @@ static ConfigConditions getConfigConditions( "To inspect the select(), run: bazel query --output=build %s.\n", target.getLabel()) + "For more help, see https://docs.bazel.build/be/functions.html#select.\n\n"; - throw new ConfiguredValueCreationException( - TargetUtils.getLocationMaybe(target), - message, - ctgValue.getLabel(), - ctgValue.getConfiguration()); + throw new ConfiguredValueCreationException(ctgValue, message); } } @@ -963,11 +933,7 @@ private static Map resolveConfiguredTargetDepen if (rootError != null) { throw new DependencyEvaluationException( new ConfiguredValueCreationException( - rootError.getLocation(), - rootError.getMessage(), - ctgValue.getConfiguration(), - transitiveRootCauses.build(), - detailedExitCode), + ctgValue, rootError.getMessage(), transitiveRootCauses.build(), detailedExitCode), /*depReportedOwnError=*/ true); } else if (missedValues) { return null; @@ -985,15 +951,17 @@ public String extractTag(SkyKey skyKey) { private static ConfiguredTargetValue createConfiguredTarget( SkyframeBuildView view, Environment env, - Target target, - BuildConfiguration configuration, - ConfiguredTargetKey configuredTargetKey, + TargetAndConfiguration ctgValue, OrderedSetMultimap depValueMap, ConfigConditions configConditions, @Nullable ToolchainCollection toolchainContexts, ExecGroupCollection.Builder execGroupCollectionBuilder, @Nullable NestedSetBuilder transitivePackagesForPackageRootResolution) throws ConfiguredValueCreationException, InterruptedException { + Target target = ctgValue.getTarget(); + BuildConfiguration configuration = ctgValue.getConfiguration(); + ConfiguredTargetKey configuredTargetKey = ctgValue.getConfiguredTargetKey(); + // Should be successfully evaluated and cached from the loading phase. StarlarkBuiltinsValue starlarkBuiltinsValue = (StarlarkBuiltinsValue) env.getValue(StarlarkBuiltinsValue.key()); @@ -1023,8 +991,7 @@ private static ConfiguredTargetValue createConfiguredTarget( Preconditions.checkState(env.valuesMissing(), e.getMessage()); return null; } catch (ActionConflictException | InvalidExecGroupException e) { - throw new ConfiguredValueCreationException( - target.getLocation(), e.getMessage(), target.getLabel(), configuration); + throw new ConfiguredValueCreationException(ctgValue, e.getMessage()); } events.replayOn(env.getListener()); @@ -1045,10 +1012,7 @@ private static ConfiguredTargetValue createConfiguredTarget( createDetailedExitCode(event.getMessage()))) .collect(Collectors.toList())); throw new ConfiguredValueCreationException( - target.getLocation(), - "Analysis of target '" + target.getLabel() + "' failed", - configuration, - rootCauses); + ctgValue, "Analysis of target '" + target.getLabel() + "' failed", rootCauses, null); } Preconditions.checkState(!analysisEnvironment.hasErrors(), "Analysis environment hasError() but no errors reported"); @@ -1100,22 +1064,34 @@ static DetailedExitCode getPrioritizedDetailedExitCode(NestedSet causes) } /** - * Used to declare all the exception types that can be wrapped in the exception thrown by {@link - * ConfiguredTargetFunction#compute}. + * {@link ConfiguredTargetFunction#compute} exception that has already had its error reported to + * the user. Callers (like {@link BuildTool}) won't also report the error. */ - private static final class ConfiguredTargetFunctionException extends SkyFunctionException { - ConfiguredTargetFunctionException(ConfiguredValueCreationException e) { - this(e, /*stripMessage=*/ true); + private static class ReportedException extends SkyFunctionException { + private ReportedException(ConfiguredValueCreationException e) { + super(withoutMessage(e), Transience.PERSISTENT); } - private ConfiguredTargetFunctionException( - ConfiguredValueCreationException e, boolean stripMessage) { - // Stripping the message guarantees no caller to ConfiguredTargetFunction can also report it - // to the console (BuildTool does this). This prevents confusing duplicate error output. In - // return, call sites within ConfiguredTargetFunction must remember to dutifully report the - // error. - super(stripMessage ? e.withoutMessage() : e, Transience.PERSISTENT); + /** Clones a {@link ConfiguredValueCreationException} with its {@code message} field removed. */ + private static ConfiguredValueCreationException withoutMessage( + ConfiguredValueCreationException orig) { + return new ConfiguredValueCreationException( + orig.getLocation(), + "", + /*label=*/ null, + orig.getConfiguration(), + orig.getRootCauses(), + orig.getDetailedExitCode()); } + } + /** + * {@link ConfiguredTargetFunction#compute} exception that has not had its error reported to the + * user. Callers (like {@link BuildTool}) are responsible for reporting the error. + */ + private static class UnreportedException extends SkyFunctionException { + private UnreportedException(ConfiguredValueCreationException e) { + super(e, Transience.PERSISTENT); + } } } diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/ConfiguredValueCreationException.java b/src/main/java/com/google/devtools/build/lib/skyframe/ConfiguredValueCreationException.java index 464696d1d2d7f1..a23b02d99af86e 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/ConfiguredValueCreationException.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/ConfiguredValueCreationException.java @@ -13,7 +13,7 @@ // limitations under the License. package com.google.devtools.build.lib.skyframe; -import com.google.devtools.build.lib.analysis.config.BuildConfiguration; +import com.google.devtools.build.lib.analysis.TargetAndConfiguration; import com.google.devtools.build.lib.buildeventstream.BuildEventStreamProtos.BuildEventId; import com.google.devtools.build.lib.causes.AnalysisFailedCause; import com.google.devtools.build.lib.causes.Cause; @@ -41,80 +41,46 @@ public final class ConfiguredValueCreationException extends Exception // that specify the general Code.CONFIGURED_VALUE_CREATION_FAILED private final DetailedExitCode detailedExitCode; - private ConfiguredValueCreationException( + public ConfiguredValueCreationException( Location location, String message, + Label label, @Nullable BuildEventId configuration, - NestedSet rootCauses, - DetailedExitCode detailedExitCode) { + @Nullable NestedSet rootCauses, + @Nullable DetailedExitCode detailedExitCode) { super(message); this.location = location; this.configuration = configuration; - this.rootCauses = rootCauses; - this.detailedExitCode = detailedExitCode; - } - - /** - * Returns a new copy with {@code message} emptied. - * - *

{@link BuildTool} reports exception messages to the console. but {@link - * ConfiguredTargetFunction} handles error reporting internally. Clearing out the message prevents - * both places from reporting it. - */ - public ConfiguredValueCreationException withoutMessage() { - return new ConfiguredValueCreationException( - location, "", configuration, rootCauses, detailedExitCode); - } - - public ConfiguredValueCreationException( - Location location, - String message, - Label currentTarget, - @Nullable BuildConfiguration configuration, - DetailedExitCode detailedExitCode) { - // TODO(bazel-team): the constructors are a bit out of control. Try a builder pattern. - this( - location, - message, - configuration == null ? null : configuration.getEventId(), - NestedSetBuilder.stableOrder() - .add( - new AnalysisFailedCause( - currentTarget, - configuration == null ? null : configuration.getEventId().getConfiguration(), - detailedExitCode)) - .build(), - detailedExitCode); + this.detailedExitCode = + detailedExitCode != null ? detailedExitCode : createDetailedExitCode(message); + this.rootCauses = + rootCauses != null + ? rootCauses + : NestedSetBuilder.stableOrder() + .add( + new AnalysisFailedCause( + label, + configuration == null ? null : configuration.getConfiguration(), + this.detailedExitCode)) + .build(); } public ConfiguredValueCreationException( - Location location, + TargetAndConfiguration ctgValue, String message, - Label currentTarget, - @Nullable BuildConfiguration configuration) { - this(location, message, currentTarget, configuration, createDetailedExitCode(message)); - } - - public ConfiguredValueCreationException( - Location location, - String message, - @Nullable BuildConfiguration configuration, - NestedSet rootCauses, + @Nullable NestedSet rootCauses, @Nullable DetailedExitCode detailedExitCode) { this( - location, + ctgValue.getTarget().getLocation(), message, - configuration == null ? null : configuration.getEventId(), + ctgValue.getLabel(), + ctgValue.getConfiguration() == null ? null : ctgValue.getConfiguration().getEventId(), rootCauses, - detailedExitCode != null ? detailedExitCode : createDetailedExitCode(message)); + detailedExitCode); } - public ConfiguredValueCreationException( - Location location, - String message, - @Nullable BuildConfiguration configuration, - NestedSet rootCauses) { - this(location, message, configuration, rootCauses, createDetailedExitCode(message)); + public ConfiguredValueCreationException(TargetAndConfiguration ctgValue, String message) { + this(ctgValue, message, /*rootCauses=*/ null, /*detailedExitCode=*/ null); } public Location getLocation() { diff --git a/src/test/java/com/google/devtools/build/lib/analysis/BUILD b/src/test/java/com/google/devtools/build/lib/analysis/BUILD index 0b96d3cc620fa8..a0e41a753adc57 100644 --- a/src/test/java/com/google/devtools/build/lib/analysis/BUILD +++ b/src/test/java/com/google/devtools/build/lib/analysis/BUILD @@ -102,6 +102,7 @@ java_library( "//src/main/java/com/google/devtools/build/lib/analysis:starlark/args", "//src/main/java/com/google/devtools/build/lib/analysis:starlark/function_transition_util", "//src/main/java/com/google/devtools/build/lib/analysis:starlark/starlark_custom_command_line", + "//src/main/java/com/google/devtools/build/lib/analysis:target_and_configuration", "//src/main/java/com/google/devtools/build/lib/analysis:test/analysis_failure", "//src/main/java/com/google/devtools/build/lib/analysis:test/analysis_failure_info", "//src/main/java/com/google/devtools/build/lib/analysis:test/instrumented_files_info", diff --git a/src/test/java/com/google/devtools/build/lib/analysis/util/BUILD b/src/test/java/com/google/devtools/build/lib/analysis/util/BUILD index 401e8673ed06c2..9760aa11a3d9b0 100644 --- a/src/test/java/com/google/devtools/build/lib/analysis/util/BUILD +++ b/src/test/java/com/google/devtools/build/lib/analysis/util/BUILD @@ -74,6 +74,7 @@ java_library( "//src/main/java/com/google/devtools/build/lib/analysis:resolved_toolchain_context", "//src/main/java/com/google/devtools/build/lib/analysis:rule_definition_environment", "//src/main/java/com/google/devtools/build/lib/analysis:server_directories", + "//src/main/java/com/google/devtools/build/lib/analysis:target_and_configuration", "//src/main/java/com/google/devtools/build/lib/analysis:test/coverage_report_action_factory", "//src/main/java/com/google/devtools/build/lib/analysis:test/instrumented_files_info", "//src/main/java/com/google/devtools/build/lib/analysis:toolchain_collection", diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/BUILD b/src/test/java/com/google/devtools/build/lib/skyframe/BUILD index 82bbfeeef911a3..2063739c3d1520 100644 --- a/src/test/java/com/google/devtools/build/lib/skyframe/BUILD +++ b/src/test/java/com/google/devtools/build/lib/skyframe/BUILD @@ -145,6 +145,7 @@ java_test( "//src/main/java/com/google/devtools/build/lib/analysis:platform_configuration", "//src/main/java/com/google/devtools/build/lib/analysis:platform_options", "//src/main/java/com/google/devtools/build/lib/analysis:server_directories", + "//src/main/java/com/google/devtools/build/lib/analysis:target_and_configuration", "//src/main/java/com/google/devtools/build/lib/analysis:test/test_configuration", "//src/main/java/com/google/devtools/build/lib/analysis:toolchain_collection", "//src/main/java/com/google/devtools/build/lib/analysis:top_level_artifact_context",