Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pixi add <dependency> fails when the dependency already exists in the manifest and if it's the latest version #1401

Open
2 tasks done
vigneshmanick opened this issue May 17, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@vigneshmanick
Copy link
Contributor

vigneshmanick commented May 17, 2024

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

[tool.pixi.feature.test.dependencies]
pytest = ">=8.1.1,<8.2"
pytest-cov = ">=5.0.0,<5.1"
pytest-xdist = ">=3.5.0,<3.6"
pixi add -f test pytest
✔ Added pytest

will result in pytest changing to pytest = ">=8.2.0,<8.3" since the version in the manifest is lower than the current version and the command passes

but if now we try the same with pytest-cov will result in a failure since the version in the manifest is already the latest version

pixi add -f test pytest-cov
  × pytest-cov is already a dependency.

Issue description

Until the pixi update/upgrade command is available, i am trying to update the dependencies by just running the pixi add command. In doing so i have noticed that, when a dependency version is already the latest version then adding it again using pixi add will result in an error.

Expected behavior

There should be no error and the message should be that the version in the manifest is already the latest version. Also when the dependency is added that is already present the message should be Updated <dependency> from <vX> to <vY>

pixi add -f test pytest
✔ Updated pytest in feature: test  from  >=8.1.1,<8.2 to >=8.1.2,<8.2
pixi add -f test pytest-cov
  ✔ pytest-cov in feature: test is already the latest version. No changes have been made
@vigneshmanick vigneshmanick added the bug Something isn't working label May 17, 2024
@ruben-arts
Copy link
Contributor

pixi update will arrive soon, so I propose to wait for that implementation before we change any of the current add behavior.

@vigneshmanick
Copy link
Contributor Author

related to #1449

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants