Skip to content

pinning-strategy is ignored for unused features #3245

Description

@irm-codebase

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

Create a new project, and make sure to modify config.toml with:

pixi init

Change the pinning strategy in .pixi/config.toml

pinning-strategy = "latest-up"

Then install both a regular dependency and a 'feature' dependency.
The pinning strategy will be disobeyed by the second.

pixi add numpy   # Will use >= xxx

pixi add --feature dev mypy pytest ruff # Will use "*"

Issue description

pinning-strategy is ignored when using dependency groups / feature.

Expected behavior

The pinning strategy should be enforced regardless of group.

Activity

  1. kilian-hu commented on Aug 2, 2025

    @kilian-hu
    Contributor

    The underlying problem is that the feature you are adding the dependency to is not used by any environment yet, which is why the solver does not even run, hence no version information which results in the wildcard version *. I wrote down a bit more in this comment #4065 (comment)

  2. added theissue type on Aug 2, 2025
  3. added
    configuration
    on Aug 2, 2025
  4. changed the title [-]`pinning-strategy` is ignored when using dependency groups / feature.[/-] [+]`pinning-strategy` is ignored for unused features[/+] on Aug 24, 2025
  5. lucascolley commented on Aug 24, 2025

    @lucascolley
    Member

    gh-4065 cleared up the confusion that this happens for unused features. I'll keep this issue open as maybe it would be possible to include a solve step for unused features and apply pinning-strategy via that.

  6. added
    bug
    on Sep 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:addbugconfiguration

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions