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

Gate discovery of managed toolchains with preview #3835

Merged
merged 1 commit into from
May 27, 2024

Conversation

zanieb
Copy link
Member

@zanieb zanieb commented May 25, 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.

@zanieb zanieb added the preview Experimental behavior label May 25, 2024
@zanieb zanieb marked this pull request as ready for review May 25, 2024 14:08
@zanieb zanieb force-pushed the zb/toolchain-preview-mode branch 2 times, most recently from 98c39c7 to 3f02b9d Compare May 25, 2024 14:09
@zanieb zanieb requested a review from charliermarsh May 25, 2024 14:10
@zanieb zanieb force-pushed the zb/toolchain-preview-mode branch from 3f02b9d to 35d0714 Compare May 25, 2024 14:11
Self::VirtualEnv => f.write_str("virtual environments"),
Self::System => {
// TODO(zanieb): We intentionally omit managed toolchains for now since they are not public
Self::System(preview) => {
Copy link
Member Author

Choose a reason for hiding this comment

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

I'll probably rethink this display in a future change.

Comment on lines -415 to +416
let sources = SourceSelector::All;
let sources = SourceSelector::All(PreviewMode::Enabled);
Copy link
Member Author

Choose a reason for hiding this comment

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

We turn on preview so we discover managed toolchains when finding the Python versions requested by tests.

@charliermarsh charliermarsh force-pushed the zb/data-dir-toolchain branch from 9517162 to 8f2c59b Compare May 27, 2024 03:43
Base automatically changed from zb/data-dir-toolchain to main May 27, 2024 03:54
@charliermarsh charliermarsh force-pushed the zb/toolchain-preview-mode branch from 35d0714 to e84bbf7 Compare May 27, 2024 03:55
Copy link
Member

@charliermarsh charliermarsh left a comment

Choose a reason for hiding this comment

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

Looks reasonable to me.

@charliermarsh charliermarsh enabled auto-merge (squash) May 27, 2024 03:57
@charliermarsh charliermarsh merged commit 31b0ff6 into main May 27, 2024
46 checks passed
@charliermarsh charliermarsh deleted the zb/toolchain-preview-mode branch May 27, 2024 04:05
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.

2 participants