Skip to content

Commit

Permalink
Delete unused flag
Browse files Browse the repository at this point in the history
The flag has been replaced by the "_validation_transitive" special output group

PiperOrigin-RevId: 389174747
  • Loading branch information
hvadehra authored and copybara-github committed Aug 6, 2021
1 parent d2e8b16 commit e476cc4
Showing 1 changed file with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,10 @@ public final class RuleConfiguredTargetBuilder {
private ImmutableSet<ActionAnalysisMetadata> actionsWithoutExtraAction = ImmutableSet.of();
private final LinkedHashSet<String> ruleImplSpecificRequiredConfigFragments =
new LinkedHashSet<>();
private boolean propagateValidationActionOutputGroup = true;

public RuleConfiguredTargetBuilder(RuleContext ruleContext) {
this.ruleContext = ruleContext;
// Avoid building validations in analysis tests (b/143988346)
propagateValidationActionOutputGroup = !ruleContext.getRule().isAnalysisTest();
add(LicensesProvider.class, LicensesProviderImpl.of(ruleContext));
add(VisibilityProvider.class, new VisibilityProviderImpl(ruleContext.getVisibility()));
}
Expand Down Expand Up @@ -161,7 +159,7 @@ public ConfiguredTarget build() throws ActionConflictException, InterruptedExcep
.getAllArtifacts());
}

if (propagateValidationActionOutputGroup) {
if (propagateValidationActionOutputGroup()) {
propagateTransitiveValidationOutputGroups();
}

Expand Down Expand Up @@ -278,6 +276,10 @@ public ConfiguredTarget build() throws ActionConflictException, InterruptedExcep
generatingActions.getArtifactsByOutputLabel());
}

private boolean propagateValidationActionOutputGroup() {
return !ruleContext.getRule().isAnalysisTest();
}

/** Actually process */
private void handleAllowlistChecker(AllowlistChecker allowlistChecker) {
if (allowlistChecker.attributeSetTrigger() != null
Expand Down Expand Up @@ -652,12 +654,6 @@ public RuleConfiguredTargetBuilder setFilesToBuild(NestedSet<Artifact> filesToBu
return this;
}

/** Sets whether to propagate the validation actions output group. This is true by default. */
public RuleConfiguredTargetBuilder setPropagateValidationActionOutputGroup(boolean propagate) {
this.propagateValidationActionOutputGroup = propagate;
return this;
}

private NestedSetBuilder<Artifact> getOutputGroupBuilder(String name) {
NestedSetBuilder<Artifact> result = outputGroupBuilders.get(name);
if (result != null) {
Expand Down

0 comments on commit e476cc4

Please sign in to comment.