Repository navigation
Conversation
|
+1 on my side. Setting the venv cache in the same filesystem of the UV cache is what you want to do anyway to get decent performance. I will also mention that the calculation of the path within the cache is a good idea in my opinion, and that's what I've been using for the past year or so. |
Will do. The XDG_CACHE_DIR in the spec was really a placeholder b/c I'm not sure what the uv internals look like. I'm sure there is some kind of "global" or context object that takes all env vars and settings into account and provides a
I understand this to mean that you affirm the "Human‑readable slug + short hash" approach. Please correct my understanding if needed. Thanks for the feedback. |
|
I figured I'd give this another few days for comments and then address them all and update the proposal. Where there are different preferences expressed, my intention is to make a reasonable decision with the MVP goal in mind, aware that it may potentially not satisfy everyone, giving preference to input given by current uv contributors. If there is a "designated" decision maker for something like this in the uv org, they are welcome to step into the decision making role at any point and I'll take a step back. Thanks everyone. |
|
This looks over-engineered and not like a MVP. See my comments here. |
|
I've updated the proposal based on the feedback/discussion here. Thoughts? |
|
Any thoughts on my updated proposal? Is there a formal approval process? If not, at what point it it safe to start the implementation? |
|
@rsyring Regarding: Sorry, but I'm not happy with your proposal, as it lacks clarity and I fail to see how it would help the current implementation. I'm also worried about the Also, the So can you please update us on what exactly is the new proposal and what functionality it provides that simplifies life to the user, via UX? |
|
@eabase I can appreciate that you don't prefer this proposal. However, I did process your previous comments on this issue and I believe they are all addressed in the "Out of Scope / Rejections" section. I don't plan on doing any additional work on this proposal until someone from Astral gives some definitive feedback. While I think this PR/idea had some momentum originally, the momentum/interest has seemed to die. And I don't want to put more time into it unless there is the possibility of an implementation somewhere in the near-term. If we get that feedback, and it aligns with your concerns/preferences, I'm happy to take another stab at revising the proposal. Thanks. |
That's exactly my point of my last comment. I don't understand what you mean with |
In the design doc, the final section of the document is "Out of Scope / Rejections." That section lists items that I considered but decided were out of scope or am rejecting for this proposal. For example, I don't think we should be concerned with the accidental deletion of virtualenvs in the cache and I give my reasoning in that section. Hope that helps. |
| - This is not limited to the venv-in-cache feature | ||
| - E.g.: `print($uv_venv_dir)` | ||
| 1. Cache cleanup | ||
| - `uv cache clean` removes all venvs |
There was a problem hiding this comment.
uv cache clean already exists and has functionality (remove all cache).
I think there should be a dedicated command for this - which cleans all environments - but leaves the actual cache in place (under the assumption that centralized venvs are combined with local venvs).
There was a problem hiding this comment.
I think there should be a dedicated command for this
I agree that would be preferable.
However, in this iteration, I specifically didn't address this because I wanted to avoid specifications that would lead to additional debate or work and, perhaps, delay the initial implementation.
IMO, there are two functions that uv could provide:
- clean: completely delete all centralized venvs
- prune: delete any centralized venv where the venv's project directory (which is tracked in
$venv_dir/uv-project-path.txt) no longer exists
Where in the CLI those functions live is what I thought could lead to delay. Options I've considered:
uv venv --cache-cleanuv venv --cache-pruneuv cache clean --venvs/--no-venvsuv cache prune --venvs/--no-venvsuv cache venvs cleanuv cache venvs prune
With my preference being the last two.
There was a problem hiding this comment.
I'm not sure i agree on your "delay implementation" stance - the current proposal to overload an existing command (without optionality, from the proposal) can have the adverse effect and (at least in my opinion / view) can/could lead to more discussions.
I think these options could be listed as "alternatives" at least - giving astral folks the option to pick the one they prefer"?
Currently it's "we'll use uv cache clean." - if that doesn't fit their plans / UX view - there's no considered alternatives listed (outside of the above comment).
Centralized environment keys use lexical workspace paths, so reaching one project through a directory symlink creates a second environment and reinstalls its dependencies. Canonicalize workspace identity before selecting the centralized environment, preserving the single-environment expectation from the centralized-environment design in [uv#14628](#14628) and [uv#18214](#18214).
refs: #1495 (comment)