-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework how maven project jars are calculated (#475)
Previously, we assumed that all the information required for a project all code to be included was inside the main repository. This was put in place largely to prevent code depending on `rules_proto` from pulling in the classes from protobuf itself. Issue #448 demonstrated that this assumption wasn't correct. We now gather all the JavaInfos that should be included in the artifact, as well as those of dependencies of the artifact (called "dep_infos" in the MavenInfo provider) We then calculate the difference of those sets to determine the input files to add to the generated project jar. However, this is not sufficient on its own in the case of protocbuf. As such, we also scan for classes to exclude from the project jar by examaning the contents of the "dep_infos" runtime jars. Furthermore, jars that are created by aspects have no way of expressing what their maven dependencies are. To work around this, rules may now express `MavenHintInfo` which will be used to help calculate the contents of the artifact jars and maven dependencies.
- Loading branch information
Showing
4 changed files
with
212 additions
and
77 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
Oops, something went wrong.