fix: align --locked metadata serializer with lock-write side#6115
Merged
wolfv merged 1 commit intoMay 13, 2026
Merged
Conversation
…ev#6049) Follow-up to prefix-dev#6052. When `[tool.uv.sources]` redirects an optional-dep to a named index, uv lowering tags the registry source with `index = Some(...)` and `uv_distribution_types::Requirement`'s `Display` emits ` (index: <url>)`. The lock-write path strips that suffix in `to_requirements`; the `--locked` satisfiability path was reparsing `req.to_string()` with `pep508_rs`, which rejects it. Result: `pixi install --locked` failed on a lockfile pixi had just written. Route the satisfiability path through the same `to_requirements` helper so both sides serialize identically. https://claude.ai/code/session_017M1PznhmKaXELztjkoxckK
2 tasks
wolfv
approved these changes
May 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Follow-up to #6052. When
[tool.uv.sources]redirects an optional-dep to a named index, uv lowering tags the registry source withindex = Some(...)andRequirement::Displayemits(index: <url>). The lock-write path (pixi_uv_conversions::to_requirements) strips that suffix; the--lockedsatisfiability path was reparsingreq.to_string()withpep508_rs, which rejects it. Result:--lockederrored on a lockfile pixi had just written.Route the satisfiability path through the same
to_requirementshelper so both sides serialize identically.Fixes #6049 (follow-up reported by @diegoferigo-rai on rai-opensource/exploy).
How Has This Been Tested?
to_requirements_strips_index_suffix_from_registry_sourceconstructs aRequirementwithindex = Some(...), asserts uv'sDisplayincludes(index:, and pinsto_requirementsoutput to plainisaaclab.cargo test -p pixi_core --lib lock_file::satisfiability; 150 passed, no regressions on existingtest_good_satisfiability/test_failing_satisfiabilitycases.AI Disclosure
Tools: Claude (claude-opus-4-7, via Claude Code on web)
Checklist: