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

uv tree: include workspace members in roots #7887

Closed
wants to merge 2 commits into from

Conversation

j178
Copy link
Contributor

@j178 j178 commented Oct 3, 2024

Summary

For a workspace, when one member depends on another, uv tree and uv tree --package does not show the denpendent member.

For example:

$ uv init project
$ cd project
$ uv init foo
$ uv init bar
$ uv add --package foo bar
$ uv tree
Resolved 3 packages in 4ms
foo v0.1.0
└── bar v0.1.0
project v0.1.0
$ uv tree --package bar
Resolved 3 packages in 5ms

This PR makes sure workspace members are always included in the roots, even if they are dependencies, so uv tree will display them as roots.

After this PR:

$ cargo run -- tree
Resolved 3 packages in 11ms
bar v0.1.0
foo v0.1.0
└── bar v0.1.0
project v0.1.0
$ cargo run -- tree --package bar
Resolved 3 packages in 9ms
bar v0.1.0

@j178 j178 changed the title uv tree: include workspace memebers in roots uv tree: include workspace members in roots Oct 3, 2024
@j178 j178 marked this pull request as ready for review October 3, 2024 13:19
@charliermarsh
Copy link
Member

Should we just get rid of non_roots entirely then, and rely solely on the list of members?

@j178 j178 marked this pull request as draft October 4, 2024 14:06
@j178 j178 closed this Oct 25, 2024
@j178 j178 deleted the tree-member branch November 6, 2024 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants