fix: Handle CONDA_OVERRIDE_* in pixi global install#6335
Open
hunger wants to merge 6 commits into
Open
Conversation
5 tasks
Contributor
Author
|
The more I think about it: I should store a conda-meta/pixi file with resolved platform and minimal platform, just like I do for "local" environments. That is inherently environment specific information. I'll change this. |
Make pixi_platform_to_toml_value public and re-export it, TomlPixiPlatform, and is_subdir_default from pixi_manifest so pixi_global can parse, serialize and edit rich platforms in its manifest. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add virtual_packages_from_env_overrides, returning the virtual packages defined purely by the CONDA_OVERRIDE_* environment variables currently set. pixi global uses it to record an explicit override as a declared virtual package. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
An environment's platform key may now be a rich platform, e.g.
{ platform = "linux-64", cuda = "12.0" }, in addition to a bare subdir
string; both round-trip. Add Manifest::add_platform_virtual_packages to
record virtual packages onto an environment's platform.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…RIDE_* Solve a global environment against the machine's auto-detected virtual packages with the platform's recorded overrides layered on top. Persist CONDA_OVERRIDE_* set during 'pixi global install' onto the environment's platform so later 'pixi global update'/'sync' reuse them without the variable having to be set again. Fixes prefix-dev#6323. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Document rich platform entries in pixi-global.toml and how CONDA_OVERRIDE_* values are recorded onto an environment's platform. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…CONDA_OVERRIDE_* Solve pixi global environments against machine-detected virtual packages that honor CONDA_OVERRIDE_* (e.g. CONDA_OVERRIDE_CUDA=12.0), so run constraints on virtual packages are respected (fixes the install-ignores- __cuda bug). Record the resolved platform (subdir + solve virtual packages) and the minimum-supported platform (subdir + only the virtual packages some installed record depends on) in the environment's conda-meta/pixi marker, reusing the EnvironmentFile, PlatformData and minimal-platform code shared with non-global environments. Revert the rich-platform-in-manifest approach: the pixi-global.toml platform field stores a bare subdir again, and the manifest helper exports widened for it are restored. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4a7ef48 to
030f755
Compare
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.
This is a counter proposal to PR #6325
Fixes: #6323