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 uv init --virtual #5396

Merged
merged 3 commits into from
Jul 24, 2024
Merged

Add uv init --virtual #5396

merged 3 commits into from
Jul 24, 2024

Conversation

j178
Copy link
Contributor

@j178 j178 commented Jul 24, 2024

Summary

Add uv init --virtual to create an explicit virtual workspace.

Relates to #5338

Comment on lines 998 to 999
"Nested workspaces are not supported, but outer workspace includes existing workspace: `{}`",
pyproject_toml_path.user_display().cyan(),
outer_workspace_root.simplified_display().cyan(),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Running from the current directory, this message is "Nested workspaces are not supported, but outer workspace includes existing workspace: ``", seems not clear.

Copy link
Member

Choose a reason for hiding this comment

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

Good call.

@j178 j178 marked this pull request as ready for review July 24, 2024 04:46
fn init_virtual_workspace(path: &Path, isolated: bool) -> Result<()> {
// Check nested workspaces.
if !isolated {
check_nested_workspaces(path, &DiscoveryOptions::default());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we warn or abort if nested workspace detected?

Copy link
Member

Choose a reason for hiding this comment

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

I think warn is ok.

@charliermarsh charliermarsh self-assigned this Jul 24, 2024
@charliermarsh charliermarsh added enhancement New feature or request preview Experimental behavior labels Jul 24, 2024
@charliermarsh charliermarsh enabled auto-merge (squash) July 24, 2024 18:45
@charliermarsh charliermarsh merged commit 7bcafec into astral-sh:main Jul 24, 2024
55 checks passed
@j178 j178 deleted the virtual branch July 25, 2024 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request preview Experimental behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants