Repository navigation
refactor(pixi_spec): allow v3 matchspec selectors for source dependencies - #6234
Hofer-Julian wants to merge 4 commits into
Conversation
|
|
1fab6ae to
2050c4f
Compare
ca5dc99 to
17517cd
Compare
|
I found an issue through the example that I added in this commit. If you have It does satisfy if I remove the |
|
I still have the issue with the unsatisfiable environment, running I also found weird behavior with solving times so I hyperfined the xychart-beta
title "pixi lock — run times with mean & median (s)"
x-axis "Run #" [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]
y-axis "Time (s)" 0 --> 12
bar [0.115, 5.18, 2.102, 0.477, 0.454, 0.123, 0.167, 0.227, 0.176, 0.335, 0.297, 0.221, 1.561, 1.861, 0.118, 6.487, 3.484, 0.114, 5.378, 0.144, 0.628, 0.133, 11.285, 4.959, 4.948]
line [2.039, 2.039, 2.039, 2.039, 2.039, 2.039, 2.039, 2.039, 2.039, 2.039, 2.039, 2.039, 2.039, 2.039, 2.039, 2.039, 2.039, 2.039, 2.039, 2.039, 2.039, 2.039, 2.039, 2.039, 2.039, 2.039]
line [0.454, 0.454, 0.454, 0.454, 0.454, 0.454, 0.454, 0.454, 0.454, 0.454, 0.454, 0.454, 0.454, 0.454, 0.454, 0.454, 0.454, 0.454, 0.454, 0.454, 0.454, 0.454, 0.454, 0.454, 0.454]
The command was : There are loads of really large outliers. |
That's weird. Thanks for double-checking. I will take a look |
|
Thanks, don't hesitate to drag in @baszalmstra as this v3 feature is touch the solver. Maybe it's not this code change but on the rattler/resolve part. |
a61fe1d to
af5bc15
Compare
…source types Let source-side specs carry the v3 matchspec selectors (`extras`, `flags`, `when`) so source dependencies can participate in v3 resolution on equal footing with binary ones. Until now `PixiSpec` only modeled binary matchspec fields, so a git, url-source, or path-source dependency could not request optional `[extras]`, gate on `flags`, or be conditioned by a `when` clause - the v3 selectors had nowhere to live on a source spec, and there was no type-level distinction between "url pointing at a built archive" and "url pointing at a source tree" to attach them to. Splitting `PixiSpec` into `Detailed`, `UrlBinary`, `PathBinary`, `UrlSource`, `PathSource`, and `Git` puts the binary-vs-source choice in the type system and gives the three source variants an optional `MatchspecFields` carrying exactly the subset that applies post-build: `version`, `build`, `build-number`, `extras`, `flags`, `subdir`, `license`, `license-family`, `condition` (parsed from `when`), and `track-features`. Binary-only fields (`channel`, `md5`, `sha256`, `file-name`) stay on the binary variants where they belong. With that in place, manifests can write things like a git source with `extras = ["test"]` or a `when` condition, and the v3 solver sees the same selector shape regardless of whether the spec resolves from a channel or from a source build. test(source): end-to-end extras and source-on-source dependency tests Make the passthrough build backend surface a source package's declared `[package.extra-dependencies]` groups in its conda outputs, mirroring how build/host/run dependencies are already extracted from the project model. Add end-to-end tests covering: selecting an extra group on a source dependency (and the negative case), and a source package depending on another source package through its run-dependencies. fix: resolve source dependencies declared inside extra groups A source spec placed in [package.extra-dependencies.<group>] of a source package was not threaded through source resolution, leaving the inner package unbuilt and tripping a resolvo assertion when the group was selected via extras.
The source-record satisfiability check verified run-depends and run-constrains drift against the backend, but never compared the optional-dependency groups (extras). A manifest edit to an extra group left the lock file considered satisfied, so the stale extras were never re-locked. Re-derive the backend extras through the same pin-compatibility map and match-spec stringification the solve path uses, then compare each group against the locked record. Mismatches surface as a new SourceExtraDependenciesChanged unsat naming the group and the added/removed specs. Adds an experimental_extra_depends accessor on the source record and unit tests covering matching extras, group addition, group removal, and a within-group spec change.
af5bc15 to
96f74ad
Compare
|
Superseded by stacked PRs |
Allow v3 matchspec selectors for source dependencies. Refactors PixiSpec along the way.
This enables
extras,flagsandwhento work with source dependencies.Also, recursive source dependencies work.
Example 1:
Example 2:
Example 3: