Skip to content

fix: for local directory satisfiability#3631

Merged
baszalmstra merged 5 commits intoprefix-dev:mainfrom
tdejager:fix/local-dir-satisfiability
Apr 17, 2025
Merged

fix: for local directory satisfiability#3631
baszalmstra merged 5 commits intoprefix-dev:mainfrom
tdejager:fix/local-dir-satisfiability

Conversation

@tdejager
Copy link
Copy Markdown
Contributor

@tdejager tdejager commented Apr 17, 2025

Given a pixi.toml like:

[workspace]
authors = ["Tim de Jager <tim@prefix.dev>"]
channels = ["https://prefix.dev/conda-forge"]
name = "installation-order"
platforms = ["osx-arm64"]
version = "0.1.0"

[tasks]

[dependencies]
python = "3.13.*"

[pypi-dependencies]
foobar = { path = "../foobar-0.1.0-py3-none-any.whl" }

Keeps invalidating with the message:

..
 INFO pixi::lock_file::outdated: the dependencies of environment 'default' for platform osx-arm64 are out of date because 'foobar' expected this path /private/tmp/foobar-0.1.0-py3-none-any.whl but found /private/tmp/blinky/../foobar-0.1.0-py3-none-any.whl
...

This adds a test to satisfiability and fixes by normalizing in that case.

@tdejager tdejager requested review from baszalmstra and Copilot April 17, 2025 09:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes an issue with local directory satisfiability by normalizing relative paths before comparing them, and adds a test to validate the fix.

  • Updated error messaging and path comparisons in pypi_satifisfies_requirement.
  • Added a new test file to cover local-wheel scenarios.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
tests/data/satisfiability/local-wheel/pixi.toml Added test configuration for local wheel paths.
src/lock_file/satisfiability.rs Updated path normalization and error message for LockedPyPIPathMismatch.
Comments suppressed due to low confidence (1)

src/lock_file/satisfiability.rs:918

  • [nitpick] Consider renaming the variable 'locked_path' (after joining with 'project_root') to a more descriptive name (e.g., 'resolved_locked_path') to avoid confusion with the original 'locked_path'.
let locked_path = project_root.join(locked_path.to_path());

@baszalmstra baszalmstra merged commit 1a0b06f into prefix-dev:main Apr 17, 2025
35 checks passed
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.

4 participants