-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Summary
The pixi-build-rattler-build backend currently only supports debug-dir and extra-input-globs configuration options. It would be very useful to add an extra-args option (similar to pixi-build-cmake) to pass arbitrary flags to the underlying rattler-build invocation.
Use Case
I'm building a multi-output conda package using the cache: feature in my recipe.yaml. This feature requires the --experimental flag to be passed to rattler-build:
# recipe.yaml
schema_version: 1
cache:
source:
path: ../repo
# ... shared build configuration
outputs:
- package:
name: my-package-libs
# ...
- package:
name: my-package-devel
# ...When running rattler-build build --experimental -r recipe.yaml directly, this works fine. However, when using pixi build, there's no way to pass the --experimental flag through the backend.
Current Behavior
# pixi.toml
[package.build]
backend = { name = "pixi-build-rattler-build", version = "*" }
[package.build.config]
extra-args = ["--experimental"] # ❌ Not supportedResults in:
Error: unknown field `extra-args`, expected one of `debug-dir`, `debug_dir`, `extra-input-globs`
Proposed Solution
Add an extra-args configuration option to pixi-build-rattler-build, similar to how pixi-build-cmake handles it:
[package.build.config]
extra-args = ["--experimental"]This would allow users to pass any rattler-build CLI flags through pixi, including:
--experimental- for experimental features likecache:--no-test- to skip tests--keep-build- to preserve build directory- Any future flags
Alternatives Considered
-
Add only an
experimental = trueoption: This would solve my immediate problem but wouldn't be as flexible for other use cases. -
Restructure the recipe to avoid
cache:: This would require either building multiple times (very slow for large projects like LLVM) or using a single monolithic package. -
Use
rattler-builddirectly instead ofpixi build: Loses the benefits of pixi's dependency management and workspace features.
Additional Context
- The CMake backend already supports
extra-args: https://github.com/prefix-dev/pixi-build-backends/blob/main/docs/backends/pixi-build-cmake.md - Related pixi PR that added
[package.build.configuration]: feat: implementpackage.build.configurationparsing pixi#3115