Skip to content

docs: add a pixi-build v3 example using extras, flags and when - #6264

Merged
Hofer-Julian merged 5 commits into
mainfrom
example/pixi-build-v3
Jun 10, 2026
Merged

Hofer-Julian merged 5 commits into
mainfrom
example/pixi-build-v3

Conversation

@Hofer-Julian

Copy link
Copy Markdown
Member

Description

Add an examples/pixi-build/v3 workspace that exercises the new repodata v3 dependency fields across multiple environments. The resolved pixi.lock is included so the example builds out of the box.

Based on #6263

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.

Tools: {e.g., Claude, Codex, GitHub Copilot, ChatGPT, etc.}

@Hofer-Julian
Hofer-Julian requested a review from baszalmstra June 3, 2026 09:45
@Hofer-Julian
Hofer-Julian force-pushed the fix/source-extra-drift branch from e8ebac8 to daa970b Compare June 3, 2026 10:01
@Hofer-Julian
Hofer-Julian force-pushed the example/pixi-build-v3 branch from efbb54c to 95fa02f Compare June 3, 2026 10:01
@Hofer-Julian Hofer-Julian changed the title misc: add a pixi-build v3 example using extras, flags and when docs: add a pixi-build v3 example using extras, flags and when Jun 3, 2026
@Hofer-Julian
Hofer-Julian force-pushed the fix/source-extra-drift branch from daa970b to a2946b1 Compare June 3, 2026 12:09
@Hofer-Julian
Hofer-Julian force-pushed the example/pixi-build-v3 branch 3 times, most recently from ccb47cb to a74798f Compare June 3, 2026 12:37
@Hofer-Julian
Hofer-Julian force-pushed the fix/source-extra-drift branch from a2946b1 to 3ee1563 Compare June 3, 2026 12:37
@Hofer-Julian
Hofer-Julian force-pushed the example/pixi-build-v3 branch 2 times, most recently from 73d8a94 to de4f502 Compare June 3, 2026 14:30
@Hofer-Julian
Hofer-Julian force-pushed the fix/source-extra-drift branch 2 times, most recently from 1cdd575 to a1d4ba1 Compare June 3, 2026 14:32
@Hofer-Julian
Hofer-Julian force-pushed the example/pixi-build-v3 branch 2 times, most recently from 02c8d12 to c402e14 Compare June 3, 2026 14:36
@Hofer-Julian
Hofer-Julian force-pushed the fix/source-extra-drift branch 2 times, most recently from a411625 to e8d427b Compare June 3, 2026 14:45
@Hofer-Julian
Hofer-Julian force-pushed the example/pixi-build-v3 branch 2 times, most recently from 6ad3614 to 15c4073 Compare June 3, 2026 14:46
@Hofer-Julian
Hofer-Julian force-pushed the fix/source-extra-drift branch from e8d427b to 75867c6 Compare June 3, 2026 14:46
@Hofer-Julian
Hofer-Julian force-pushed the example/pixi-build-v3 branch from 15c4073 to ee6d57e Compare June 3, 2026 14:50
@Hofer-Julian
Hofer-Julian force-pushed the fix/source-extra-drift branch from 75867c6 to 543fb68 Compare June 3, 2026 14:50
@Hofer-Julian
Hofer-Julian force-pushed the example/pixi-build-v3 branch from ee6d57e to aa18b9a Compare June 3, 2026 14:53
@Hofer-Julian
Hofer-Julian force-pushed the fix/source-extra-drift branch 2 times, most recently from a9480c4 to ef785d8 Compare June 3, 2026 14:55
@Hofer-Julian
Hofer-Julian force-pushed the example/pixi-build-v3 branch from aa18b9a to a1671b9 Compare June 3, 2026 14:55
@Hofer-Julian
Hofer-Julian force-pushed the example/pixi-build-v3 branch from a1671b9 to 8807713 Compare June 5, 2026 08:58
@Hofer-Julian
Hofer-Julian force-pushed the fix/source-extra-drift branch 2 times, most recently from 4a1c37f to 5dde8d0 Compare June 5, 2026 09:00
@Hofer-Julian
Hofer-Julian force-pushed the example/pixi-build-v3 branch from 87e6b78 to 35c5285 Compare June 5, 2026 12:42
@Hofer-Julian

Copy link
Copy Markdown
Member Author

This fails because we include examples in our satisfiability tests. Which won't work, because it uses the backend from a channel.

Maybe we should stop doing that:

async fn q(#[files("../../examples/**/p*.toml")] manifest_path: PathBuf) {

@Hofer-Julian
Hofer-Julian requested a review from ruben-arts June 8, 2026 12:24
@ruben-arts

Copy link
Copy Markdown
Contributor

I was trying to rename an extra where I was expecting a solve error but it just silently ignored it.

# This:
[package.extra-dependencies.rust]
# To:
[package.extra-dependencies.bust]

# I was expecting some error due to this addition:
[feature.rust.dependencies]
v3 = { path = ".", extras = ["rust"] }
[environments]
rust = ["rust"]

@ruben-arts

ruben-arts commented Jun 8, 2026 •

Copy link
Copy Markdown
Contributor

Running this on example/v3:

> hyperfine -w 1 "pixi update" --export-json hyperfine-pixi_lock.json -r 50

Benchmark 1: pixi update
  Time (mean ± σ):      5.447 s ± 11.299 s    [User: 1.426 s, System: 27.634 s]
  Range (min … max):    0.970 s … 49.745 s    50 runs
xychart-beta
    title "pixi update — all 50 runs (seconds)"
    x-axis [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50]
    y-axis "Seconds" 0 --> 50
    bar [49.74,1.29,2.47,1.47,1.21,1.23,1.06,1.33,1.20,1.33,1.65,1.02,1.27,1.22,1.04,1.42,38.94,1.05,1.09,1.16,1.80,1.26,19.11,4.83,1.02,1.27,1.73,1.27,1.26,35.47,3.61,1.47,1.29,1.04,0.97,3.25,1.04,1.09,1.07,1.75,2.29,41.26,15.86,2.20,6.91,1.25,1.05,1.33,1.12,1.27]
Loading

This still worries me a lot. 😨

@Hofer-Julian

Hofer-Julian commented Jun 8, 2026 •

Copy link
Copy Markdown
Member Author

I was trying to rename an extra where I was expecting a solve error but it just silently ignored it.

I agree. @baszalmstra, I know that Python package managers behave like that, but I wonder if we really have to copy that. I would prefer to error here.

If you insist, I should at least add a warning for this

@baszalmstra

Copy link
Copy Markdown
Contributor

I was trying to rename an extra where I was expecting a solve error but it just silently ignored it.

I agree. @baszalmstra, I know that Python package managers behave like that, but I wonder if we really have to copy that. I would prefer to error here.

If you insist, I should at least add a warning for this

We indeed follow Pythons example here. A warning makes sense!

@Hofer-Julian
Hofer-Julian force-pushed the fix/source-extra-drift branch from a7ef33f to c4cd45d Compare June 8, 2026 14:41
@Hofer-Julian
Hofer-Julian force-pushed the example/pixi-build-v3 branch 2 times, most recently from 3829d68 to 319449f Compare June 9, 2026 09:39
@Hofer-Julian
Hofer-Julian force-pushed the fix/source-extra-drift branch from c4cd45d to c8ad02d Compare June 9, 2026 09:39
Restructure PixiSpec into six explicit variants that separate source from binary locations, and embed matchspec selectors on the source variants so conda dependencies accept extras, flags and when. This is the plumbing and parsing that lets source and binary specs round-trip the repodata v3 fields.

Based on "fix: support conda extras for satisfiabily and solve groups (#6260)".

feat(core): warn when a requested conda extra does not exist
@Hofer-Julian
Hofer-Julian force-pushed the fix/source-extra-drift branch from c8ad02d to afbe672 Compare June 9, 2026 12:40
@Hofer-Julian
Hofer-Julian force-pushed the example/pixi-build-v3 branch from 319449f to 77ce7ea Compare June 9, 2026 12:40
The conda/build_v1 path supplied rattler-build with pre-finalized
dependencies but left run.extra_depends empty, so built packages dropped
their experimental_extra_depends repodata (flags survived because they
ride in the recipe). Thread the resolved extra groups from the frontend
through CondaBuildV1Params into the finalized run dependencies, and teach
the passthrough backend to reflect them into its on-the-fly index.json.
@Hofer-Julian
Hofer-Julian force-pushed the example/pixi-build-v3 branch from 77ce7ea to f5eed0a Compare June 9, 2026 15:11
@Hofer-Julian
Hofer-Julian force-pushed the fix/source-extra-drift branch from afbe672 to fe4088d Compare June 9, 2026 15:11
Compare the extra-dependency groups recorded in the lock file against what the backend re-derives from a source package manifest, and report a SourceExtraDependenciesChanged error when they diverge. The error lists the specs added and removed per extra group so the drift is actionable.

Based on "feat(pixi_spec): support extras, flags and when on conda dependencies".
Add an examples/pixi-build/v3 workspace that exercises the new repodata v3 dependency fields across multiple environments. The resolved pixi.lock is included so the example builds out of the box.

Based on "fix(satisfiability): detect extra-dependency drift for source packages".
@Hofer-Julian
Hofer-Julian force-pushed the example/pixi-build-v3 branch from f5eed0a to f716b18 Compare June 10, 2026 07:26
@Hofer-Julian
Hofer-Julian force-pushed the fix/source-extra-drift branch from fe4088d to 3b0a4b6 Compare June 10, 2026 07:26
Base automatically changed from fix/source-extra-drift to main June 10, 2026 08:18
@Hofer-Julian
Hofer-Julian merged commit 5b1caf2 into main Jun 10, 2026
48 of 79 checks passed
@Hofer-Julian
Hofer-Julian deleted the example/pixi-build-v3 branch June 10, 2026 08:19
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 <[email protected]>

* 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) <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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) <[email protected]>

* 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 <[email protected]>

* fix: forward termination signal (prefix-dev#6204)

* fix(global): clear conda stack env for prefix-ignore trampolines (prefix-dev#6210)

Co-authored-by: jinhyuk9714 <[email protected]>
Co-authored-by: GitHub Actions <[email protected]>

* 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 <[email protected]>
Co-authored-by: Hofer-Julian <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* fix: clear error on remove with suggestions for missing dependency (prefix-dev#6218)

Co-authored-by: Claude <[email protected]>

* fix: seed pypi-options from global config in `--import` and existing pyproject paths (prefix-dev#6212)

Co-authored-by: Claude <[email protected]>

* fix: keep OS trust store for native-tls System mode (prefix-dev#6235)

Co-authored-by: Claude <[email protected]>

* 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 <[email protected]>

* feat: implement extras and flags support for pixi and pixi-build (prefix-dev#5998)

Co-authored-by: Bas Zalmstra <[email protected]>

* feat: serialize concurrent environment installs and recover from interrupted ones (prefix-dev#6233)

Co-authored-by: Claude <[email protected]>

* 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 <[email protected]>

* fix: keep conda-env build discriminator out of PEP 517 config_settings (prefix-dev#6273)

Co-authored-by: Claude <[email protected]>

* fix: accept find-links URLs during lock file satisfiability (prefix-dev#6270)

Co-authored-by: Claude <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: Tobias Hunger <[email protected]>
Co-authored-by: Ben Moss <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: nichmor <[email protected]>
Co-authored-by: Wolf Vollprecht <[email protected]>
Co-authored-by: Pavel Zwerschke <[email protected]>
Co-authored-by: Claude <[email protected]>
Co-authored-by: Ruben Arts <[email protected]>
Co-authored-by: Andreas Albert <[email protected]>
Co-authored-by: Lucas Colley <[email protected]>
Co-authored-by: Hofer-Julian <[email protected]>
Co-authored-by: jinhyuk9714 <[email protected]>
Co-authored-by: GitHub Actions <[email protected]>
Co-authored-by: Filippo Luca Ferretti <[email protected]>
Co-authored-by: samrosenf <[email protected]>
Co-authored-by: Ruben Arts <[email protected]>
Co-authored-by: jmayes-rx <[email protected]>
Co-authored-by: Suleman Karigar <[email protected]>
Co-authored-by: Tim de Jager <[email protected]>
Co-authored-by: Kevin Mills <[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.

3 participants