Skip to content

Nested source dependencies ignore workspace Git declarations #6925

Description

@fhaefele

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 pixi.toml:

[workspace]
channels = ["conda-forge"]
platforms = ["linux-64"]
preview = ["pixi-build"]

[dependencies]
r-base = ">=4.5,<4.6"

r-aomisc = {
  git = "https://github.com/OnofriAndreaPG/aomisc.git",
  rev = "f861226c38292a2fb7bfc4fa9b11e0c34e29c4cb",
  package.build.backend = {
    name = "pixi-build-r",
    version = "*",
    channels = [
      "https://prefix.dev/pixi-build-backends",
      "conda-forge",
    ],
  },
}

r-statforbiology = {
  git = "https://github.com/OnofriAndreaPG/statforbiology.git",
  rev = "4a13359a3f1263818e7d9b6fa61fe976ba7a8f96",
  package.build.backend = {
    name = "pixi-build-r",
    version = "*",
    channels = [
      "https://prefix.dev/pixi-build-backends",
      "conda-forge",
    ],
  },
}

r-drcte = {
  git = "https://github.com/OnofriAndreaPG/drcte.git",
  rev = "a9b98be3e51cc4579be1f58e291d6db580238ebd",
  package.build.backend = {
    name = "pixi-build-r",
    version = "*",
    channels = [
      "https://prefix.dev/pixi-build-backends",
      "conda-forge",
    ],
  },
}

[tasks]
check = "Rscript -e 'library(aomisc); library(statforbiology); library(drcte)'"

Run:

pixi install -vv

Results in error output when trying to resolve the dependencies:

Error:   × failed to solve requirements of environment 'default' for platform  │ 'linux-64'                                                                 ├─▶   × failed to resolve source package 'r-aomisc' (at                      │     │ 'https://github.com/OnofriAndreaPG/aomisc.git @                      │     │ f861226c38292a2fb7bfc4fa9b11e0c34e29c4cb')                           │
  ├─▶   × failed to solve the host environment for package 'r-
  │     │ aomisc'
  │
  ├─▶   × failed to solve the environment
  │
  ╰─▶ Cannot solve the request because of: No candidates were found for r-
      statforbiology *.

Issue description

Description

I want to install r-aomisc directly from Git:

[dependencies]
r-aomisc = { git = "https://github.com/OnofriAndreaPG/aomisc.git" }

Its dependency chain includes packages unavailable from Conda Forge or R Forge:

r-aomisc
└── r-statforbiology
    └── r-drcte

pixi-build-r reads these dependencies from the R DESCRIPTION files and reports them as normal Conda package requirements. The solve fails because the packages do not exist on the configured channels.

As a workaround, I tried declaring the missing packages as separate Git dependencies in the same workspace as shown in the reproducible example. This also fails. During the nested solve, Pixi ignores the matching workspace Git declaration and still searches Conda channels for the package.

Actual behavior

The nested solve treats r-drcte as a binary-only requirement. It searches the configured Conda channels and fails because no candidate exists.

Declaring r-drcte as a top-level Git dependency does not affect that nested requirement.

Expected behavior

When backend metadata requires a package whose normalized name matches an explicit workspace source dependency, Pixi should use that source declaration while preserving the backend's version constraint.

Ideally, Pixi could resolve this dependency chain from only the r-aomisc declaration. At minimum, explicitly declaring the missing packages as Git dependencies should work.

Activity

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions