forked from pantsbuild/pants
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Actually run deprecated targets fixer (pantsbuild#18860)
This fixes pantsbuild#18509 by updating `update-build-files`'s `maybe_rename_deprecated_targets` rule to run the deprecated target fixers: previously, that rule was accidentally rerunning the deprecated _fields_ fixers and deprecated targets weren't being fixed. This fix ensures `experimental_shell_command` is switched to `shell_command` and `experimental_run_shell_command` is switched to `run_shell_command`. As part of this, I rewrote `renamed_targets_rules.py` to match the current phrasing of `renamed_fields_rules.py`: without doing that, I was getting graph errors. I suspect there was smaller rewrites that would've worked, but it didn't seem unreasonable to have both the `renamed_..._rules.py` files basically match from top to bottom, with only the type names and transformation details differing. This _doesn't_ do the update to `workdir="/"` for `run_shell_command` that I flagged in pantsbuild#18509 (comment). With the current token-based rewrites, doing that seems like a lot of work, although, it would be possible (do something similar to `renamed_fields_rules.py` matching parens/brackets and iterate looking for a `workdir=...` field, and updating/inserting it, all packaged up to be vaguely reusable).
- Loading branch information
Showing
3 changed files
with
32 additions
and
23 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