Repository navigation
Closed
Copy link
Description
Checks
-
I have checked that this issue has not already been reported.
-
I have confirmed this bug exists on the latest version of pixi, using
pixi --version.
Reproducible example
# pixi lock in research keeps changing
~/repros$ cd pixi/source-dependencies/research/
~/repros/pixi/source-dependencies/research$ pixi lock
✔ Updated lock-file
~/repros/pixi/source-dependencies/research$ pixi lock
✔ Updated lock-file
~/repros/pixi/source-dependencies/research$ pixi lock
✔ Updated lock-file
# pixi lock in modules/c keeps changing
~/repros/pixi/source-dependencies/research$ cd ../modules/c
~/repros/pixi/source-dependencies/modules/c$ pixi lock
✔ Updated lock-file
~/repros/pixi/source-dependencies/modules/c$ pixi lock
✔ Updated lock-file
~/repros/pixi/source-dependencies/modules/c$ pixi lock
✔ Updated lock-file
# pixi lock works as expected in modules/{a,b}
~/repros/pixi/source-dependencies/modules/c$ cd ../a
~/repros/pixi/source-dependencies/modules/a$ pixi lock
✔ Lock-file was already up-to-date
~/repros/pixi/source-dependencies/modules/a$ pixi lock
✔ Lock-file was already up-to-date
~/repros/pixi/source-dependencies/modules/a$ cd ../b
~/repros/pixi/source-dependencies/modules/b$ pixi lock
✔ Lock-file was already up-to-date
~/repros/pixi/source-dependencies/modules/b$ pixi lock
✔ Lock-file was already up-to-date
# pixi lock works as expected in modules/b/cpp
~/repros/pixi/source-dependencies/modules/b$ cd cpp/
~/repros/pixi/source-dependencies/modules/b/cpp$ pixi lock
✔ Lock-file was already up-to-date
~/repros/pixi/source-dependencies/modules/b/cpp$ pixi lock
✔ Lock-file was already up-to-dateIssue description
In the following repro calling pixi lock multiple times in research and modules/c keeps updating the lock file:
More context in the Discord thread with @tdejager:
Expected behavior
I expected pixi lock to update the lock file and then be up-to-date on subsequent pixi lock calls.
Reacted by Gabriel de Marmiesse
Activity
[-]Unexpected pixi lock behavior with tool.uv.sources path dependencies[/-][+]bug(pypi): unexpected pixi lock behavior with tool.uv.sources path dependencies[/+]eightysteele commentedon Oct 4, 2025
@tdejager @lucascolley potentially related observation: is it expected that
requires_distcontains the absolute (vs. relative) path to thefrogrocket-lomodule?asking because this has been causing lockfile conflicts/updates on the team (since the path changes when
pixi lockis run on other machines) and i thought it might be related to the issue we're seeing here.tdejager commentedon Oct 4, 2025
Oh man this one totally fell off my radar. Let me take a look next week. Sorry about that
tdejager commentedon Oct 4, 2025
Might be that if we use sources instead of a directly specified PyPI dependency this causes an absolute path. Might be a good lead indeed
eightysteele commentedon Oct 5, 2025
No worries @tdejager! I did some additional looking and I think
[tool.uv.sources]might be implicated.eightysteele commentedon Oct 7, 2025
@tdejager any inspiration? i'm happy to help make a contribution here if you wanted to point me in the right direction. :)
tdejager commentedon Oct 8, 2025
Yeah you are right in the hunch that we need to solve the absolute path problem first.
I improved the error message a bit and running on your example:
Note the last line, so I think we need to make sure that these relative paths work first and then, then fix the other issues that remains with lock-file invalidation. Sorry about this whole thing its all somewhat broken.
With regards to having that as a contribution, this one might be bit hairy because I'm reckoning it requires changes to rattler (the underlying library) as well. If you DM me on Discord I'd be happy to find something that is a bit lower-hanging fruit though!
tdejager commentedon Oct 8, 2025
Wait, now that I think of it there might be an intial fix for this first! Let me investigate.
eightysteele commentedon Oct 8, 2025
Thanks @tdejager, that sounds good! Let's see what the investigation turns up and then I'm happy to DM on Discord for any low-hanging fruit that would be helpful.
tdejager commentedon Oct 8, 2025
So I fixed the initial problem with this PR: #4710
This now parses the url we get back from the locking process correctly. However, we now run into another problem, because we do not know from the pep508 requirement if this is an editable (and frankly we shouldn't care per se) we now still have a lock invalidation issue.
Running on your repro I now get:
The problem being, that we return these as non-editable from the conversion method. And these are cross-referenced with the editables required and this conflicts. We can solve this (I think), by re-using the data in the lock file to figure out if we want that requirement to be editable or not. I think you could try this contribution, feel free to DM for the details.
eightysteele commentedon Oct 9, 2025
@tdejager nice, #4710 lgtm. I'm game for trying the contribution—I'll DM you to get the details (I'm on Pacific Time in California, with a tendency to wake up super early and work, so we might be coordinating over some rather strange hours!)
jevandezande commentedon May 24, 2026
I think I'm having the same problem (running Pixi 0.69.0). The underlying problem looks like a writer/reader asymmetry around [tool.uv.sources].
When pixi writes the lockfile, it resolves
pkg-a's dependencies withpkg-a's [tool.uv.sources] applied, so requires_dist forpkg-ais serialized as:When the up-to-date check reads
pkg-a/pyproject.toml, it parses only [project.dependencies]:The diff between
pkg-b @ ../pkg-b(lockfile) andpkg-b(manifest) is then reported as both an addition and a removal under the same name:Minimal reproduction
The workspace does not need to list pkg-b itself, the bug is triggered purely by transitive resolution through
pkg-a's [tool.uv.sources].