fix(pixi): repair multi-line cmake task commands broken by pixi 0.70#1539
Merged
thewtex merged 1 commit intoJun 26, 2026
Merged
Conversation
Recent pixi (>= 0.70, deno_task_shell) treats a bare newline in a multi-line `cmd` string as a command terminator. The `configure-itk*` cmake tasks split their flags across lines without a continuation token, so only `cmake ... -GNinja` ran and each subsequent `-D...` line was executed as its own command, failing the Native C++ CI with "command not found" (exit code 127). Append a trailing `\` to each continued line so all flags are passed to a single cmake invocation, in both the root workspace manifest and the create-itk-wasm project generator template (which emitted the same broken pattern for every scaffolded project). Also: - Add a create-itk-wasm regression test (test:pixiToml) that generates a pixi.toml with the real generator and asserts every multi-line `cmd` line ends with a shell continuation token. - Upgrade pixi.lock from format v6 to v7 (re-solved from locked content; identical package set) to clear the pixi install warning. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
7f4e4f6
into
InsightSoftwareConsortium:main
175 of 278 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Repairs the multi-line cmake task commands in the pixi manifests, which recently began failing the Native C++ CI workflow with exit code 127. The same broken pattern was also fixed in the
create-itk-wasmproject generator (so newly scaffolded projects are not born broken) and guarded with a regression test.Fixes the failure seen in Native C++ run #27805452478.
Root cause
Recent pixi (≥ 0.70, which switched its task runner to
deno_task_shell) treats a bare newline inside a multi-linecmdstring as a command terminator. Theconfigure-itk*cmake tasks laid out their flags one-per-line with no continuation token:Under the new parser, only
cmake … -GNinjaran (configuring ITK with default flags), and every subsequent-D…line was executed as its own command, producing-DCMAKE_CXX_STANDARD:STRING=20: command not foundfor each flag and ultimately exit code 127. This was reproduced locally with pixi 0.70.1.Changes
pixi.toml— Added a trailing\line continuation to every wrapped line of theconfigure-itk,configure-itk-wasm, and tenconfigure-native-*cmake tasks, so all-Dflags are passed to a singlecmakeinvocation. Layout and behavior are otherwise unchanged.packages/core/typescript/create-itk-wasm/src/generate/pixi-toml.ts— The scaffolding generator emitted the same broken pattern in itsconfigure-itk,configure-itk-wasm, andconfigure-nativetasks, so every generated project would break identically under pixi ≥ 0.70. Applied the same\continuation fix in the template literal.packages/core/typescript/create-itk-wasm/src/test-pixi-toml.ts(new) — Regression test that runs the realgeneratePixiTomlinto a temp directory and asserts that every line of each multi-linecmd(except the last) ends with a shell continuation token (\,&&,||,|,&). Wired into the package'stestscript astest:pixiToml.pixi.lock— Upgraded from lockfile format v6 → v7 viapixi lockto clear thepixi installformat warning. Re-solved from locked content only; the resolved package set is identical (534 packages, none added or removed).Implementation notes
\\within the JS template literal, which emits a literal backslash + newline into the generatedpixi.toml— verified the output matches the hand-fixed root manifest.packages/*/pixi.tomlmanifests were checked and left unchanged: their multi-line commands already terminate each line with&&, which the new parser continues correctly.Testing
pnpm --filter create-itk-wasm buildthentest:pixiTomlpasses (15 multi-line commands checked).pixi install --lockedandpixi list --lockedrun clean with no format warning.🤖 Generated with Claude Code