Skip to content

bug(upgrade): fails for platform-specific targets #4297

@matthewfeickert

Description

@matthewfeickert

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 init example && cd example
$ pixi add --platform linux-64 'python 3.12'
$ pixi upgrade
[workspace]
channels = ["conda-forge"]
name = "example"
platforms = ["linux-64"]
version = "0.1.0"

[tasks]

[dependencies]

[target.linux-64.dependencies]
python = "==3.12"

Issue description

Description

It seems that (for Pixi v0.50.2) if a Pixi manifest is created that has a platform specific target then pixi upgrade fails for the manifest, though pixi update works.

Example

If I start by creating the following Pixi manifest

$ pixi init example && cd example
$ pixi add 'python 3.12'
[workspace]
channels = ["conda-forge"]
name = "example"
platforms = ["linux-64"]
version = "0.1.0"

[tasks]

[dependencies]
python = "==3.12"

then I can upgrade it with pixi upgrade

$ pixi upgrade
Environment: default
  - C liblzma-devel   5.8.1 hb9d3cd8_2
  + C libmpdec        4.0.0 hb9d3cd8_0
  - C libnsl          2.0.1 hb9d3cd8_1
  ~ C python          3.12.0 hab00c5b_0_cpython  ->  3.13.5 hec9711d_102_cp313
  + C python_abi      3.13 8_cp313
  - C xz              5.8.1 hbcc6ac9_2
  - C xz-gpl-tools    5.8.1 hbcc6ac9_2
  - C xz-tools        5.8.1 hb9d3cd8_2
[workspace]
channels = ["conda-forge"]
name = "example"
platforms = ["linux-64"]
version = "0.1.0"

[tasks]

[dependencies]
python = ">=3.13.5,<3.14"

However, if I now create this same manifest but create a platform specific target

$ pixi init example && cd example
$ pixi add --platform linux-64 'python 3.12'
[workspace]
channels = ["conda-forge"]
name = "example"
platforms = ["linux-64"]
version = "0.1.0"

[tasks]

[dependencies]

[target.linux-64.dependencies]
python = "==3.12"

then pixi upgrade fails to upgrade.

$ pixi upgrade  # no output
[workspace]
channels = ["conda-forge"]
name = "example"
platforms = ["linux-64"]
version = "0.1.0"

[tasks]

[dependencies]

[target.linux-64.dependencies]
python = "==3.12"

Running with --verbose doesn't seem to provide additional useful information.

$ pixi upgrade --verbose
 INFO pixi::environment::conda_metadata: No update needed for the prefix file.
 INFO pixi::lock_file::update: Installed environment 'default' in 25.756145ms

pixi info

System
------------
       Pixi version: 0.50.2
           Platform: linux-64
   Virtual packages: __unix=0=0
                   : __linux=6.8.0=0
                   : __glibc=2.35=0
                   : __cuda=12.9=0
                   : __archspec=1=skylake
          Cache dir: /home/feickert/.cache/rattler/cache
       Auth storage: /home/feickert/.rattler/credentials.json
   Config locations: No config files found

Global
------------
            Bin dir: /home/feickert/.pixi/bin
    Environment dir: /home/feickert/.pixi/envs
       Manifest dir: /home/feickert/.pixi/manifests/pixi-global.toml

Workspace
------------
               Name: example
            Version: 0.1.0
      Manifest file: /tmp/example/pixi.toml
       Last updated: 08-08-2025 22:04:13

Environments
------------
        Environment: default
           Features: default
           Channels: conda-forge
   Dependency count: 1
       Dependencies: python
   Target platforms: linux-64
    Prefix location: /tmp/example/.pixi/envs/default


Expected behavior

pixi upgrade would upgrade the entire manifest.

$ pixi init example && cd example
$ pixi add --platform linux-64 'python 3.12'
[workspace]
channels = ["conda-forge"]
name = "example"
platforms = ["linux-64"]
version = "0.1.0"

[tasks]

[dependencies]

[target.linux-64.dependencies]
python = "==3.12"
$ pixi upgrade
[workspace]
channels = ["conda-forge"]
name = "example"
platforms = ["linux-64"]
version = "0.1.0"

[tasks]

[dependencies]

[target.linux-64.dependencies]
python = ">=3.13.5,<3.14"

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:upgradeRelated to pixi upgradebugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions