Skip to content

Stop and prefix F# sh commands in parallel stages; list switches in wrappers - #137

Merged
Mpdreamz merged 35 commits into
mainfrom
make/gaps
Nov 12, 2026
Merged

Mpdreamz merged 35 commits into
mainfrom
make/gaps

Conversation

@Mpdreamz

@Mpdreamz Mpdreamz commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

F# sh commands in a parallel stage now carry their target's name and stop when another target fails, and the generated wrappers list the new run switches.

Prompt summary: Close the gaps the earlier PRs left. Breaking the wrapper output is fine.

Why

Proc.Fs ran a target { } block with a token that could not be cancelled, so its sh commands wrote to the shared console: no target name on their lines, and a failing sibling did not stop them. The mise include's usage spec did not list --graph, -j, -k, --output or --skip, so mise did not complete them.

What

F# sh in parallel stages

While targets run side by side, target { } runs its block with the run's cancellation token through Proc.Fs's ShellBuilder.Run(step, cancellationToken). Its commands then print through Console.Out, where each line gets the target's name, and cancelling stops the running command. A run without a parallel stage passes no token, so commands keep the console and its colours. Proc and Proc.Fs move to 0.22.0.

Wrapper switches

The mise include lists the five switches. A build option with the same short name keeps it, as on the command line.

Breaking: committed wrapper files change, so __wrappers check fails until __wrappers sync runs once.

Blocked: this needs Proc and Proc.Fs 0.22.0, which nullean/proc#51 adds. Restore fails until that is released.

Verify

dotnet test --project tests/Nullean.Make.Fs.Tests -c Release --treenode-filter "/*/*/*ParallelShellTests*/*"
dotnet test --project tests/Nullean.Make.Tests -c Release --treenode-filter "/*/*/WrapperTests/*"

Stack: 6 of 6, on top of #136

🤖 Generated with Claude Code

Mpdreamz and others added 9 commits November 12, 2026 08:25
A dependency such as `Test { Filter = Some "Unit" }` or `new Test("Unit")` ran with the case's defaults in the
union and F# surfaces, and with the named target's own arguments in the class and F# surfaces. Each surface now
hands the planner a target source, and a run is planned as instances: a target and a value. Equal values run
once, different values once each, and only the named target binds the command line. The union app's --version
prints the entry assembly's informational version instead of 0.0.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`--graph` plans the run as the target would, with its arguments bound, `-s` applied and conditions evaluated,
then draws it and runs nothing. Skipped targets show with the reason. It draws a tree with the run order below
it, a Mermaid flowchart or JSON. A target's help lists the order its dependencies run in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A command declares a stage whose targets run at once: `.Parallel(...)` in C#, `concurrently [...]` in F#,
where `parallel` is reserved. The run starts each target once everything it waits for has finished, up to
`-j` targets at a time. The first failure cancels the targets still running; `-k` lets the ones that do not
depend on it finish. While targets run side by side their output carries their names, or `--output grouped`
writes each target's lines together. Lists keep running in order, so a build without a parallel stage runs as
before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…urface

`OnlyWhen` skips a body, and the union and F# surfaces now have it too. `After` orders a target after another
in the same run without adding it. `Cleanup` runs targets at the end of the run once a target started, even
after a failure. `NeedsEnv` and `NeedsTool` are checked for every target before the first one starts, and the
run lists everything missing. F# pipes a target through `onlyWhen`, `after`, `cleanup`, `needsEnv`, `needsTool`
and `describe`; `describe` gives an .fsx script its descriptions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… --skip

`build lint test --filter Unit pack` runs the three targets in order, sharing their dependencies. Each target
takes the arguments up to the next target's name; an option's value and a target's positionals stay with it.
`--skip <target>` leaves a target out of the plan with the dependencies only it needed, and `--graph` shows it
as skipped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The mise include's usage spec now lists `--graph`, `-j/--jobs`, `-k/--keep-going`, `--output` and `--skip`, so
mise completes them. A build option with the same short name keeps it, as on the command line. Committed
wrapper files change, so `__wrappers check` fails until `__wrappers sync` runs once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A `target { }` block that runs side by side with others now runs its `shell { }` with the run's cancellation
token, through Proc.Fs's new `ShellBuilder.Run(step, cancellationToken)`. Its `sh` commands print through
`Console.Out`, so their lines carry the target's name, and a failure elsewhere stops them. A run without a
parallel stage leaves them on the console. Moves Proc and Proc.Fs to 0.21.0, the first release with that
overload.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Mpdreamz Mpdreamz added the breaking Breaks a public API or behaviour (0.x: minor bump, 1.x+: major) label Nov 12, 2026
Mpdreamz and others added 19 commits November 12, 2026 11:51
# Conflicts:
#	Directory.Packages.props
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	src/Nullean.Make/Execution/DepGraphExecutor.cs
#	src/Nullean.Make/Execution/RunPlan.cs
#	src/Nullean.Make/MakeAppOfT.cs
#	tests/Nullean.Make.Fs.Tests/Nullean.Make.Fs.Tests.fsproj
# Conflicts:
#	docs/_docset.yml
#	docs/make/index.md
#	src/Nullean.Make.Fs/MakeApp.fs
#	src/Nullean.Make/Execution/DepGraphExecutor.cs
#	src/Nullean.Make/Help/MakeHelpPrinter.cs
#	src/Nullean.Make/MakeAppOfT.cs
#	src/Nullean.Make/Parsing/ArgvParser.cs
#	tests/Nullean.Make.Fs.Tests/Nullean.Make.Fs.Tests.fsproj
@Mpdreamz
Mpdreamz changed the base branch from make/cli to main November 12, 2026 11:52
Mpdreamz added a commit that referenced this pull request Nov 12, 2026
A command line can name several targets, `build lint test --filter Unit
pack`, and `--skip <target>` leaves a target out of the plan.

**Prompt summary:** The remaining make-like features from the gap list:
running several targets in one invocation, and skipping one target
rather than every gate.

## Why

`build test pack` treated `pack` as an argument of `test`, so the
wrappers documented that `make test pack` starts the script twice. `-s`
skips every gate of the named target; there was no way to drop one
target, such as `docs`, from a `release`.

## What

#### Several targets
The targets run in the order they are named and share their
dependencies. Each takes the arguments up to the next target's name. A
word stays with the target before it when it is the value of an option
before it, or when that target takes positional arguments; everything
after `--` stays too. F# still rejects a word for a target without a
record.

#### `--skip`
`--skip docs`, or a comma-separated list, accepting `pkg generate`,
`pkg/generate` and `pkg:generate`. The plan leaves the target out
wherever it appears, with the dependencies only it needed. `--graph`
shows it as `skipped: --skip`. An unknown name exits `2` with a
suggestion; naming a target the command line runs exits `2`.

#### Package skills
The `nullean-make` and `nullean-make-fs` skills that ship in the
packages describe every feature of this stack.

## Verify

```bash
dotnet run build.cs -- clean build --graph
dotnet run build.cs -- release --skip test --graph
```

**Stack:** 5 of 6, on top of
[#135](#135); next:
[#137](#137)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@Mpdreamz
Mpdreamz merged commit bc60564 into main Nov 12, 2026
13 checks passed
@Mpdreamz
Mpdreamz deleted the make/gaps branch November 12, 2026 11:57
Mpdreamz added a commit that referenced this pull request Nov 12, 2026
`build.cs` now pins Proc 0.22.0, the version Nullean.Make and
Nullean.Make.Fs already build on. Proc 0.22.0 is a feature release: "Run
a shell block until a cancellation token is cancelled".

- **Bump:** Proc `0.17.0` → `0.22.0` in `build.cs` (`#:package`, and the
activation comment's stale `0.13.0`). `Directory.Packages.props` already
moved Proc and Proc.Fs to `0.22.0` in #137, so it does not change here.

## Verify

- `mise run ci`: 579/579 tests passed, schema validated, pack,
nupkg-validator, API diff and `curb check` (0 would change) all passed.
- `mise run check`: curb clean, zizmor no findings.
- Clean-cache `NUGET_PACKAGES=$(mktemp -d) DOTNET_CLI_HOME=$(mktemp -d)
dotnet tool restore`: succeeded.
- `check-package-readme.sh` on all six nupkgs: all OK.
- Packed nuspecs: Nullean.Make depends on `Proc` `0.22.0`,
Nullean.Make.Fs on `Proc.Fs` `0.22.0`.
- `dotnet build build.cs` succeeds and `dotnet run build.cs -- --help`
lists the targets.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Breaks a public API or behaviour (0.x: minor bump, 1.x+: major)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant