Repository navigation
Draw the plan with --graph, and show the run order in help - #133
Merged
Merged
Conversation
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>
This was referenced Nov 12, 2026
Mpdreamz
added a commit
that referenced
this pull request
Nov 12, 2026
A dependency that names a value now runs the target with that value, in
all three surfaces. Two references with equal values run the target
once; with different values, once each.
**Prompt summary:** The Make surfaces need parallel stages, a drawn run
graph and other make-like features. Before any of that, a target in a
run has to be identified by its value as well as its case, so `Test {
Filter = Some "Unit" }` and `Test { Filter = Some "Integration" }` can
both run.
## Why
`Test { Filter = Some "Unit" }` as an F# dependency resolved to the
`test` node and then bound the named target's command line, so it ran
with `None`. The test that covered it asserted `test:None:None`. A C#
union dependency such as `new Test("Unit")` ran with the case's
defaults, and the class surface bound the named target's arguments into
every step with options. The union app's `--version` printed `0.0.0`.
## What
#### A run is planned as instances
Each surface hands the planner a target source: the default value of a
node, how to bind the command line into it, and the dependencies and
body for a value. `RunPlan` expands the named target into instances, one
per target and value, and runs each once. A reference without a value
stands for the default one.
#### Dependencies keep their values
The union generator also registers how to read a case's value, so `new
Test("Unit")` reaches the planner. The class surface gets
`Test.With(new("Unit"))`. F# passes the case value as is. Only the named
target binds the command line, and it binds before anything runs, so a
bad flag fails before the dependencies start.
#### Log lines name the value
`Starting test (filter: Unit)`: the fields that differ from the default
value follow the route.
#### `--version`
The union app prints the entry assembly's informational version, as the
F# app already did.
## Verify
```bash
dotnet test --project tests/Nullean.Make.Tests -c Release --treenode-filter "/*/*/*DependencyValueTests/*"
dotnet test --project tests/Nullean.Make.Fs.Tests -c Release --treenode-filter "/*/*/*DependencyValueTests*/*"
```
**Stack:** 1 of 6; next:
[#133](#133)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
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
Mpdreamz
added a commit
that referenced
this pull request
Nov 12, 2026
A command can declare a stage whose targets run side by side:
`.Parallel(...)` in C#, `concurrently [...]` in F#. `-j` caps how many
run at once, and `-k` keeps going after a failure.
**Prompt summary:** Neither the C# nor the F# Make DSL can declare that
some targets run in parallel. The ask is to expose that in the DSL and
run it.
## Why
`DepGraphExecutor` ran the plan in a `foreach`. A release that packs
NuGet packages, builds docs and builds an image waited for each in turn.
## What
#### Parallel stages
C# union: `app.Command().Requires(new Test()).Parallel(new PackNuget(),
new Docs()).Composes(new Publish())`. Class: `.Parallel(PackNuget,
Docs)` on a command builder. F#: `concurrently [...]` in a `command { }`
block, because F# reserves `parallel` and warns on every use. Stages run
in declared order, requires before composes. Lists keep running in
order: a list item's dependencies wait for the item before it.
#### The scheduler
An instance starts once everything it waits for has finished, earliest
in the plan first, up to `-j` / `--jobs` at once (default: one per
processor). A plan without a parallel stage runs one target at a time,
as before. The first failure cancels the targets still running and
starts no more; `-k` / `--keep-going` lets those that do not depend on
it finish. Async bodies can take the token: `app.Target(async ct =>
...)`, or `MakeContext.Current.CancellationToken`.
#### Output
While targets run side by side, `Console.Out` and `Console.Error` are
replaced by a writer that prefixes each line with the target's name.
`Shell.Exec` streams its process through it and stops the process on
cancellation. `--output grouped` writes each target's lines together
when it finishes, as a collapsible group on GitHub Actions. A summary
lists each target's time against the wall-clock time.
#### Switches the build already declares
A global option the build declares itself keeps its name: a build with
its own `-k` keeps it, and `--keep-going` is left for the switch.
The public builder interfaces gain members (`Parallel`, `Requires`, an
`Executes` overload). Only the library implements them; the API diff
reports 0 breaking changes.
## Verify
```bash
dotnet test --project tests/Nullean.Make.Tests -c Release --treenode-filter "/*/*/*Parallel*/*"
dotnet test --project tests/Nullean.Make.Tests -c Release --treenode-filter "/*/*/OrderTests/*"
```
**Stack:** 3 of 6, on top of
[#133](#133); next:
[#135](#135)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
--graphdraws what a run would do and runs nothing: a tree with the run order below it, a Mermaid flowchart, or JSON. A target's--helplists the order its dependencies run in.Prompt summary: A Make script should be able to show its run graph in the terminal with a command that is built in, and help should show it too. The drawing has to evaluate what a run would skip and show those targets as skipped.
Why
There was no way to see what
release -swould run without running it. Help listed a target's direct dependencies only, not the order the whole plan runs in.What
--graphbuild release --graphplans the run exactly asbuild releasewould: it binds the target's arguments, applies-s, and evaluates eachOnlyWhencondition. The tree marks a gate-sskips asskipped: -sand a false condition asskipped: its condition is false, then printsRuns: a → b → c. A target two others depend on is drawn once and marked(above)after that. Without a target,--graphdraws every target nothing else depends on.Mermaid and JSON
--graph mermaidprints a flowchart with one edge per ordering (transitive edges removed) and skipped targets dashed.--graph jsonprintsroots, thentargetsin run order with their stages and what each waits for.Help
A target's or command's
--helpprintsRuns:with the order of a bare invocation, and the global options list--graph.Verify
Stack: 2 of 6, on top of #132; next: #134
🤖 Generated with Claude Code