Now that we have the goal `update-build-files`, wo...
# general
Now that we have the goal
, would you find it helpful to have automated support for renaming targets and updating all their references? Something like this maybe:
Copy code
rename_targets = { path/to:original_name = path/to:new_name }
Pants will update all references to the target, e.g. in the
field. How often do you find yourself renaming targets? (Utility probably depends on how much you use dependency inference)
cc @proud-dentist-22844, and cc @clean-city-64472 because you're mostly using explicit dependencies instead of dep inference
Its for Bazel constructs and not ours, but in case this prior art was not known:
This doesn't come up much for us. We are going to work on moving to dep inference in any event.
👍 1
I could have used this quite a bit while developing some of my plugins. I changed the target name several times before I was satisfied.
oh. You are talking about the
bit, not the name of the target itself. Yeah, I think that could be quite handy. Could I use globs?
update-build-files doesn't need permanent config however. So I wonder if we shouldn't have an argument that passes in a separate file with "instructions" for making the transformations (like rename_targets). That way it won't get merged as part of pants.toml