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

loud-laptop-17949

01/27/2023, 10:37 PM
I am having trouble with the
export
goal that I can't seem to figure out. Earlier today I deleted my local pants caches and now when I run
./pants export --resolve=default
the symlink in the dist directory links to a non-existent directory in ~/.caches. Running
./pants export ::
to export all resolves does not seem to have this problem.
h

happy-kitchen-89482

01/27/2023, 10:51 PM
Which Pants version is this? I think there were some fixes to this recently
l

loud-laptop-17949

01/28/2023, 12:44 AM
2.15rc2
h

happy-kitchen-89482

01/29/2023, 4:26 PM
Does this happen in 2.16.0.dev5?
l

loud-laptop-17949

01/30/2023, 5:14 AM
i will try it tomorrow
it seems maybe ok in 2.16
let me go through another round of testing (slow bc it requires deleting all the local caches)
yeah seems fine on 2.16.0.dev5 even with an empty cache
usually deleting named_caches will cause this problem
h

happy-kitchen-89482

02/01/2023, 5:11 PM
Cool, I recall fixing some issues that seem related to this, so maybe this is OK now, fingers crossed
l

loud-laptop-17949

02/01/2023, 5:40 PM
Yeah but do we need to cherry pick something to the 2.15 branch? I don't want to block 2.15.0, but getting something in 2.15.1 would be nice
I can try bisecting, but testing is quite slow, because it requires deleting the cache (I think)
h

happy-kitchen-89482

02/02/2023, 11:41 PM
I'm not sure that's it specifically. There were several changes to how export works, I think this might have been fixed across that set of changes.
Let me see if I can isolate a bugfix into 2.15.x
That symlinking logic does assume that the cache won't be pulled out from under it
I mean, when creating the symlink we should verify that its target exists, of course. But if a user is in the habit of deleting the cache then they may do so after we create the symlink, in which case we have no recourse.
You could try and using the option to create a new venv instead of symlinking. It will be slower, but maybe not enough to matter?
l

loud-laptop-17949

02/03/2023, 7:23 PM
yeah I tested that and it appears to work, but for our default resolve its much, much slower
on a warm cache it goes form seconds to minutes
h

happy-kitchen-89482

02/03/2023, 7:54 PM
Yikes
That is enough to matter...
Can you open a ticket with some exact repro steps, and I'll root-cause this and port just the fix to 2.15.x
l

loud-laptop-17949

02/03/2023, 8:47 PM
sure
3 Views