Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add persistent storage of installed toolchains #3797

Merged
merged 5 commits into from
May 27, 2024

Conversation

zanieb
Copy link
Member

@zanieb zanieb commented May 23, 2024

Extends #3726

Moves toolchain storage out of UV_BOOTSTRAP_DIR (./bin) into the proper user data directory as defined by #3726.

Replaces UV_BOOTSTRAP_DIR with UV_TOOLCHAIN_DIR for customization. Installed toolchains will be discovered without opt-in, but the idea is still that these are not yet user-facing.

@zanieb zanieb added the preview Experimental behavior label May 23, 2024
@zanieb zanieb force-pushed the zb/data-dir-toolchain branch 4 times, most recently from 33cbd0d to 9843b5b Compare May 23, 2024 18:13
@zanieb
Copy link
Member Author

zanieb commented May 23, 2024

I'm going to write a TestContext for uv-interpreter to make the setup less complicated (#3832)

@zanieb zanieb marked this pull request as ready for review May 23, 2024 21:22
@zanieb
Copy link
Member Author

zanieb commented May 23, 2024

There's an open question about versioning. We probably shouldn't just discard old buckets like we do in the cache. Maybe we can version and write explicit migrations?

@zanieb zanieb changed the base branch from zb/data-dir to main May 24, 2024 15:20
@zanieb
Copy link
Member Author

zanieb commented May 24, 2024

Updated to include #3726 which wouldn't pass CI otherwise since it was unused.

@zanieb zanieb force-pushed the zb/data-dir-toolchain branch 2 times, most recently from 0454869 to 9517162 Compare May 24, 2024 15:35
@@ -144,7 +144,6 @@ jobs:

- name: "Cargo test"
run: |
export UV_BOOTSTRAP_DIR="$(pwd)/bin"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@charliermarsh charliermarsh enabled auto-merge (squash) May 27, 2024 03:47
@charliermarsh charliermarsh merged commit 30e780e into main May 27, 2024
46 checks passed
@charliermarsh charliermarsh deleted the zb/data-dir-toolchain branch May 27, 2024 03:54
charliermarsh pushed a commit that referenced this pull request May 27, 2024
Prepares for merge of #3797, gating
managed toolchain discovery with the preview flag to lower risk of
releasing.

e.g.

```
❯ cargo dev -q fetch-python         
❯ cargo run -q -- venv --python 3.11
Using Python 3.11.9 interpreter at: /opt/homebrew/opt/python@3.11/bin/python3.11
Creating virtualenv at: .venv
Activate with: source .venv/bin/activate
❯ cargo run -q -- venv --preview --python 3.11
Using Python 3.11.7 interpreter at: /Users/zb/Library/Application Support/uv/toolchains/cpython-3.11.7-macos-aarch64-none/install/bin/python3
Creating virtualenv at: .venv
Activate with: source .venv/bin/activate
```

We'll add automatic fetching of managed interpreters later.
charliermarsh pushed a commit that referenced this pull request May 27, 2024
Follow-up to #3797 to clean up the
test isolation in `uv-interpreter`.

I still want to expose a CLI at some point like `uv python <...>` for
discovery and test from there, hopefully this will make that transition
simpler.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview Experimental behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants