feat(globaltool): add in-tool build runner (PR-A of bootstrapper deprecation)#200
Closed
ChrisonSimtian wants to merge 2 commits into
Closed
feat(globaltool): add in-tool build runner (PR-A of bootstrapper deprecation)#200ChrisonSimtian wants to merge 2 commits into
ChrisonSimtian wants to merge 2 commits into
Conversation
…ecation)
First of three PRs that deprecate the per-repo bootstrappers in favour of
`Fallout.GlobalTool` as the entry point for running builds.
Today the global tool's no-`:` fallback in Program.Handle spawned
`bash ./build.sh` (or `powershell ./build.ps1`), letting the shim do
`dotnet build` + `dotnet run --project --no-build -- $@`. This PR moves
that work into the tool itself.
New files:
- BuildProjectResolver.cs — resolves the build project (.csproj) from
the optional `BuildProjectFile` field in `.fallout/parameters.json`,
falling back to the convention `build/_build.csproj`. The schema
itself is regenerated by HandleShellCompletionAttribute on every
build run; teaching that generator about the new field belongs in
PR-B. The resolver works without schema support because
parameters.json accepts arbitrary fields.
- Program.Run.cs — new in-tool runner. Resolves dotnet (PATH first,
shim-provisioned .fallout/temp/dotnet-{unix,win} as fallback), seeds
the same env vars the shim sets (DOTNET_CLI_TELEMETRY_OPTOUT,
DOTNET_NOLOGO, DOTNET_ROLL_FORWARD, FALLOUT_TELEMETRY_OPTOUT, plus
the existing FALLOUT_GLOBAL_TOOL_* markers), then runs the same two
subprocesses the shim runs — `dotnet build` then
`dotnet run --project --no-build -- <args>` — with inherited stdio so
colours and progress pass through. Argument forwarding uses
ProcessStartInfo.ArgumentList so cross-platform quoting is handled
by the framework.
Program.cs change:
- Handle's no-`:` fallback now calls `Run(args, rootDirectory,
BuildProjectResolver.Resolve(rootDirectory))` instead of
`Build(buildScript, ...)`. The `buildScript == null` branch of the
"Could not find" prompt is removed — we can run without a shim now —
but the `rootDirectory == null` branch stays for empty repos.
What this PR does NOT do:
- Delete `Build()` — still called from Program.Complete.cs as a
bootstrap path for the first-time completion request. Removed in
PR-B alongside the bootstrapper deletion.
- Touch the shim scripts (`build.sh`/`build.ps1`/`build.cmd`) — they
continue to work directly via their own `dotnet build` +
`dotnet run --project` invocations, independent of the global tool.
- Touch the `[GitHubActions]` generator or CI workflows — they still
call `./build.cmd Test Pack`, which still works. The generator and
workflow shape change in PR-B.
Backwards compatibility: existing repos with fat bootstrappers are
unaffected — `./build.sh Compile` runs unchanged. The only behavioural
delta is that `fallout Compile` no longer hops through `bash ./build.sh`
before running `dotnet build` + `dotnet run`; it does that directly.
Same end result, one fewer subprocess.
Tests: BuildProjectResolverTests covers convention default, explicit
override, missing files (both convention and configured), and empty
override values — 6 new tests, all green alongside the existing 11
in Fallout.GlobalTool.Tests.
Dogfooded locally via `dotnet run --project src/Fallout.GlobalTool --
--help`, which exercises the full new path: tool → Resolver →
dotnet build → dotnet run --no-build -- --help. Output matches
`./build.sh --help`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Collaborator
Author
|
Closing — re-opening under a fresh branch |
This was referenced May 26, 2026
Merged
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.
Summary
First of three PRs that deprecate the per-repo `build.cmd`/`build.sh`/`build.ps1` bootstrappers in favour of `Fallout.GlobalTool` (`fallout`) as the canonical entry point for running builds. This one is purely additive — no behaviour change for any repo with existing bootstrappers committed.
Plan & rationale: `/Users/csimon/.claude/plans/linked-frolicking-pine.md` (local). Three-PR sequence:
nukereferences withfalloutacross docs/ #198).What's in this PR
New files:
Modified:
What this PR does NOT do (so PR-B has something to do)
Backwards compatibility
Verification
Test plan
Refs
nukereferences withfalloutacross docs/ #198.