Add --all-groups to uv sync|run|export|tree#8892
Add --all-groups to uv sync|run|export|tree#8892charliermarsh merged 6 commits intoastral-sh:mainfrom
--all-groups to uv sync|run|export|tree#8892Conversation
| #[derive(Debug, Clone)] | ||
| pub enum Include { | ||
| /// Include dependencies from the specified groups. | ||
| Some(Vec<GroupName>), | ||
| /// Include dependencies from all groups. | ||
| All, | ||
| } |
There was a problem hiding this comment.
Just want to confirm you think this is the right structure. The parent type differs pretty significantly from ExtrasSpecification.
|
|
| if seen.insert((&dep.package_id, Some(extra))) { | ||
| queue.push_back((dep_dist, Some(extra))); | ||
| } | ||
| for dep in root |
There was a problem hiding this comment.
I'm struggling to find a straightforward way to make dev.iter() work with IncludeGroups::All, as it needs to be resolved to specific groups before iteration. Consequently, I changed dev.iter() to dev.contains(group), allowing DevGroupManifest to decide which groups are included. Hopefully, there is a more elegant solution than this.
|
I'll review tomorrow -- sorry for the delay. |
|
This generally looks good. I have some ideas for addressing the comment you left around |
|
|
||
| // Validate that any referenced dependency groups are defined in the workspace. | ||
| if !frozen { | ||
| let target = DependencyGroupsTarget::Workspace(&workspace); |
There was a problem hiding this comment.
by accident I think...
3eb6194 to
64c5901
Compare
64c5901 to
7e76790
Compare
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [astral-sh/uv](https://github.com/astral-sh/uv) | patch | `0.5.3` -> `0.5.4` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>astral-sh/uv (astral-sh/uv)</summary> ### [`v0.5.4`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#054) [Compare Source](astral-sh/uv@0.5.3...0.5.4) ##### Enhancements - Accept either singular or plural values for CLI requirements ([#​9196](astral-sh/uv#9196)) - Add `--all-groups` to `uv sync`, `uv run`, `uv export`, and `uv tree` ([#​8892](astral-sh/uv#8892)) - Add a progress bar to `uv tree --outdated` and `uv pip list --outdated` ([#​9284](astral-sh/uv#9284)) - Add retries for Python downloads ([#​9274](astral-sh/uv#9274)) - Use exponential backoff for publish retries ([#​9276](astral-sh/uv#9276)) - Add manylinux target triples up to glibc 2.40 ([#​9234](astral-sh/uv#9234)) ##### Performance - Parallelize network requests in `uv tree --outdated` ([#​9280](astral-sh/uv#9280)) - Use `zlib-rs` on all platforms ([#​9264](astral-sh/uv#9264)) ##### Bug fixes - Avoid validating extra and group sources in `build-system.requires` ([#​9273](astral-sh/uv#9273)) - Catch retries with wrapped `reqwest` errors ([#​9253](astral-sh/uv#9253)) - Sort hashes in `uv export` output ([#​9237](astral-sh/uv#9237)) - Strip `--index` and `--default-index` from command header ([#​9288](astral-sh/uv#9288)) ##### Documentation - Add breadcrumbs to the documentation ([#​9242](astral-sh/uv#9242)) - Add minimum version to PyTorch guide ([#​9247](astral-sh/uv#9247)) - Add support for anchor redirects with client-side js ([#​9212](astral-sh/uv#9212)) - Improve content on project configuration ([#​9235](astral-sh/uv#9235)) - Improve the project creation documentation ([#​9236](astral-sh/uv#9236)) - Move the integration guides into the "Guides" section as a collapsed group ([#​9245](astral-sh/uv#9245)) - Reorganize the project concept documentation ([#​9121](astral-sh/uv#9121)) - Use the full screen height for the main content to stabilize the nav ([#​9153](astral-sh/uv#9153)) ##### Error messages - Add dedicated warning for empty stdin ([#​9256](astral-sh/uv#9256)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
After investigating gemini-code-assist review feedback, determined that --all-groups is actually valid and preferable: - `uv sync --all-groups` was added in uv 0.5.4 (Nov 2024) - See: astral-sh/uv#8892 - It's cleaner, matches setup-environment.sh, and is more maintainable - Added clarifying comments "(dev and docs)" to show what groups exist Changes kept from previous commit (df36f34): ✅ Fix pytest -m slow marker syntax (was incorrectly --run-slow) ✅ Use relative path doctk/ instead of /home/user/doctk/ ✅ Fix markdown.py typo in writers directory (was markdown.md) ✅ Add missing imports to code example (Callable, Document, Node, Operation) Changes reverted: ↩️ Restore --all-groups instead of --group dev --group docs The explicit --group syntax was the reviewer's suggestion, but --all-groups is simpler, matches actual implementation, and is now well-established.
Summary
Closes #8594