Skip to content

Commit 499f461

Browse files
ngorogiannisfacebook-github-bot
authored andcommitted
disable RE for CxxInferCaptureTransitiveRule
Summary: CxxInferCaptureTransitiveRule is uncacheable (fixed recently) and should not run on RE as it manipulates absolute paths. The absolute paths are a design bug (it dates back to more than 6-7 years); this diff is a workaround until we fix this. The upshot is that this rule is pointless to RE as it basically just concatenates a list of outputs. Reviewed By: martintrojer fbshipit-source-id: 6bc19c494d92c729913e550d21d3bb07eef1e016
1 parent 239e850 commit 499f461

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

src/com/facebook/buck/cxx/CxxInferCaptureTransitiveRule.java

+4-6
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,8 @@ public CxxInferCaptureTransitiveRule(
5050
BuildTarget buildTarget,
5151
ProjectFilesystem filesystem,
5252
SourcePathRuleFinder ruleFinder,
53-
ImmutableSet<CxxInferCaptureRule> captureRules,
54-
boolean executeRemotely) {
55-
super(buildTarget, filesystem, ruleFinder, new Impl(captureRules, executeRemotely));
53+
ImmutableSet<CxxInferCaptureRule> captureRules) {
54+
super(buildTarget, filesystem, ruleFinder, new Impl(captureRules));
5655
}
5756

5857
@Override
@@ -77,15 +76,14 @@ static class Impl
7776
/** Whether or not infer rules can be executed remotely. Fails serialization if false. */
7877
@AddToRuleKey
7978
@CustomFieldBehavior(RemoteExecutionEnabled.class)
80-
private final boolean executeRemotely;
79+
private final boolean executeRemotely = false;
8180

82-
public Impl(ImmutableSet<CxxInferCaptureRule> captureRules, boolean executeRemotely) {
81+
public Impl(ImmutableSet<CxxInferCaptureRule> captureRules) {
8382
this.output = new OutputPath(OUTPUT_PATH);
8483
this.captureRulesOutputs =
8584
captureRules.stream()
8685
.map(CxxInferCaptureRule::getSourcePathToOutput)
8786
.collect(ImmutableSet.toImmutableSet());
88-
this.executeRemotely = executeRemotely;
8987
}
9088

9189
@Override

src/com/facebook/buck/cxx/CxxInferEnhancer.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,7 @@ private BuildRule requireAllTransitiveCaptureBuildRules(
169169
ImmutableSet<CxxInferCaptureRule> captureRules = aggregator.getAllTransitiveCaptures();
170170

171171
return graphBuilder.addToIndex(
172-
new CxxInferCaptureTransitiveRule(
173-
target, filesystem, graphBuilder, captureRules, inferConfig.executeRemotely()));
172+
new CxxInferCaptureTransitiveRule(target, filesystem, graphBuilder, captureRules));
174173
}
175174

176175
private CxxInferCaptureRulesAggregator requireInferCaptureAggregatorBuildRuleForCxxDescriptionArg(

0 commit comments

Comments
 (0)