Skip to content

Move the F# build to Nullean.Make.Fs and Proc.Fs - #4825

Merged
Mpdreamz merged 9 commits into
mainfrom
chore/build-make-fs
Nov 11, 2026
Merged

Mpdreamz merged 9 commits into
mainfrom
chore/build-make-fs

Conversation

@Mpdreamz

@Mpdreamz Mpdreamz commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

The F# build drops Argu and Bullseye: one Target union holds every target with its help text and dependencies, and each body is a Proc.Fs shell { } block.

Affects: Automation

Prompt summary: Move the build onto the latest Nullean.Argh, Nullean.Make.Fs and Proc.Fs so Argu and Bullseye can go, with targets written as shell { } blocks. This is PR 2 of 3, after the Argh and Proc upgrades.

Why

The build kept two libraries only for its command line (Argu, 116 lines of union cases and usage strings) and its target graph (Bullseye, wired by hand). Those are two sources of truth for what a target does, and neither can generate the mise tasks that PR 3 adds.

What

One target type

Targets.fs declares Target, a union whose /// comments become the help text. Dependencies are target [Clean; Lint; Compile] { ... }, hidden internals are step, and Release and Publish are command blocks. ./build.sh with no arguments still builds, through app.Default Build.

Commands run through shell { }

exec { } calls become sh $"...", and the exit-code checks use exitCode and succeeds. A registry push retries with Cmd.retry 2. The tests run as one dotnet test --solution call over a solution filter that the build generates in .artifacts/tests.slnf from the tests/ scan, so there is no file to keep in step. The Microsoft.Testing.Platform runner runs the test modules in parallel and prints one summary: 8 seconds here against 22 for one project at a time. A failure prints its message and source line in the middle of the output and ends with [make] Target 'unit-test' failed.

Names and options

Commands are kebab-case: publish-containers, publish-zip, publish-binaries, run-local-container. --test-suite=unit is test --suite unit (a TestSuite enum). --parallelism N (to --max-parallel-test-modules) belongs to test, unit-test and integrate only, and CI ignores it and runs one module at a time. -c, -s and unit-test keep their names. The unused --token option is gone. ci.yml, release.yml, prerelease.yml, README.md, CONTRIBUTING.md and essc.md use the new names.

Packages

Nullean.Make.Fs 0.27.1 replaces Argu and Bullseye, and Fake.Tools.Git and Fake.IO.Zip go: the version is a small record from minver and git rev-parse, the clean check is git status --porcelain, and the zip uses System.IO.Compression (the binary keeps its executable bit). FSharp.Core moves to 11.0.101 because Make.Fs needs it; 0.27.2 waits for its Nullean.Argh.Core to reach NuGet.

Out of scope: the mise tasks still call the build as before; PR 3 generates them from the targets.

Risk: the release and prerelease workflows call publish-containers and publish-zip, which cannot run locally (registry push, Docker). run-local-container now calls docker run <image> --help; the old code passed docker twice. All three are untested until CI runs them.

Verify

./build.sh --help
./build.sh version
./build.sh unit-test --single-target
./build.sh test --suite bogus                  # exits 2 before the build starts

Argu and Bullseye go away: one `Target` union now holds the targets, their help text and their dependencies, and each target body is a `shell { }` block. Test projects still run with buffered output through `concurrentlyAtMost`.

Command names are kebab-case now (`publish-containers`, `publish-zip`, `run-local-container`), and `--test-parallelism=4` is `--parallelism 4`. The callers in `ci.yml`, `release.yml`, `prerelease.yml` and the docs use the new names. `FSharp.Core` moves to 11.0.101 because Make.Fs needs it.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@Mpdreamz
Mpdreamz requested a review from a team as a code owner November 11, 2026 18:20
@Mpdreamz Mpdreamz added the automation packaging, ci/cd. label Nov 11, 2026
@Mpdreamz
Mpdreamz requested a review from reakaleek November 11, 2026 18:20
Comment thread build/Targets.fs Resolved
Comment thread build/Targets.fs Outdated
Comment on lines +165 to +169
for project in projects ->
steps {
let! result = cmd "dotnet" [ "test"; project; "-c"; "release"; "--no-restore"; "--no-build" ] |> Cmd.result
let code = result.ExitCode.GetValueOrDefault -1
lock stdout (fun () ->

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Severity: P3 (Low)

Add automated failure-path coverage for the rewritten test runner. Running the normal suite in CI only exercises successful child processes; it does not verify that a failing project still allows the remaining projects to finish and causes the build command to exit nonzero. A subprocess test using a fake dotnet executable could cover both guarantees without running the real suite.

Generated by Libra. React with 👍 or 👎 to give feedback on this comment.

Make.Fs hands the option over only after the Compile dependency has run, so a typo such as `--suite unti` used to build the whole solution before it failed. The entry point now checks the value first and exits with code 2, as Argu did.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

Mpdreamz and others added 2 commits November 11, 2026 19:37
TUnit already runs the tests of one project in parallel, so the buffered pool of projects goes, along with `--parallelism`. `--suite` is now a `TestSuite` enum instead of a string.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
The fast-fail check listed the values by hand; it now parses them as `TestSuite`, so the enum stays the only list.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Comment thread build/Targets.fs Resolved
Mpdreamz and others added 5 commits November 11, 2026 19:41
Enum.TryParse accepts "7" and "unit,integration", so those slipped past the fail-fast check and ran every suite. The check now requires a declared name, and testProjects matches All explicitly and fails on any other value.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
The build used Fake for a version type, one `git` call, an environment lookup, a folder clean and a zip. Each is a few lines of `Proc.Fs` or the framework now, so `Fake.Tools.Git` and `Fake.IO.Zip` go.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
`Enum.TryParse` takes `1` as `Unit` and passes `IsDefined`, so the number slipped through. The check compares with `Enum.GetNames` instead.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Sequential projects take 22 seconds on this machine and four at a time take 7 to 8, and #4604 put CI back on the parallel run. `concurrentlyAtMost` replaces the hand-written process pool and keeps the per-project `::group::` output and the report of every failure.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
`dotnet test --solution` with the Microsoft.Testing.Platform runner runs the test modules in parallel and prints one summary, so the hand-written project loop goes. The filter is generated in `.artifacts/tests.slnf` from the same directory scan, so there is no file to keep in step with the solution.

`--parallelism` belongs to `test`, `unit-test` and `integrate` only, and CI ignores it and runs one module at a time.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@Mpdreamz
Mpdreamz merged commit fd0433b into main Nov 11, 2026
44 checks passed
@Mpdreamz
Mpdreamz deleted the chore/build-make-fs branch November 11, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation packaging, ci/cd.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant