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 authored and copybara-github committed Jan 23, 2024
1 parent e4610ca commit d083f3d
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1269,8 +1269,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
? pkgBuilder.getLabelConverter()
: currentRuleClass.getLabelConverterForInitializer());
kwargs.putEntry(nativeName, reifiedValue);
}
}
Expand Down

0 comments on commit d083f3d

Please sign in to comment.