Skip to content

feat(lock): store binary conda package locations verbatim - #2498

Open
hunger wants to merge 1 commit into
conda:mainfrom
hunger:push-xpqkkuuwrptt
Open

feat(lock): store binary conda package locations verbatim#2498
hunger wants to merge 1 commit into
conda:mainfrom
hunger:push-xpqkkuuwrptt

Conversation

@hunger

@hunger hunger commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Change CondaBinaryData.location to Verbatim so a relative 'conda:' path round-trips through the lock file.

Relates to: prefix-dev/pixi#6322

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: Claude

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added sufficient tests to cover my changes.

Change CondaBinaryData.location to Verbatim<UrlOrPath> so a relative
'conda:' path round-trips through the lock file. Refs prefix-dev/pixi#6322.
@hunger

hunger commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator Author

@bas: I would like to have the verbatim data for this, so that we can round-trip relative channel URLs through pixi. I do not plan to support those officially, but we should not break them when a user sticks them into their files.

/// consumer to resolve against the lock file's base directory.
#[serde(rename = "conda")]
pub location: UrlOrPath,
pub location: Cow<'a, Verbatim<UrlOrPath>>,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cant a Path already be relative though?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course.

But one of the first things we do is make it an absolute path and pass that around. I do not want to change that and still keep the "relative" information around.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But the serialization also would then also only store either relative or absolute so you would have to reconstruct it anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants