Skip to content

bug(pypi): solve-group fails when the group contains a dependency as both editable and not #4853

@gbolmier

Description

@gbolmier

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

Commands I ran and their output:

$ pixi install --all
Error:   × failed to solve the pypi requirements of environment 'dev-prod' for platform 'osx-arm64'
  ├─▶ failed to resolve pypi dependencies
  ╰─▶ Requirements contain conflicting URLs for package `project`:
      - file:///Users/gbolmier/Documents/repositories/project
      - file:///Users/gbolmier/Documents/repositories/project (editable)

pyproject.toml file that reproduces my issue:

[project]
name    = "project"
version = "0.1.0"

[tool.pixi.workspace]
channels  = ["conda-forge"]
platforms = ["osx-arm64"]

[tool.pixi.environments]
dev  = { features = ["project-editable"], solve-group = "dev-prod" }
prod = { features = ["project"],          solve-group = "dev-prod" }

[tool.pixi.feature.project-editable.pypi-dependencies]
project = { path = ".", editable = true }

[tool.pixi.feature.project.pypi-dependencies]
project = { path = "." }

pixi info output:

System
------------
       Pixi version: 0.59.0
           Platform: osx-arm64
   Virtual packages: __unix=0=0
                   : __osx=15.6.1=0
                   : __archspec=1=m2
          Cache dir: /Users/gbolmier/Library/Caches/rattler/cache
       Auth storage: /Users/gbolmier/.rattler/credentials.json
   Config locations: No config files found

Global
------------
            Bin dir: /Users/gbolmier/.pixi/bin
    Environment dir: /Users/gbolmier/.pixi/envs
       Manifest dir: /Users/gbolmier/.pixi/manifests/pixi-global.toml

Workspace
------------
               Name: project
            Version: 0.1.0
      Manifest file: /Users/gbolmier/Documents/repositories/project/pyproject.toml

Environments
------------
        Environment: default
           Features: default
           Channels: conda-forge
   Dependency count: 1
       Dependencies: python
   Target platforms: osx-arm64
    Prefix location: /Users/gbolmier/Documents/repositories/project/.pixi/envs/default

        Environment: dev
           Features: project-editable, default
        Solve group: dev-prod
           Channels: conda-forge
   Dependency count: 1
       Dependencies: python
  PyPI Dependencies: project
   Target platforms: osx-arm64
    Prefix location: /Users/gbolmier/Documents/repositories/project/.pixi/envs/dev

        Environment: prod
           Features: project, default
        Solve group: dev-prod
           Channels: conda-forge
   Dependency count: 1
       Dependencies: python
  PyPI Dependencies: project
   Target platforms: osx-arm64
    Prefix location: /Users/gbolmier/Documents/repositories/project/.pixi/envs/prod

Issue description

I'm not sure if this is a bug report or a feature request.

solve-group fails when the group contains a dependency as both editable and not. For example, Env1 depends on a given local package and Env2 depends on the same package but in editable mode.

Expected behavior

I would expect it to not fail as from what I understand, whether a local package is installed as editable or not shouldn't change that package dependencies. Please let me know if I'm missing something.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpypiIssue related to PyPI dependencies

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions