https://pantsbuild.org/ logo
#general
Title
# general
c

cold-vr-15232

12/13/2022, 9:18 PM
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

bitter-ability-32190

12/13/2022, 9:21 PM
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

cold-vr-15232

12/13/2022, 9:24 PM
Ok, thanks!
Before I dig myself a hole too big to get out of 🙂 could symlinks work?
b

bitter-ability-32190

12/13/2022, 9:36 PM
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

cold-vr-15232

12/13/2022, 10:01 PM
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

bitter-ability-32190

12/13/2022, 10:02 PM
The issue I'm referring to is just the delineator of file v resource at declaration time
c

cold-vr-15232

12/13/2022, 10:23 PM
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!
4 Views