Repository navigation
Conversation
baszalmstra
reviewed
May 26, 2026
| license_family, | ||
| extras, | ||
| flags, | ||
| track_features, |
Contributor
There was a problem hiding this comment.
Lets not add track_features and license_family as those are deprecated.
baszalmstra
requested changes
May 26, 2026
Comment on lines
+404
to
+423
| // A bare version with no other fields collapses to "upgrade to | ||
| // anything"; preserve the old `PixiSpec::Version(_)` shortcut so | ||
| // we don't carry over a single `version` constraint as if it | ||
| // were a detailed selector. | ||
| let is_bare_version_only = detailed.build.is_none() | ||
| && detailed.build_number.is_none() | ||
| && detailed.file_name.is_none() | ||
| && detailed.extras.is_none() | ||
| && detailed.flags.is_none() | ||
| && detailed.channel.is_none() | ||
| && detailed.subdir.is_none() | ||
| && detailed.md5.is_none() | ||
| && detailed.sha256.is_none() | ||
| && detailed.license.is_none() | ||
| && detailed.license_family.is_none() | ||
| && detailed.condition.is_none() | ||
| && detailed.track_features.is_none(); | ||
| if is_bare_version_only { | ||
| return Some((name.clone(), (MatchSpec::from(name), spec_type))); | ||
| } |
Contributor
There was a problem hiding this comment.
Lets make this a function on detailed
| /// version spec. | ||
| Version(VersionSpec), | ||
| /// A bare version string or a detailed channel-based binary spec. | ||
| Detailed(Box<DetailedSpec>), |
Contributor
There was a problem hiding this comment.
I would like to bring back Version, because { version = "*" } might not be the same as "*".
| /// constraints that apply to the built output transitively. | ||
| #[derive(Debug, Clone, Hash, PartialEq, Eq, serde::Serialize, serde::Deserialize)] | ||
| #[serde(untagged)] | ||
| pub enum SourceLocationSpec { |
Contributor
There was a problem hiding this comment.
I think we should improve this part, the SourceLocationSpec now also includes the matchspec fields, so "Location" is a bit of a misnomer here. I think we should either call this just SourceSpec or we make SourceSpec a struct with MatchSpecFields and a location.
Hofer-Julian
force-pushed
the
claude/bold-mccarthy-aYhrj
branch
2 times, most recently
from
May 28, 2026 12:45
912426c to
827a388
Compare
Hofer-Julian
force-pushed
the
claude/bold-mccarthy-aYhrj
branch
from
May 28, 2026 13:42
d97eb21 to
4983637
Compare
Hofer-Julian
force-pushed
the
claude/bold-mccarthy-aYhrj
branch
from
May 28, 2026 14:59
7b45aea to
2bdaed5
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.
Description
This PR refactors the
PixiSpecenum to encode the binary-vs-source distinction at the type level rather than via runtime URL/path inspection. Previously,PixiSpechad variants likeUrlandPaththat could represent either binary or source packages depending on the file extension. Now it has six distinct variants:Detailed— bare version string or detailed channel-based binary spec (replacesVersionandDetailedVersion)UrlBinary— URL pointing at a binary conda archive (.conda/.tar.bz2)PathBinary— local path pointing at a binary conda archiveUrlSource— URL pointing at a source archive with optional matchspec selectorsPathSource— local directory or source path with optional matchspec selectorsGit— git repository with optional matchspec selectorsKey changes:
New
MatchspecFieldstype: Extracted matchspec selector fields (version,build,build_number,extras,flags,subdir,license,license_family,condition,track_features) into a dedicated struct that decorates source-side specs. Binary variants do not carry these fields since a.condaarchive is already fully-specified.Binary-specific fields remain on
DetailedSpec/UrlBinarySpec/PathBinarySpec: Fields likefile-name,channel,md5,sha256stay on binary specs where they make sense.Improved validation: The TOML parser now detects whether a URL/path points to a binary archive by file extension and enforces that matchspec fields are only used with source locations.
Serialization optimization:
Detailedspecs carrying only aversionfield collapse back to bare version strings during serialization to preserve the on-disk format (foo = ">=1"instead offoo = { version = ">=1" }).Updated
GitSpecand related types:GitSpecnow carriesMatchspecFieldsand has a constructor methodGitSpec::new().This change improves type safety by making it impossible to accidentally apply matchspec selectors to binary packages, and clarifies the semantics of each spec variant.
How Has This Been Tested?
Checklist:
https://claude.ai/code/session_01677F3pUX6QVNCtikszPRUn