Skip to content

feat: return error on build dispatch panic#4382

Merged
ruben-arts merged 1 commit intoprefix-dev:mainfrom
tdejager:fix/panic-build-dispatch
Aug 18, 2025
Merged

feat: return error on build dispatch panic#4382
ruben-arts merged 1 commit intoprefix-dev:mainfrom
tdejager:fix/panic-build-dispatch

Conversation

@tdejager
Copy link
Copy Markdown
Contributor

@tdejager tdejager commented Aug 18, 2025

We were now getting this ugly error message, on a BuildDispatch failure:

▪ solving              [━━━━━━━━━━━━━━━━━━━━]  1/1
⠒ updating lock-file   [00:00:00] [────────────────────────────────────────]    0/3
  ⠁ default:osx-arm64    [00:00:00] resolving sdist==0.0.0
thread 'main2' panicked at /Users/tdejager/development/prefix/pixi-work/crates/pixi_core/src/lock_file/resolve/build_dispatch.rs:419:14:
  ⠁ default:osx-arm64    [00:00:00] resolving sdist==0.0.0
thread 'main' panicked at src/main.rs:49:10:
Tokio executor failed, was there a panic?: Any { .. }

After this:

▪ solving              [━━━━━━━━━━━━━━━━━━━━]  1/1
⠤ updating lock-file   [00:00:00] [━━━━━━━━━━━━━╾──────────────────────────]    1/3
  ⠁ default:osx-arm64    [00:00:00] resolving sdist==0.0.0
thread 'main2' panicked at /Users/tdejager/development/prefix/pixi/crates/pixi_core/src/lock_file/resolve/build_dispatch.rs:429:17:
  ⠁ default:osx-arm64    [00:00:00] resolving sdist==0.0.0                                                                                                                                                            Error:   × failed to solve the pypi requirements of environment 'default' for platform 'osx-arm64'
  ╰─▶ build dispatch initialization failed: installation of conda environment is required to solve PyPI source dependencies but `--no-install` flag has been set

We still get the panic_handler message, but we would need to replace the default handler and I think thats pretty scary in an async context.

To run

[workspace]
authors = ["Tim de Jager <tdejager89@gmail.com>"]
channels = ["https://prefix.dev/conda-forge"]
name = "sdist"
platforms = ["osx-arm64"]
version = "0.1.0"

[tasks]

[dependencies]
python = ">=3.13.5,<3.14"
# on this branch
pixi add --pypi sdist --no-install

@tdejager tdejager requested review from nichmor and ruben-arts August 18, 2025 14:40
@ruben-arts ruben-arts enabled auto-merge (squash) August 18, 2025 15:05
@ruben-arts ruben-arts merged commit 84a0c7e into prefix-dev:main Aug 18, 2025
40 checks passed
Copy link
Copy Markdown
Contributor

@nichmor nichmor left a comment

Choose a reason for hiding this comment

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

looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants