-
-
Notifications
You must be signed in to change notification settings - Fork 607
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[internal] Refactor
GenerateJvmLockfileFromTool
to work with `scala…
…c_plugins.py` (#14230) When we have a tool lockfile, we must have a rule that goes from a subclass of `GenerateToolLockfileSentinel -> GenerateJvmLockfile`. To accommodate that `[tool].artifacts` can be either coordinate strings or addresses to `jvm_artifact` targets, we had an intermediate `GenerateJvmLockfileFromTool` type to do that normalization. But, `scalac_plugins.py` does not use a normal `JvmToolBase`, so the original factoring did not work. We were duplicating the setup and violating DRY. Now, when you have a tool, we have one single way to set up the `GenerateJvmLockfile` for that tool. -- Note that I tried to inline `GatherJvmCoordinatesRequest` in the `GenerateJvmLockfileFromTool` rule, but we can't because we use it for a non-lockfile usage: https://github.com/pantsbuild/pants/blob/c184d0af42a6670bdd43da12f10d7c59c100144e/src/python/pants/backend/codegen/protobuf/scala/rules.py#L239-L254 [ci skip-rust]
- Loading branch information
1 parent
949c307
commit 0006cde
Showing
13 changed files
with
104 additions
and
111 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
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
Oops, something went wrong.