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

Incorrect behaviour with pixi add --feature --pypi #1133

Closed
2 tasks done
vigneshmanick opened this issue Apr 6, 2024 · 1 comment · Fixed by #1135
Closed
2 tasks done

Incorrect behaviour with pixi add --feature --pypi #1133

vigneshmanick opened this issue Apr 6, 2024 · 1 comment · Fixed by #1135
Labels
🐞 bug Something isn't working

Comments

@vigneshmanick
Copy link
Contributor

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 add --feature test --pypi ruff
pixi add --feature test ruff

Issue description

the commands above will result in the following changes to pixi.toml

[feature.test.dependencies]
ruff = ">=0.3.5,<0.4"

[pypi-dependencies] # <- Incorrect since this is the wrong feature
ruff = "*"  

Adding a pypi dependency via cli places it incorrectly into the default feature instead of the specified feature. The same works correctly when adding without the --pypi argument.

Also the version strings are different between the pypi and conda-forge variant. While the conda forge variant has the version range in the specification (">=0.3.5,<0.4") the pypi variant has no modifier and is set to "*"

NOTE: Adding the dependency manually by editing the pixi.toml file works correctly.

Expected behavior

[feature.test.pypi-dependencies]
ruff = ">=0.3.5,<0.4"  

[feature.test.dependencies]
ruff = ">=0.3.5,<0.4"
@vigneshmanick vigneshmanick added the 🐞 bug Something isn't working label Apr 6, 2024
@vigneshmanick vigneshmanick changed the title Incorrect behaviour when `pixi add --feature Incorrect behaviour when pixi add --feature feature --pypi Apr 6, 2024
@vigneshmanick vigneshmanick changed the title Incorrect behaviour when pixi add --feature feature --pypi Incorrect behaviour with pixi add --feature --pypi Apr 6, 2024
@ruben-arts
Copy link
Contributor

This is a missed implementation! Good find.

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

Successfully merging a pull request may close this issue.

2 participants