is there any way to automatically strip the whole ...
# general
g
is there any way to automatically strip the whole working directory in a
relocated_files
target, meaning I want to set
src='{cwd}', dest=''
rather than having to write out the boilerplate myself
I assume since they're just python files (technically) there's prob a way to do this
h
There is not atm. In v1 there was with
buildfile_path
, but it didn't make it to v2. (It also used absolute paths which aren't useful) https://github.com/pantsbuild/pants/pull/12746/files I think this would be useful to add back though, and
cwd()
is a good name imo! Would you be willing to please open a ticket at https://github.com/pantsbuild/pants/issues/new/choose? Some of these APIs are changing very soon, so we'll need to do a little thinking of the best way to implement Lmk also if you are interested in getting this working in your repo today. It's only copying and pasting a little of the PR above. But disclaimer, this might stop working in Pants 2.12 when we are able to make the API changes we want
g
nah, it's not that big of a deal, I was just wondering if there was either a) something undocumented or b) I wasn't able to find the documentation
I'll open a ticket
ticket: https://github.com/pantsbuild/pants/issues/14757 let me know if anything is unclear or needs to be edited
❤️ 1
h
@gentle-guitar-84783 good news, this was super easy to implement and it's safe with the upcoming changes we're making to that old macro system. This will be in Pants 2.11.0rc0, which we hope to release today https://github.com/pantsbuild/pants/issues/14757
💯 1
g
That's awesome, thanks so much Eric!