uv
67d8805c - uv-toolchain: use colocated temporary directory (#3240)

Commit
1 year ago
uv-toolchain: use colocated temporary directory (#3240) Previously, this would use the "system" temporary directory. Because we rename the resulting directory to its final destination, and because renaming is implemented via hardlinking, and because hardlinking doesn't work across mount points, and because /tmp is commonly on a different mount point than where `uv` is checked out, we "fix" this by putting the temporary directory somewhere close to the final destination of the fetched artifact. There are alternatives we might consider pursuing. For example, if the `rename` fails, then we should probably do a recursive directory copy. But this is a quick fix for now and it also consistent with colocation of other temporary directories in `uv`. The main downside of this change is that if a user does ^C while `uv-dev fetch-python` is running, then there is no mechanism for cleaning up temporary directories.
Author
Parents
Loading