-
Notifications
You must be signed in to change notification settings - Fork 304
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set test sources bit correctly for generated source jars.
Generated source jars should have their test bit set according to the target that generated them. Failure to do so results in the IDE failing to resolve references from the generated code to regular code in the same target, since the IDE thinks the generated code is not test code (so cannot access test code). This requires changing the way that we handle generated source jars. Previously, we wrote them all to a cache directory, then used the directory contents to update the project proto. Doing it this way means we loose information about the origin of the jar file, so we cannot map it back to the target that generated it to determine if it's a test target. Instead, take the set of generated source jars directly from the `ArtifactInfo` protos that we have from previous dependency builds, and then map the build artifact paths to cache paths using the cache layout. This allows us to look up the "is test" but using the corresponding build graph data and the project definition therein. PiperOrigin-RevId: 586646320
- Loading branch information
1 parent
da499b2
commit 4f71f12
Showing
6 changed files
with
90 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters