Skip to content

fix: change binary to source should always select source#5098

Merged
ruben-arts merged 1 commit intoprefix-dev:mainfrom
baszalmstra:fix/issue-5065
Dec 10, 2025
Merged

fix: change binary to source should always select source#5098
ruben-arts merged 1 commit intoprefix-dev:mainfrom
baszalmstra:fix/issue-5065

Conversation

@baszalmstra
Copy link
Contributor

Description

This fixes an issue where if a lock-file contained a binary package it would always be selected for transitive dependencies even if a source package was available. This PR changes this behavior to ensure that only source packages are used if they are specified.

Fixes #5065

How Has This Been Tested?

I tested this manually on the reproducer in the issue.

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.

manifest_source = ?self.manifest_source,
build_source = ?self.preferred_build_source,
manifest_source = %self.manifest_source,
build_source = self.preferred_build_source.as_ref().map(tracing::field::display),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixes an issue where the log output was veeery verbose.

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.

Amazing! This fixed my issue! 🙏

@ruben-arts ruben-arts merged commit e24766c into prefix-dev:main Dec 10, 2025
37 checks passed
@ruben-arts ruben-arts deleted the fix/issue-5065 branch December 10, 2025 09:47
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.

Switching from remote to local package does not refresh lockfile

2 participants