Actually run deprecated targets fixer (Cherry-pick of #18860) #18893
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes #18509 by updating
update-build-files
'smaybe_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 ensuresexperimental_shell_command
is switched toshell_command
andexperimental_run_shell_command
is switched torun_shell_command
.As part of this, I rewrote
renamed_targets_rules.py
to match the current phrasing ofrenamed_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 therenamed_..._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="/"
forrun_shell_command
that I flagged in #18509 (comment). With the current token-based rewrites, doing that seems like a lot of work, although, it would be possible (do something similar torenamed_fields_rules.py
matching parens/brackets and iterate looking for aworkdir=...
field, and updating/inserting it, all packaged up to be vaguely reusable).