Repository navigation
Conversation
uv remove
e8621a2 to
355b08d
Compare
uv removeuv remove
This comment has been minimized.
This comment has been minimized.
|
I found this sort of helpful as the calculation of "which candidates to uninstall": |
|
I think the idea here is reasonable although there are still cases that it would get "wrong" in practice, e.g.:
These are, of course, rare, especially in projects. I do wonder if the complexity is worth it as compared to just disabling the sync step in |
|
I think it's valuable that
I think this is an acceptable trade-off for me. Though we could record if a package was installed via a sync to track and account for this. That might be desirable metadata anyway? |
|
Oh I think we can make that work if we fix #13278 |
a757fb1 to
2b65306
Compare
| fn remove_prune_graph() { | ||
| let context = uv_test::test_context!("3.12"); | ||
| let server = PackseServer::new("extras/remove-prune-extra.toml"); | ||
|
|
||
| uv_snapshot!(context.filters(), command(&context, &server) | ||
| , @" | ||
| success: false | ||
| exit_code: 2 | ||
| ----- stdout ----- | ||
|
|
||
| ----- stderr ----- | ||
| error: the following required arguments were not provided: | ||
| <PACKAGE|--requirements <REQUIREMENTS>|--editable <EDITABLE>|--group <GROUP>> | ||
|
|
||
| Usage: uv pip install --cache-dir [CACHE_DIR] --index-url <INDEX_URL> <PACKAGE|--requirements <REQUIREMENTS>|--editable <EDITABLE>|--group <GROUP>> | ||
|
|
||
| For more information, try '--help'. | ||
| "); | ||
| } |
There was a problem hiding this comment.
This is clearly problematic?
I think we might need a precursor pull request that let's us mark a scenario as "no autogen test"
|
There's some quadratic behavior here that the security scanner found, but I don't think it's an actual security issue - worth fixing though:
Edit: oh I realize #20289 is about addressing this, but I don't think it does so fully |
|
Oh #20289 wasn't an attempt to resolve performance issues, it was just a sketch of combining implementations. I can look into both though. |
221e529 to
a404861
Compare
Merging this PR will not alter performance
Comparing Footnotes
|
| let mut filters = context.filters(); | ||
| filters.push((r"(?m)^WARN Range requests not supported[^\n]*\n", "")); |
There was a problem hiding this comment.
This also seems like it needs a precursor pull. We should fix this in the packse server?
There was a problem hiding this comment.
A downside of this approach is we don't get the nice packse rendering of the dependency tree which is generally really helpful for understanding what's going on. Maybe we can render it in markdown and reference it? This should be a separate pull stacked on the above but not a fresh base for the uv remove changes.
31f41ba to
beef924
Compare
beef924 to
363cc61
Compare
7ddf72e to
3477a91
Compare
363cc61 to
c352d06
Compare
56d4166 to
d3fad3f
Compare
c352d06 to
68daee0
Compare
d3fad3f to
5c3b43f
Compare
68daee0 to
ac76f18
Compare
5ff5ea4 to
55ca934
Compare
589134a to
97edf0c
Compare
55ca934 to
77464f5
Compare
77464f5 to
bc90934
Compare
bc90934 to
0db46ce
Compare
uv removeperforms an exact sync, so removing a dependency can also uninstall unrelated packages from previously selected groups or extras.Limit removal to the removed dependencies and their transitive dependencies that are no longer required by the project or another installed package. Determine removal candidates from the previous lockfile and installed metadata, while retaining packages needed by any remaining project group or extra.
Closes #9012
Closes #12827