fix: better messaging when adding dependencies to unused features#6623
Merged
Hofer-Julian merged 1 commit intoJul 17, 2026
Merged
Conversation
baszalmstra
approved these changes
Jul 17, 2026
Hofer-Julian
enabled auto-merge (squash)
July 17, 2026 13:10
A feature that is not part of any environment is never solved, so `pixi add` has no version to pin to and leaves the dependency at `*`. That is expected, but the UX around it was confusing: - `pixi add --feature test pytest` now explains that the dependency was not resolved or pinned, suggests `pixi workspace environment add` followed by `pixi upgrade` to pin it afterwards. - `pixi workspace environment add` no longer warns about an unused feature that it is adding to an environment at that very moment. Fixes prefix-dev#6620
Hofer-Julian
force-pushed
the
fix/error-message-unused-feature
branch
from
July 17, 2026 13:14
42c3b23 to
cfd275c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
A feature that is not part of any environment is never solved, so
pixi addhas no version to pin to and leaves the dependency at*. That is expected, but the surrounding UX was confusing:pixi add --feature test pytestnow explains that the dependency was not resolved or pinned, suggestspixi workspace environment addfollowed bypixi upgradeto pin it afterward.pixi workspace environment addno longer warns about an unused feature that it is adding to an environment at that very moment.Fixes #6620
How Has This Been Tested?
Added tests and tried it locally
AI Disclosure
Tools: Claude
Checklist: