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 --isolated support to uv run #5471

Merged
merged 1 commit into from
Jul 30, 2024
Merged

Add --isolated support to uv run #5471

merged 1 commit into from
Jul 30, 2024

Conversation

charliermarsh
Copy link
Member

@charliermarsh charliermarsh commented Jul 26, 2024

Summary

The culmination of #4730. We now have uv run --isolated which always uses a fresh environment (but includes the workspace dependencies as needed). This enables you to test with strict isolation (e.g., uv run --isolated -p foo will ensure that foo is unable to import anything that isn't an actual dependency).

Closes #5430.

@charliermarsh charliermarsh added cli Related to the command line interface preview Experimental behavior labels Jul 26, 2024
/// Run the tool in an isolated virtual environment, rather than leveraging the base environment
/// for the current project, to enforce strict isolation between dependencies.
#[arg(long)]
pub isolate: bool,
Copy link
Member Author

Choose a reason for hiding this comment

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

Explaining the difference between --isolate and --no-workspace is fairly nuanced, though I believe that both are necessary, they serve very different purposes.

Base automatically changed from charlie/isolate to main July 30, 2024 19:09
@charliermarsh charliermarsh enabled auto-merge (squash) July 30, 2024 19:20
@charliermarsh charliermarsh enabled auto-merge (squash) July 30, 2024 19:20
@charliermarsh charliermarsh changed the title Add --isolate support to uv run Add --isolated support to uv run Jul 30, 2024
@charliermarsh charliermarsh enabled auto-merge (squash) July 30, 2024 19:25
@charliermarsh charliermarsh merged commit 67b3bfa into main Jul 30, 2024
57 checks passed
@charliermarsh charliermarsh deleted the charlie/isolate-run branch July 30, 2024 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Related to the command line interface preview Experimental behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add --isolate or --standalone or similar flag to uv run
3 participants