Can relocated_files be used with resources in a co...
# general
c
Can relocated_files be used with resources in a configurable way? If not, is there a way to add resources to a pex to a specific place without physically locating them in the source directory? I need to have them available as a separate directory, and in the pex they should have some directories trimmed. Right now I get them with the same directory structure as in the repository.
b
Nope. You'll have to author a plugin for that 😠 This is my #1 gripe with Pants and I have a proposal to address it, but it's a large undertaking as it changes how Pants intuits dependencies in general
c
Ok, thanks!
Before I dig myself a hole too big to get out of 🙂 could symlinks work?
b
I wouldn't try and get too clever using symlinks. We just added Pants symlink support in 2.16.x. So it might break in the future
👍🏽 1
c
This is my #1 gripe with Pants and I have a proposal to address it, but it's a large undertaking as it changes how Pants intuits dependencies in general
Do you mean that if we graft are able resources in different random places, it becomes unclear if a target above one of these places should affect them too or not (for example with things like defaults)? And possibly other similar issues.
b
The issue I'm referring to is just the delineator of file v resource at declaration time
c
Aha, I think I see it. If I understand correctly, for python it's probably not a big problem, but for go and java it's significant. Well, maybe in Pants v3!