Skip to content

fix: source packages with git source were always out-of-date#5178

Merged
ruben-arts merged 2 commits intoprefix-dev:mainfrom
baszalmstra:fix/issue-5175
Dec 20, 2025
Merged

fix: source packages with git source were always out-of-date#5178
ruben-arts merged 2 commits intoprefix-dev:mainfrom
baszalmstra:fix/issue-5175

Conversation

@baszalmstra
Copy link
Contributor

Description

This fixes an issue that cached cache files to be unreadable.

The issue was that we used:

#[serde(skip_serializing_if = "GitReference::is_default")]
pub reference: GitReference,

somewhere. This states that if the GitReference is a default reference (e.g. the main branch) then we do not serialize it.
But we should also use the default value when deserializing if the key is not present.

Fixes #5175

How Has This Been Tested?

I tested this locally by using the reproducer from #5175 and repeatedly running pixi lock -vv.

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.
  • I have verified that changes that would impact the JSON schema have been made in schema/model.py.

pub subdirectory: Option<String>,
/// The reference of the git checkout.
#[serde(skip_serializing_if = "GitReference::is_default")]
#[serde(default, skip_serializing_if = "GitReference::is_default")]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the fix.

Copy link
Contributor

@ruben-arts ruben-arts left a comment

Choose a reason for hiding this comment

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

Thanks bas, this fixed the issue for me!

@ruben-arts ruben-arts merged commit 1e8d859 into prefix-dev:main Dec 20, 2025
37 checks passed
@ruben-arts ruben-arts deleted the fix/issue-5175 branch December 20, 2025 09:05
ruben-arts added a commit to ruben-arts/pixi that referenced this pull request Dec 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

git rattler-build dependencies force constant updates of pixi.lock

2 participants