Open beenje opened 3 days ago
[x] I have checked that this issue has not already been reported.
[x] I have confirmed this bug exists on the latest version of pixi, using pixi --version.
pixi --version
This is with pixi 0.35.0.
Considering the following pixi.toml:
pixi.toml
[project] channels = ["conda-forge"] name = "test-pixi" platforms = ["osx-arm64", "linux-64"] [tasks] check = "grep orphan .pixi/envs/default/lib/python3.12/site-packages/sphinx_tags/__init__.py" [dependencies] python = "3.12.*" pip = ">=24.3.1,<25" sphinx = "*" [pypi-dependencies] # sphinx-tags = { git = "https://github.com/beenje/sphinx-tags.git", rev = "490f40f" } sphinx-tags = "==0.4"
If I run pixi run check, I get the expected output (only one line with orphan).
pixi run check
orphan
$ pixi run check ✨ Pixi task (check): grep orphan .pixi/envs/default/lib/python3.12/site-packages/sphinx_tags/__init__.py content.append(":orphan:")
I now replace the sphinx-tags version with a specific commit (the line orphan: true was added in this commit).
sphinx-tags
orphan: true
[pypi-dependencies] sphinx-tags = { git = "https://github.com/beenje/sphinx-tags.git", rev = "490f40f" }
$ rm -rf .pixi/ pixi.lock $ pixi run check ✨ Pixi task (check): grep orphan .pixi/envs/default/lib/python3.12/site-packages/sphinx_tags/__init__.py content.append(":orphan:")
The old version is still installed despite the proper version in pixi.lock:
pixi.lock
$ grep sphinx-tags pixi.lock - pypi: git+https://github.com/beenje/sphinx-tags.git@490f40f0042792ca410c249e195f29c96e33b25b - pypi: git+https://github.com/beenje/sphinx-tags.git@490f40f0042792ca410c249e195f29c96e33b25b name: sphinx-tags url: git+https://github.com/beenje/sphinx-tags.git@490f40f0042792ca410c249e195f29c96e33b25b
If I remove rattler cache, I get the proper version installed:
$ rm -rf .pixi /root/.cache/rattler/cache $ pixi run check ✨ Pixi task (check): grep orphan .pixi/envs/default/lib/python3.12/site-packages/sphinx_tags/__init__.py content.append("orphan: true") content.append(":orphan:")
I believe the issue is the same as what was reported in https://github.com/prefix-dev/pixi/issues/2358, but closed by the author who couldn't reproduce.
There seems to be a cache issue preventing the specified git version to be installed, when another version was installed previously.
Removing the cache shouldn't be needed to install a specific git version of a package.
Thank you for this great reproducer. It even works on my windows machine. We do need to look into this. It also doesn't work with an earlier version.
Checks
[x] I have checked that this issue has not already been reported.
[x] I have confirmed this bug exists on the latest version of pixi, using
pixi --version
.Reproducible example
This is with pixi 0.35.0.
Considering the following
pixi.toml
:If I run
pixi run check
, I get the expected output (only one line withorphan
).I now replace the
sphinx-tags
version with a specific commit (the lineorphan: true
was added in this commit).The old version is still installed despite the proper version in
pixi.lock
:If I remove rattler cache, I get the proper version installed:
Issue description
I believe the issue is the same as what was reported in https://github.com/prefix-dev/pixi/issues/2358, but closed by the author who couldn't reproduce.
There seems to be a cache issue preventing the specified git version to be installed, when another version was installed previously.
Expected behavior
Removing the cache shouldn't be needed to install a specific git version of a package.