I am having trouble with the `export` goal that I ...
# general
l
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
Which Pants version is this? I think there were some fixes to this recently
l
2.15rc2
h
Does this happen in 2.16.0.dev5?
l
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
Cool, I recall fixing some issues that seem related to this, so maybe this is OK now, fingers crossed
l
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
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
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
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
sure