Skip to content

feat: ensure run exports#4179

Merged
nichmor merged 19 commits intoprefix-dev:mainfrom
remimimimimi:feat/ensure-run-exports
Aug 15, 2025
Merged

feat: ensure run exports#4179
nichmor merged 19 commits intoprefix-dev:mainfrom
remimimimimi:feat/ensure-run-exports

Conversation

@remimimimimi
Copy link
Copy Markdown
Contributor

@remimimimimi remimimimimi commented Jul 22, 2025

Blocked by conda/rattler#1540

@lucascolley lucascolley added enhancement New features area:build Related to pixi build labels Jul 23, 2025
@remimimimimi remimimimimi force-pushed the feat/ensure-run-exports branch 9 times, most recently from ba3c34a to bb82fbb Compare July 28, 2025 12:12
@ruben-arts
Copy link
Copy Markdown
Contributor

ruben-arts commented Aug 4, 2025

To trigger the different code paths, on checking the run_exports you can test it with:

# Using the latest build of `pixi-build-cmake` from your local path
> cd path/to/pixi-build-backend
> pixi run install-pixi-build-cmake
[workspace]
channels = ["https://prefix.dev/conda-forge"]
platforms = ["win-64", "linux-64", "osx-64", "osx-arm64"]
preview = ["pixi-build"]

[dependencies]
sdl_example = { path = "." }

[tasks.start]
cmd = "sdl_example"

[package]
name = "sdl_example"
version = "0.1.0"

[package.build]
backend = { name = "pixi-build-cmake", version = "0.1.*" }

[package.host-dependencies]
# This ensures that SDL2 is available at build time.
sdl2 = ">=2.26.5,<3.0"
PIXI_BUILD_BACKEND_OVERRIDE_ALL=1 pixi install

Now replace the https://prefix.dev/conda-forge with conda-forge
And now you'll be able to trigger the code path with different metadata resolving.

edit: for memory, this was the error we hit as the run_exports where not implemented for the new path:

not implemented: Extracting run exports from other places is not implemented yet
Error:   ⚠ failed to solve 'default' for osx-arm64
  ╰─▶ the operation was cancelled

@remimimimimi remimimimimi force-pushed the feat/ensure-run-exports branch from bca5c2b to 9ad54db Compare August 5, 2025 09:37
@remimimimimi remimimimimi marked this pull request as ready for review August 5, 2025 09:45
Copy link
Copy Markdown
Contributor

@baszalmstra baszalmstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you even test this @remimimimimi ?

The implementation is buggy, using @ruben-arts reproducer your code is not run. When I fix the flaws (as suggestions from this review), we reach unreachable code.

thread '<unnamed>' panicked at crates\pixi_command_dispatcher\src\build\dependencies.rs:233:17:
internal error: entered unreachable code: We tried to make sure that run exports are available but something went wrong
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error:   ⚠ failed to solve requirements of environment 'default' for platform 'win-64'
  ╰─▶ the operation was cancelled

@magentaqin
Copy link
Copy Markdown
Contributor

To trigger the different code paths, on checking the run_exports you can test it with:

# Using the latest build of `pixi-build-cmake` from your local path
> cd path/to/pixi-build-backend
> pixi run install-pixi-build-cmake
[workspace]
channels = ["https://prefix.dev/conda-forge"]
platforms = ["win-64", "linux-64", "osx-64", "osx-arm64"]
preview = ["pixi-build"]

[dependencies]
sdl_example = { path = "." }

[tasks.start]
cmd = "sdl_example"

[package]
name = "sdl_example"
version = "0.1.0"

[package.build]
backend = { name = "pixi-build-cmake", version = "0.1.*" }

[package.host-dependencies]
# This ensures that SDL2 is available at build time.
sdl2 = ">=2.26.5,<3.0"
PIXI_BUILD_BACKEND_OVERRIDE_ALL=1 pixi install

Now replace the https://prefix.dev/conda-forge with conda-forge And now you'll be able to trigger the code path with different metadata resolving.

edit: for memory, this was the error we hit as the run_exports where not implemented for the new path:

not implemented: Extracting run exports from other places is not implemented yet
Error:   ⚠ failed to solve 'default' for osx-arm64
  ╰─▶ the operation was cancelled

@ruben-arts Could you check this again? I run it locally, it's fixed!

@magentaqin
Copy link
Copy Markdown
Contributor

Did you even test this @remimimimimi ?

The implementation is buggy, using @ruben-arts reproducer your code is not run. When I fix the flaws (as suggestions from this review), we reach unreachable code.

thread '<unnamed>' panicked at crates\pixi_command_dispatcher\src\build\dependencies.rs:233:17:
internal error: entered unreachable code: We tried to make sure that run exports are available but something went wrong
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error:   ⚠ failed to solve requirements of environment 'default' for platform 'win-64'
  ╰─▶ the operation was cancelled

@baszalmstra Hi, Bas. I think it's already fixed. Could you please check it again?

@baszalmstra
Copy link
Copy Markdown
Contributor

You'll hit it instantly if you change the channel from https://prefix.dev/conda-forge to conda-forge.

@magentaqin
Copy link
Copy Markdown
Contributor

You'll hit it instantly if you change the channel from https://prefix.dev/conda-forge to conda-forge.

I tested with the channels:

channels = [
  "https://prefix.dev/pixi-build-backends",
   "conda-forge",
]

It runs well on my machine. Or do I need to remove https://prefix.dev/pixi-build-backends?

@ruben-arts
Copy link
Copy Markdown
Contributor

This works now! 🚀

@nichmor nichmor enabled auto-merge (squash) August 14, 2025 13:38
@baszalmstra baszalmstra self-requested a review August 15, 2025 09:46
@nichmor nichmor merged commit 65b1627 into prefix-dev:main Aug 15, 2025
108 of 110 checks passed
tdejager pushed a commit to tdejager/pixi that referenced this pull request Aug 15, 2025
Co-authored-by: Magenta <magenta2127@gmail.com>
Co-authored-by: Bas Zalmstra <4995967+baszalmstra@users.noreply.github.com>
Co-authored-by: nichmor <nmorkotilo@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:build Related to pixi build enhancement New features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants