Repository navigation
Move the F# build to Nullean.Make.Fs and Proc.Fs - #4825
Merged
Merged
Conversation
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]>
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 () -> |
There was a problem hiding this comment.
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]>
Contributor
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4825/ Sample changed pages: |
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]>
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]>
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.
The F# build drops Argu and Bullseye: one
Targetunion holds every target with its help text and dependencies, and each body is a Proc.Fsshell { }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.fsdeclaresTarget, a union whose///comments become the help text. Dependencies aretarget [Clean; Lint; Compile] { ... }, hidden internals arestep, andReleaseandPublisharecommandblocks../build.shwith no arguments still builds, throughapp.Default Build.Commands run through
shell { }exec { }calls becomesh $"...", and the exit-code checks useexitCodeandsucceeds. A registry push retries withCmd.retry 2. The tests run as onedotnet test --solutioncall over a solution filter that the build generates in.artifacts/tests.slnffrom thetests/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=unitistest --suite unit(aTestSuiteenum).--parallelism N(to--max-parallel-test-modules) belongs totest,unit-testandintegrateonly, and CI ignores it and runs one module at a time.-c,-sandunit-testkeep their names. The unused--tokenoption is gone.ci.yml,release.yml,prerelease.yml,README.md,CONTRIBUTING.mdandessc.mduse the new names.Packages
Nullean.Make.Fs0.27.1 replaces Argu and Bullseye, andFake.Tools.GitandFake.IO.Zipgo: the version is a small record fromminverandgit rev-parse, the clean check isgit status --porcelain, and the zip usesSystem.IO.Compression(the binary keeps its executable bit).FSharp.Coremoves to 11.0.101 because Make.Fs needs it; 0.27.2 waits for itsNullean.Argh.Coreto 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-containersandpublish-zip, which cannot run locally (registry push, Docker).run-local-containernow callsdocker run <image> --help; the old code passeddockertwice. All three are untested until CI runs them.Verify