feat: implement v3 repodata/matchspec support in pixi spec#6015
Merged
Conversation
Adds new fields to PixiSpec types (extras, flags, license_family, condition, track_features) and switches MatchSpec parsing to v3-aware ParseMatchSpecOptions across pixi crates. The repodata reporter now surfaces a deduplicated warning when a backend reports an unsupported repodata revision. This is the pixi-side half of v3 support; the pixi-build backend changes follow in a separate PR.
Contributor
|
Why don't we need ParseStrictness anymore? Is the new default Strict enough? |
Member
Author
|
@hunger we use same "lenient" as before? Or where did you see that? |
Contributor
|
Sorry, I missed that ParseStrictness is now part of the ParseMatchSpecOptions. |
# Conflicts: # crates/pixi_build_backend/src/specs_conversion.rs # crates/pixi_command_dispatcher/src/keys/solve_pixi_environment.rs
wolfv
commented
May 14, 2026
baszalmstra
requested changes
May 19, 2026
Accepts insta snapshot updates for the v3 matchspec fields (condition, extras, flags, license-family, when, track-features) in pixi_manifest and pixi_build_type_conversions tests. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Parse `when = "..."` matchspec eagerly in the TOML deserializer so the
error carries the offending span instead of being deferred to
`into_condition`.
* Restructure `TomlWhenPackage` to wrap a `TomlSpec`, so the expanded
`when = { package = ..., ... }` table accepts the full set of matchspec
fields (`subdir`, `extras`, `flags`, `license`, `track-features`, ...)
rather than just `package`, `version`, and `build`. `channel` and
source-location fields are rejected explicitly.
* Render TOML rejection snapshots via `pixi_test_utils::format_parse_error`
so they include miette's source highlighting at the offending span.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
# Conflicts: # Cargo.lock
# Conflicts: # Cargo.lock
rattler_conda_types 0.46.4 renders matchspecs inside conditions via `fmt_in_condition`, which uses bracket syntax when a build string (or other complex field) is set. Update the assert_eq! expectations and the parsing snapshot to match. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Cover the new code paths added in this branch with formatted error snapshots: source-location fields and `channel` rejected inside `when` tables, expanded-vs-string `when` mismatches, nested-condition error spans, and combination errors when v3 matchspec fields (`extras`, `flags`, `track-features`) are mixed with `path`/`git`/`url`. Also exercises the `StringMatcher` regex/glob failure paths via `flags`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Error messages from `validate_field_combinations` were emitting Rust field identifiers (`build_number`, `file_name`, `track_features`) instead of the TOML/JSON keys users actually write (`build-number`, `file-name`, `track-features`). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
When a `when` matchspec string is rejected (bracket syntax, build-string
shorthand, channel prefix), users are told to switch to the expanded
`{ package = ..., ... }` form. Add positive parsing snapshots covering
the full set of fields the expanded form accepts: `build-number`,
`subdir`, `extras`, `flags`, `track-features`, `file-name`, `license`,
and `license-family`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Switch from table-driven `assert_yaml_snapshot!` aggregates to one `#[test]` per case with `assert_snapshot!(parse_*_error(input))`, so each scenario lives in its own snapshot file and is easy to grep / diff in isolation. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Use insta inline-snapshot syntax (`assert_snapshot!(value, @"...")`) so the expected output sits next to each test instead of in a separate `.snap` file. Reviewing the parser's behavior no longer requires jumping between files. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
wolfv
commented
May 21, 2026
wolfv
commented
May 21, 2026
* `WhenPackage` in `schema/model.py` now mirrors the matchspec fields the Rust deserializer accepts inside an expanded `when` table: `build-number`, `file-name`, `extras`, `flags`, `subdir`, `license`, `license-family`, and `track-features`. `channel`, `when`, and source-location fields stay omitted because `validate_when_spec` rejects them. * Revert the `### Dependency Metadata` addition to `docs/build/dependency_types.md`. It belongs with the pixi-build wiring, not this spec PR. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
baszalmstra
reviewed
May 21, 2026
baszalmstra
requested changes
May 21, 2026
baszalmstra
reviewed
May 21, 2026
| when = "conda-forge::python >=3.10""#; | ||
| assert_snapshot!(parse_toml_error(input), @r###" | ||
| × `when` strings only support package names with optional version constraints; use the expanded form for additional matchspec fields | ||
| × `when` strings do not support channel prefixes; this would be `when = { package = "python", version = ">=3.10", channel = "conda-forge" }`, but `channel` is not supported inside `when` tables |
Contributor
There was a problem hiding this comment.
I thought we had the ability to attach miette style hints to these errors.
baszalmstra
requested changes
May 21, 2026
baszalmstra
approved these changes
May 21, 2026
TenzinPlatter
added a commit
to greenroom-robotics/pixi
that referenced
this pull request
Jun 26, 2026
* fix: don't misclassify missing python as pypi-only during upgrade (prefix-dev#6095) * chore(docs): Update the pixi publish docs (prefix-dev#6129) * fix: drop bare self-references in expand_self_extras (prefix-dev#6142) * chore(ci): Update Pixi (prefix-dev#6149) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(ci): Update GitHub Actions (prefix-dev#6148) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix: use gnu target for riscv64 in install.sh (prefix-dev#6143) * feat(publish): honor workspace.s3-options when uploading to s3 (prefix-dev#6069) * feat: add oauth default login (prefix-dev#6140) * fix: propagate run-exports from host/build (prefix-dev#6151) * chore(deps): bump uv to 0.11.15 (prefix-dev#6132) * perf: install build and host environments concurrently (prefix-dev#6152) * feat(publish): add `--variant` and `--variant-config` flags (prefix-dev#6109) * chore(deps): bump rattler crates (prefix-dev#6153) * docs: Fix typo (prefix-dev#6157) * feat: add `--package-format` to `pixi publish` for tar.bz2 output (prefix-dev#6156) * fix: hook up repodata fetch reporter to gateway queries (prefix-dev#6112) * fix: invalidate build-backend metadata cache when backend spec changes (prefix-dev#6111) * chore(deps): bump rattler-build crates to latest main (prefix-dev#6163) Co-authored-by: Claude <noreply@anthropic.com> * fix: normalize extras order in lockfile metadata comparison (prefix-dev#6165) * fix: trust path-based pypi overrides for transitive registry specs (prefix-dev#6169) * fix: build backends nightly build - pass through more vars to fix sccache (prefix-dev#6168) * fix: build backends build by disabling env isolation (prefix-dev#6170) * chore: version to 0.69.0 (prefix-dev#6164) * fix: conda package build for windows and osx (prefix-dev#6171) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * chore: bump backend versions (prefix-dev#6173) * docs: Update `github_actions` docs for `setup-pixi` version 0.9.6 (prefix-dev#6174) Co-authored-by: Pavel Zwerschke <pavelzw@gmail.com> * feat: implement v3 repodata/matchspec support in pixi spec (prefix-dev#6015) * fix: bump mimalloc to 0.1.51 to fix win-arm64 process-exit crash (prefix-dev#6176) Co-authored-by: Claude <noreply@anthropic.com> * feat: support `[workspace.dependencies]` (prefix-dev#6162) * fix(pypi-mapping): fetch parselmouth compressed mapping from conda-mapping.prefix.dev (prefix-dev#6172) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat: clamp .pixi/ mtimes to SOURCE_DATE_EPOCH for reproducibility (prefix-dev#6056) * chore(ci): Update azure/trusted-signing-action action to v2 (prefix-dev#6200) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(ci): Update Rust crate shlex to v2 (prefix-dev#6201) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(ci): Update GitHub Actions (prefix-dev#6195) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(ci): Update Pixi (prefix-dev#6196) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(reinstall): wire up progress reporter and batch environments (prefix-dev#6205) Co-authored-by: Lucas Colley <lucas.colley8@gmail.com> * fix: forward termination signal (prefix-dev#6204) * fix(global): clear conda stack env for prefix-ignore trampolines (prefix-dev#6210) Co-authored-by: jinhyuk9714 <jinhyuk9714@gmail.com> Co-authored-by: GitHub Actions <actions@github.com> * chore(ci): Update taiki-e/install-action action to v2.79.2 (prefix-dev#6209) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * docs: clarify per-environment activation variables (prefix-dev#6214) Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Hofer-Julian <30049909+Hofer-Julian@users.noreply.github.com> * fix: git url normalization (prefix-dev#6203) * feat: adopt deno_task_shell native multiline support (prefix-dev#6211) * fix: installer, use per user scope instead of system (prefix-dev#5568) * fix: disable gpg signing in git fixture repos (prefix-dev#6216) Co-authored-by: Claude <noreply@anthropic.com> * fix(pixi-build-r): resolve license file to absolute path (prefix-dev#6215) * chore: use lzma-rust2 instead of xz2 (prefix-dev#5087) * feat: add skip_pyc_compilation configuration option (prefix-dev#5737) * chore: use "lock file" consistently (prefix-dev#6208) * feat(pixi-build): plumb workspace scratch directory and cache ROS distro fetches (prefix-dev#6181) * docs(cli): mention `pixi self-update` in `requires-pixi` help msg (prefix-dev#6207) * feat: git lfs support in `pixi-git` (prefix-dev#6183) * feat: parallel global update (prefix-dev#5970) * feat(pixi-build-ros): discover sibling ROS packages + marker-driven workspace globbing (prefix-dev#6182) * docs: Update link to Code of Conduct in CONTRIBUTING.md (prefix-dev#6224) * fix: tests on main did not update assertion for `.git` suffix (prefix-dev#6227) * perf: compute engine and dispatcher speedups + backend-metadata cache fix (prefix-dev#6180) * chore: use rust backend for building ros backend (prefix-dev#6228) * fix: reject build backends defined as source dependencies (prefix-dev#6230) * fix: reinstall when registry install collides with non-registry lock entry (prefix-dev#6213) Co-authored-by: Claude <noreply@anthropic.com> * fix: clear error on remove with suggestions for missing dependency (prefix-dev#6218) Co-authored-by: Claude <noreply@anthropic.com> * fix: seed pypi-options from global config in `--import` and existing pyproject paths (prefix-dev#6212) Co-authored-by: Claude <noreply@anthropic.com> * fix: keep OS trust store for native-tls System mode (prefix-dev#6235) Co-authored-by: Claude <noreply@anthropic.com> * feat: support --no-config / --config-file (prefix-dev#6222) * fix: upgrade dependency-group dependencies (prefix-dev#6241) * chore: reuse build cache by passing `--workspace` (prefix-dev#6242) * feat: extend pixi publish to support cloudsmith as a target (prefix-dev#6219) * chore: version to 0.70.0 (prefix-dev#6244) * chore(ci): Update cargo patches (prefix-dev#6247) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(ci): Update Pixi (prefix-dev#6248) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(ci): Update GitHub Actions (prefix-dev#6250) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * feat: add --index option to specify PyPI index URL (prefix-dev#5575) * chore: bump backend versions (prefix-dev#6254) * fix: scope PyPI source-build cache by conda environment (prefix-dev#6240) This change scopes the source-build cache to the conda environment, so a wheel built against one set of conda dependencies is no longer reused in an environment that resolves different ones * fix: limit concurrent global update (prefix-dev#6253) * fix: global share command dispatcher (prefix-dev#6255) * docs: link to parselmouth mapping browser in conda/PyPI page (prefix-dev#6256) * fix(pixi-build-python): reinstall to avoid duplicate dist-info (prefix-dev#6257) Co-authored-by: Claude <noreply@anthropic.com> * feat: implement extras and flags support for pixi and pixi-build (prefix-dev#5998) Co-authored-by: Bas Zalmstra <4995967+baszalmstra@users.noreply.github.com> * feat: serialize concurrent environment installs and recover from interrupted ones (prefix-dev#6233) Co-authored-by: Claude <noreply@anthropic.com> * chore(ci): Update Rust crate jiff to v0.2.27 (prefix-dev#6258) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix: support conda extras for satisfiabily and solve groups (prefix-dev#6260) * chore(ci): Update GitHub Actions to v2.79.9 (prefix-dev#6261) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore: version to 0.70.1 (prefix-dev#6268) * fix: compare pypi git urls using the raw url, not uv's canonical one (prefix-dev#6272) Co-authored-by: Claude <noreply@anthropic.com> * fix: keep conda-env build discriminator out of PEP 517 config_settings (prefix-dev#6273) Co-authored-by: Claude <noreply@anthropic.com> * fix: accept find-links URLs during lock file satisfiability (prefix-dev#6270) Co-authored-by: Claude <noreply@anthropic.com> * chore: strip debug info from dependencies in dev builds (prefix-dev#6283) * chore: Bump tikv-jemallocator to 0.7.0 (prefix-dev#6278) * ci: speed up ubuntu and macOS x86 CI (prefix-dev#6280) * feat: Improve PyPI > Conda clobber detection (prefix-dev#6292) * fix(ros): avoid pixi lock panics on unmappable ROS dependencies (prefix-dev#6290) Co-authored-by: Claude <noreply@anthropic.com> * fix: preserve file permissions during atomic write operations (prefix-dev#6296) * chore: version to 0.70.2 (prefix-dev#6298) Co-authored-by: Ruben Arts <ruben.arts@pm.me> * feat(core): Rich Platform support (prefix-dev#6178) * test: move examples satisfiability tests to Python (prefix-dev#6300) * fix: honor workspace [cache.*] overrides for conda-pypi mapping cache (prefix-dev#6284) * fix: stop source builds rebuilding from scratch on every run (prefix-dev#6285) * fix: suggest the correct cache config key in netfs-redirect warning (prefix-dev#6282) * test: skip example satisfiability checks on unsupported platforms (prefix-dev#6311) * chore(ci): Update Pixi (prefix-dev#6305) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(ci): Update cargo patches (prefix-dev#6304) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(ci): Update GitHub Actions to v2.81.1 (prefix-dev#6307) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * refactor: pypi mapping module so that its a bit more logically named (prefix-dev#6302) * docs: Remove pixi-inject page (prefix-dev#6276) * chore(ci): Update GitHub Actions to v2.81.2 (prefix-dev#6313) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(test): make test_info_output_extended platform-agnostic (prefix-dev#6314) * test: skip pytorch doc examples on platforms they don't support (prefix-dev#6317) * fix(core): key locked records by declared platform for rich platforms (prefix-dev#6315) * chore(ci): Update GitHub Actions to v6.0.3 (prefix-dev#6319) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(ci): Update Pixi to >=0.24,<0.25 (prefix-dev#6321) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * feat(pixi_spec): support extras, flags and when on conda dependencies (prefix-dev#6262) * fix(satisfiability): detect extra-dependency drift for source packages (prefix-dev#6263) * docs: add a pixi-build v3 example using extras, flags and when (prefix-dev#6264) * fix(ci): Attest the tarballs and the binary inside separately (prefix-dev#6266) * chore: bump pixi-build-api-version to 5 (prefix-dev#6328) * ci: move doc examples to `pixi_build` (prefix-dev#6330) * fix: stop requiring old backend version doc example (prefix-dev#6338) * feat(test): Do not run tests un unsupported platforms --------- Co-authored-by: Bas Zalmstra <4995967+baszalmstra@users.noreply.github.com> Co-authored-by: Tobias Hunger <tobias@prefix.dev> Co-authored-by: Ben Moss <bmoss40@bloomberg.net> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: nichmor <nmorkotilo@gmail.com> Co-authored-by: Wolf Vollprecht <w.vollprecht@gmail.com> Co-authored-by: Pavel Zwerschke <pavelzw@gmail.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Ruben Arts <ruben.arts@hotmail.com> Co-authored-by: Andreas Albert <103571926+AndreasAlbertQC@users.noreply.github.com> Co-authored-by: Lucas Colley <lucas.colley8@gmail.com> Co-authored-by: Hofer-Julian <30049909+Hofer-Julian@users.noreply.github.com> Co-authored-by: jinhyuk9714 <jinhyuk9714@gmail.com> Co-authored-by: GitHub Actions <actions@github.com> Co-authored-by: Filippo Luca Ferretti <102977828+flferretti@users.noreply.github.com> Co-authored-by: samrosenf <samrosenf@gmail.com> Co-authored-by: Ruben Arts <ruben.arts@pm.me> Co-authored-by: jmayes-rx <jeremy.mayes@readyx.com> Co-authored-by: Suleman Karigar <37236131+suleman1412@users.noreply.github.com> Co-authored-by: Tim de Jager <tim@prefix.dev> Co-authored-by: Kevin Mills <35641675+millsks@users.noreply.github.com>
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
Adds new fields to PixiSpec types (extras, flags, license_family, condition, track_features) and switches MatchSpec parsing to v3-aware ParseMatchSpecOptions across pixi crates. The repodata reporter now surfaces a deduplicated warning when a backend reports an unsupported repodata revision.
This is the pixi-side half of v3 support; the pixi-build backend changes follow in a separate PR.
This implements the following changes to the Pixi spec syntax:
How Has This Been Tested?
You can test with the packages from this channel: https://preview-pr-2147.prefix.dev/channels/test-v3
AI Disclosure
Tools: Claude
Checklist:
schema/model.py.