Now that we have the goal `update-build-files`, wo...
# general
h
Now that we have the goal
update-build-files
, would you find it helpful to have automated support for renaming targets and updating all their references? Something like this maybe:
Copy code
[update-build-files]
rename_targets = { path/to:original_name = path/to:new_name }
Pants will update all references to the target, e.g. in the
dependencies
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
e
Its for Bazel constructs and not ours, but in case this prior art was not known: https://github.com/bazelbuild/buildtools/tree/master/buildozer
1
c
This doesn't come up much for us. We are going to work on moving to dep inference in any event.
👍 1
p
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
name=
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
1