Problem description
When declaring both a generic platform (e.g. linux-64) and a rich custom platform (e.g. { name = "gpu-linux-64", platform = "linux-64", cuda = "13.0" }), the selection logic currently determines candidate precedence strictly based on declaration order in the platforms array, as documented in
|
/// appropriate. Within each subdir bucket, platforms are returned in |
|
/// workspace declaration order (so a custom-named variant declared after |
|
/// the bare subdir-bound platform comes second). |
.
I believe users would be less surprised if the richest platform were preferred, especially when matching __cuda (see e.g. #6626 fyi @anthonyylee).
Possible solutions could be:
- sort candidates by specificity within the same base arch (e.g. linux-64)
- fallback to declaration order for platforms with equal specificity
- document this prominently or print a warning/hint when multiple candidates match the host
I'd love to hear what the maintainers think about this. I'd be happy to possibly open a PR
Problem description
When declaring both a generic platform (e.g.
linux-64) and a rich custom platform (e.g.{ name = "gpu-linux-64", platform = "linux-64", cuda = "13.0" }), the selection logic currently determines candidate precedence strictly based on declaration order in the platforms array, as documented inpixi/crates/pixi_manifest/src/workspace.rs
Lines 153 to 155 in b9ae7bf
I believe users would be less surprised if the richest platform were preferred, especially when matching
__cuda(see e.g. #6626 fyi @anthonyylee).Possible solutions could be:
I'd love to hear what the maintainers think about this. I'd be happy to possibly open a PR