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 --group support to uv add and uv remove #8108

Merged
merged 1 commit into from
Oct 16, 2024
Merged

Conversation

zanieb
Copy link
Member

@zanieb zanieb commented Oct 10, 2024

Part of #8090

Adds the ability to add and remove dependencies from arbitrary groups using uv add and uv remove. Does not include resolving with the new dependencies — tackling that in #8110.

Additionally, this does not yet resolve interactions with the existing dev group — we'll tackle that separately as well. I probably won't merge the stack until that design is resolved.

@zanieb zanieb force-pushed the zb/735-add branch 2 times, most recently from a94726f to 9d0e1e0 Compare October 10, 2024 21:17
@zanieb

This comment was marked as outdated.

@zanieb zanieb force-pushed the zb/735-add branch 4 times, most recently from 47fdf22 to fc36784 Compare October 15, 2024 00:25
@zanieb zanieb marked this pull request as ready for review October 15, 2024 00:28
@zanieb zanieb force-pushed the zb/735-add branch 2 times, most recently from 1c476cd to 89efa56 Compare October 15, 2024 18:33
@@ -190,6 +217,49 @@ impl From<Metadata> for RequiresDist {
}
}

fn apply_source_strategy(
Copy link
Member

Choose a reason for hiding this comment

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

I was somewhat surprised that this is only used once. I guess the other "dependency types" (like production) don't match this exact pattern?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I actually moved it out because I thought I would need to apply it twice, like.. to the dev-dependencies group but I ended up structuring things differently. I think we can move it back in, or make it an impl method somewhere.

})
.collect::<Result<Vec<_>, _>>()?;

dependency_groups.into_iter().collect::<BTreeMap<_, _>>()
Copy link
Member

Choose a reason for hiding this comment

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

Does this correctly merge keys? Like if dev is included twice, does this concatenate the values? I sort of think it might replace them...

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 think it probably replaces them, yeah. I wasn't a goal to resolve that here (per the description) since this implemented before I wrote a proposal. I figured I'd write some test cases and address it separately for review purposes.

Base automatically changed from zb/735-read to tracking/735 October 16, 2024 21:34
@zanieb zanieb merged commit f701089 into tracking/735 Oct 16, 2024
5 checks passed
@zanieb zanieb deleted the zb/735-add branch October 16, 2024 21:38
@zanieb zanieb mentioned this pull request Oct 17, 2024
zanieb added a commit that referenced this pull request Oct 18, 2024
Part of #8090

Adds the ability to add and remove dependencies from arbitrary groups
using `uv add` and `uv remove`. Does not include resolving with the new
dependencies — tackling that in #8110.

Additionally, this does not yet resolve interactions with the existing
`dev` group — we'll tackle that separately as well. I probably won't
merge the stack until that design is resolved.
charliermarsh pushed a commit that referenced this pull request Oct 20, 2024
Part of #8090

Adds the ability to add and remove dependencies from arbitrary groups
using `uv add` and `uv remove`. Does not include resolving with the new
dependencies — tackling that in #8110.

Additionally, this does not yet resolve interactions with the existing
`dev` group — we'll tackle that separately as well. I probably won't
merge the stack until that design is resolved.
charliermarsh pushed a commit that referenced this pull request Oct 22, 2024
Part of #8090

Adds the ability to add and remove dependencies from arbitrary groups
using `uv add` and `uv remove`. Does not include resolving with the new
dependencies — tackling that in #8110.

Additionally, this does not yet resolve interactions with the existing
`dev` group — we'll tackle that separately as well. I probably won't
merge the stack until that design is resolved.
charliermarsh pushed a commit that referenced this pull request Oct 22, 2024
Part of #8090

Adds the ability to add and remove dependencies from arbitrary groups
using `uv add` and `uv remove`. Does not include resolving with the new
dependencies — tackling that in #8110.

Additionally, this does not yet resolve interactions with the existing
`dev` group — we'll tackle that separately as well. I probably won't
merge the stack until that design is resolved.
charliermarsh pushed a commit that referenced this pull request Oct 23, 2024
Part of #8090

Adds the ability to add and remove dependencies from arbitrary groups
using `uv add` and `uv remove`. Does not include resolving with the new
dependencies — tackling that in #8110.

Additionally, this does not yet resolve interactions with the existing
`dev` group — we'll tackle that separately as well. I probably won't
merge the stack until that design is resolved.
charliermarsh pushed a commit that referenced this pull request Oct 25, 2024
Part of #8090

Adds the ability to add and remove dependencies from arbitrary groups
using `uv add` and `uv remove`. Does not include resolving with the new
dependencies — tackling that in #8110.

Additionally, this does not yet resolve interactions with the existing
`dev` group — we'll tackle that separately as well. I probably won't
merge the stack until that design is resolved.
zanieb added a commit that referenced this pull request Oct 25, 2024
Part of #8090

Adds the ability to add and remove dependencies from arbitrary groups
using `uv add` and `uv remove`. Does not include resolving with the new
dependencies — tackling that in #8110.

Additionally, this does not yet resolve interactions with the existing
`dev` group — we'll tackle that separately as well. I probably won't
merge the stack until that design is resolved.
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