Skip to content

Commit

Permalink
Reify outputs of initializer within the package
Browse files Browse the repository at this point in the history
The labels need to be local to the package. Setting them in an initializer was broken.

PiperOrigin-RevId: 600863492
Change-Id: I0561f43273a62db3b9e823ec3b49734b380da878
  • Loading branch information
comius committed Feb 7, 2024
1 parent f9534d3 commit ecacc5f
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1134,8 +1134,11 @@ public Object call(StarlarkThread thread, Tuple args, Dict<String, Object> kwarg
currentRuleClass.getName(),
attr,
value,
// Reify to the location of the initializer definition
currentRuleClass.getLabelConverterForInitializer());
// Reify to the location of the initializer definition (except for outputs)
attr.getType() == BuildType.OUTPUT
|| attr.getType() == BuildType.OUTPUT_LIST
? pkgContext.getBuilder().getLabelConverter()
: currentRuleClass.getLabelConverterForInitializer());
kwargs.putEntry(nativeName, reifiedValue);
}
}
Expand Down

0 comments on commit ecacc5f

Please sign in to comment.