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 support for reading and resolving include-group in dependency groups #8266

Merged
merged 2 commits into from
Oct 17, 2024

Conversation

zanieb
Copy link
Member

@zanieb zanieb commented Oct 16, 2024

Part of #8090

Adds the ability to read group inclusions (include-group = <name>) in the pyproject.toml. Resolves groups into concrete dependencies for resolution.

See #8110 for a bit more commentary on deferred work.

@zanieb zanieb changed the title Add support for reading include-group in dependency groups Add support for reading and resolving include-group in dependency groups Oct 16, 2024
Table {
/// The name of the group to include
include_group: Option<String>,
},
Copy link
Member

Choose a reason for hiding this comment

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

Do we... want a catch-all variant? So we can catch other objects that are added in the future...? (We might want to error in that case anyway.)

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'm not sure. Sounds like a nice property sometimes? We don't do this elsewhere in the pyproject.toml do we?

Copy link
Member

Choose a reason for hiding this comment

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

Ok the current structure is pretty strict... It rejects empty tables, extra fields, and missing include_group... It does match the reference implementation: https://peps.python.org/pep-0735/#reference-implementation. But I'd say what I have here is too strict though since we're doing eager validation. I think we should just warn if we see unsupported groups.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds good to me.

@charliermarsh
Copy link
Member

As discussed gonna take this one over, will push to this branch.

crates/uv/tests/it/lock.rs Outdated Show resolved Hide resolved
Base automatically changed from zb/735-sync-lock to tracking/735 October 16, 2024 22:53
@charliermarsh charliermarsh force-pushed the zb/735-read-include branch 3 times, most recently from 02021d1 to ab11585 Compare October 16, 2024 23:36
@charliermarsh charliermarsh marked this pull request as ready for review October 16, 2024 23:36
@charliermarsh charliermarsh merged commit 2f973ad into tracking/735 Oct 17, 2024
61 checks passed
@charliermarsh charliermarsh deleted the zb/735-read-include branch October 17, 2024 00:11
@zanieb zanieb mentioned this pull request Oct 17, 2024
zanieb added a commit that referenced this pull request Oct 18, 2024
…roups (#8266)

Part of #8090

Adds the ability to read group inclusions (`include-group = <name>`) in
the `pyproject.toml`. Resolves groups into concrete dependencies for
resolution.

See #8110 for a bit more commentary
on deferred work.

---------

Co-authored-by: Charlie Marsh <[email protected]>
charliermarsh added a commit that referenced this pull request Oct 20, 2024
…roups (#8266)

Part of #8090

Adds the ability to read group inclusions (`include-group = <name>`) in
the `pyproject.toml`. Resolves groups into concrete dependencies for
resolution.

See #8110 for a bit more commentary
on deferred work.

---------

Co-authored-by: Charlie Marsh <[email protected]>
charliermarsh added a commit that referenced this pull request Oct 22, 2024
…roups (#8266)

Part of #8090

Adds the ability to read group inclusions (`include-group = <name>`) in
the `pyproject.toml`. Resolves groups into concrete dependencies for
resolution.

See #8110 for a bit more commentary
on deferred work.

---------

Co-authored-by: Charlie Marsh <[email protected]>
charliermarsh added a commit that referenced this pull request Oct 22, 2024
…roups (#8266)

Part of #8090

Adds the ability to read group inclusions (`include-group = <name>`) in
the `pyproject.toml`. Resolves groups into concrete dependencies for
resolution.

See #8110 for a bit more commentary
on deferred work.

---------

Co-authored-by: Charlie Marsh <[email protected]>
charliermarsh added a commit that referenced this pull request Oct 23, 2024
…roups (#8266)

Part of #8090

Adds the ability to read group inclusions (`include-group = <name>`) in
the `pyproject.toml`. Resolves groups into concrete dependencies for
resolution.

See #8110 for a bit more commentary
on deferred work.

---------

Co-authored-by: Charlie Marsh <[email protected]>
charliermarsh added a commit that referenced this pull request Oct 25, 2024
…roups (#8266)

Part of #8090

Adds the ability to read group inclusions (`include-group = <name>`) in
the `pyproject.toml`. Resolves groups into concrete dependencies for
resolution.

See #8110 for a bit more commentary
on deferred work.

---------

Co-authored-by: Charlie Marsh <[email protected]>
zanieb added a commit that referenced this pull request Oct 25, 2024
…roups (#8266)

Part of #8090

Adds the ability to read group inclusions (`include-group = <name>`) in
the `pyproject.toml`. Resolves groups into concrete dependencies for
resolution.

See #8110 for a bit more commentary
on deferred work.

---------

Co-authored-by: Charlie Marsh <[email protected]>
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