Skip to content

COMP: Add line continuations to pixi task cmds for pixi 0.68 compatibility#6236

Merged
hjmjohnson merged 1 commit intoInsightSoftwareConsortium:mainfrom
hjmjohnson:comp-pixi-0.68-multiline-fix
May 8, 2026
Merged

COMP: Add line continuations to pixi task cmds for pixi 0.68 compatibility#6236
hjmjohnson merged 1 commit intoInsightSoftwareConsortium:mainfrom
hjmjohnson:comp-pixi-0.68-multiline-fix

Conversation

@hjmjohnson
Copy link
Copy Markdown
Member

Add backslash line continuations to all multi-line cmd blocks in
pyproject.toml so pixi tasks still execute as a single shell command
under pixi 0.68+. Unblocks Pixi-Cxx CI on every open ITK PR.

Root cause (pixi 0.68 behavior change)

pixi 0.68.0 was released 2026-05-08 and shipped
prefix-dev/pixi#5957,
which changes how multi-line TOML cmd blocks are interpreted.

Before 0.68 (deno_task_shell collapsed bare newlines to whitespace):

[tasks.configure-ci]
cmd = '''cmake
  -Bbuild
  -S.
  ...'''

executed as cmake -Bbuild -S. ... — a single cmake invocation.

After 0.68 (pixi joins non-empty, non-comment lines with && before
parsing), the same TOML executes as cmake && -Bbuild && -S. && ....
cmake runs first with no arguments, prints its Usage banner;
the next statement tries to execute -Bbuild as a command, fails
with command not found, and the task exits 127.

Per the pixi PR description, "Backslash line continuations are
merged"
— so adding a trailing \ on each non-final line
restores the legacy single-command semantics on pixi 0.68+ and is
a no-op on earlier versions.

Affected ITK CI shape

The prefix-dev/setup-pixi@v0.8.1 action used by ITK's .github/workflows/pixi.yml
does not pin a pixi-version, so it pulls the latest release. Yesterday
runs got 0.67.2 (working); today's runs got 0.68.0 (broken).

Pixi-Cxx job Yesterday (0.67.2) Today (0.68.0)
Pixi-Cxx (ubuntu-22.04) ✅ pass ❌ fail (1m22s, exit 127)
Pixi-Cxx (macos-15) ✅ pass ❌ fail (1m10s, exit 127)
Pixi-Cxx (windows-2022) ✅ pass ❌ fail (1m11s, exit 127)

Confirmed by re-running PR #6234 today: same code that passed
yesterday now fails with the same Usage / -Bbuild: command not found / Available tasks: signature. Same applies to PR #6235
and any open PR whose latest CI run fired today.

What this PR changes

Adds a trailing \ to every non-final, non-empty, non-already-&&-terminated
line of every multi-line cmd in pyproject.toml. Six tasks are
touched:

  • configure
  • configure-ci
  • configure-debug
  • configure-release
  • configure-python
  • configure-debug-python

The two python-exe tasks already terminate their first line with
&& (so per pixi 0.68's "lines already ending in a shell control
operator (&&, ||, |, ;, &) aren't double-separated"
rule
they continue to work unmodified).

53 insertions / 53 deletions; no semantic change beyond restoring
the previous single-command execution model.

Local validation
  • python3 -c "import tomllib; tomllib.load(open('pyproject.toml','rb'))": parses cleanly
  • pre-commit run --all-files: clean
  • Behavior under pre-0.68 pixi: backslash continuations have always been merged by deno_task_shell, so this change is a no-op on the previous version

…ility

pixi 0.68.0 (released 2026-05-08) changes how multi-line task cmds are
parsed.  Per pixi PR prefix-dev/pixi#5957, bare newlines that were
previously joined as whitespace are now joined with '&&', so

    cmd = '''cmake
      -Bbuild
      -S.
      ...'''

is no longer executed as 'cmake -Bbuild -S. ...' but as 'cmake &&
-Bbuild && -S. && ...'.  cmake then runs with no arguments and prints
its Usage banner; the next line tries to execute '-Bbuild' as a
command and fails with 'command not found'; the task exits 127.
Backslash line continuations preserve the legacy single-command
behavior on both pre- and post-0.68 pixi versions.

Affected tasks (all multi-line cmake invocations under
[tool.pixi.feature.cxx.tasks]):

  configure
  configure-ci
  configure-debug
  configure-release
  configure-python
  configure-debug-python

The two python-exe tasks already terminate the first line with '&&'
so they are not double-separated by 0.68's logic and need no
modification.

Fixes the global ITK CI Pixi-Cxx breakage observed across all open
PRs since pixi 0.68.0 became the default in prefix-dev/setup-pixi.
@github-actions github-actions Bot added the type:Compiler Compiler support or related warnings label May 8, 2026
@hjmjohnson hjmjohnson marked this pull request as ready for review May 8, 2026 13:05
@hjmjohnson hjmjohnson self-assigned this May 8, 2026
@hjmjohnson hjmjohnson requested a review from dzenanz May 8, 2026 13:06
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 8, 2026

Greptile Summary

This PR adds trailing backslash line continuations to all multi-line cmd blocks in pyproject.toml, restoring single-command execution semantics for pixi 0.68+ which changed how bare newlines in TOML cmd strings are parsed.

  • Six cmake configure tasks (configure, configure-ci, configure-debug, configure-release, configure-python, configure-debug-python) receive a \\ suffix on every non-final argument line; the last line before the closing ''' is left unchanged in each case.
  • The two python-exe tasks already end their first line with && and are correctly left unmodified, since pixi 0.68 exempts lines already terminated by a shell control operator.

Confidence Score: 5/5

Safe to merge immediately — the change is a purely mechanical addition of backslash continuations with no semantic effect on pre-0.68 pixi and the exact fix needed for 0.68+.

Every non-final argument line in all six affected cmake tasks gains a trailing \; the closing lines are left without a backslash, which is correct. The two &&-terminated tasks are untouched. The TOML file parses cleanly, the transform is symmetric, and it unblocks CI across all open PRs without touching any build logic.

No files require special attention. Reviewers may optionally consider pinning the pixi-version in .github/workflows/pixi.yml via prefix-dev/setup-pixi to prevent similar breakage from future pixi releases, but that is outside the scope of this PR.

Important Files Changed

Filename Overview
pyproject.toml Mechanical addition of \ line continuations to all six multi-line cmake cmd blocks; TOML parses cleanly and semantics are preserved across both pre-0.68 and 0.68+ pixi versions.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["pixi task invoked\n(e.g. pixi run configure)"] --> B{pixi version?}
    B -- "< 0.68\n(deno_task_shell)" --> C["bare newlines → whitespace\ncmd runs as single cmake invocation ✅"]
    B -- ">= 0.68\n(new parser)" --> D{line ends with\nbackslash?}
    D -- "YES (this PR)" --> E["continuation merged\ncmd runs as single cmake invocation ✅"]
    D -- "NO (before this PR)" --> F["each line joined with &&\ncmake runs with no args → exit 127 ❌"]
Loading

Reviews (1): Last reviewed commit: "COMP: Add line continuations to pixi tas..." | Re-trigger Greptile

@hjmjohnson hjmjohnson requested a review from thewtex May 8, 2026 13:07
@hjmjohnson
Copy link
Copy Markdown
Member Author

@dzenanz All CI will fail until this is included. The github CI have update to pixi 0.68, and we are not compatible with that version in our pyproject.toml file.

The change is backward compatible with pre pixi 0.68

@hjmjohnson hjmjohnson merged commit ad0af23 into InsightSoftwareConsortium:main May 8, 2026
16 of 18 checks passed
hjmjohnson added a commit to hjmjohnson/ITK that referenced this pull request May 8, 2026
Phase A v4 ingest of the standalone remote module
ntustison/ITKAdaptiveDenoising into Modules/Filtering/AdaptiveDenoising/.
Whitelisted upstream history was sanitized via the v4 pipeline
(see InsightSoftwareConsortium#6204), then stripped of all raw
.nrrd test fixtures via 'git filter-repo --invert-paths' so that no
raw binary blobs land in ITK's git history.  Sibling .cid stubs are
added in a follow-up commit; their fetch path is published via
ITKTestingData PR InsightSoftwareConsortium#48.

Stacked on the pixi 0.68 multi-line cmd compatibility fix from InsightSoftwareConsortium#6236.
hjmjohnson added a commit to hjmjohnson/ITK that referenced this pull request May 8, 2026
Phase A v4 ingest of the standalone remote module
ntustison/ITKAdaptiveDenoising into Modules/Filtering/AdaptiveDenoising/.
Whitelisted upstream history was sanitized via the v4 pipeline
(see InsightSoftwareConsortium#6204), then stripped of all raw
.nrrd test fixtures via 'git filter-repo --invert-paths' so that no
raw binary blobs land in ITK's git history.  Sibling .cid stubs are
added in a follow-up commit; their fetch path is published via
ITKTestingData PR InsightSoftwareConsortium#48.

Stacked on the pixi 0.68 multi-line cmd compatibility fix from InsightSoftwareConsortium#6236.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:Compiler Compiler support or related warnings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants