Refactor build steps into component interfaces#28
Merged
ChrisonSimtian merged 3 commits intoJul 18, 2026
Conversation
Replace the single Build.Maintenance.cs partial with one component interface per step under build/Steps/, mirroring the migrator's "each unit is its own type" shape but on the framework's native grain (like IRestore/ICompile): - IGenerateTools (References, GenerateTools), IGeneratePublicApi, IDownloadLicenses, IHandleExternalRepositories, IUpdateContributors, IUpdateStargazers. - Build.cs implements them — its base list is the "wire up the steps" seam. - Each target stays CLI-invocable and graph-aware: Pack still gains DownloadLicenses via DependentFor<IPack>; UpdateContributors inherits IHandleExternalRepositories for the external-repo directory. - UseHttps moves from a readonly [Parameter] field to a [Parameter] property (the component idiom); MainBranch stays a const on Build (it feeds a [GitHubActions] attribute), so IGenerateTools carries its own ToolsSourceBranch. No behaviour change: dotnet fallout --help lists every target as before. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Regenerated schema drops the removed RunTargetInDockerImageTest entry so the build's target list matches reality. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Owner
Author
|
not so sure whether I like this whole interface default implementation voodoo thing ... thats not how interfaces should be but then .... thats what microsoft made them to be, polymorph FTW! |
- Remove unused members carried over from upstream NUKE: Build.MilestoneTitle, and GlobalSolution / ExternalSolutions on IHandleExternalRepositories (no references anywhere; they were for a global-solution target this build lacks). - Delete the commented-out example blocks in _build.csproj (PackAsTool, PublishSingleFile, NukeExternalFiles, source-generator scaffolding). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@ChrisonSimtian could you please stop tagging me? |
Owner
Author
ah sorry bruder das ist wohl Claude, ist keine Absicht |
|
findst diesen antwortstil nich etwas drüber? |
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.
Stacked on Fallout-build#498. Follow-up to the build tidy-up already on this branch.
Problem
The dogfood build split its concerns across partial classes of one giant
Buildtype — the pattern @matkoch keeps reaching for, and awkward to navigate. We wanted the migrator's "one unit = one type in its own file" shape.Outcome
Each build step is now its own component interface under
build/Steps/— the framework's native mechanism (same asIRestore/ICompile), not a bolted-on object model:IGenerateTools(References, GenerateTools),IGeneratePublicApi,IDownloadLicenses,IHandleExternalRepositories,IUpdateContributors,IUpdateStargazersBuild.cs's base list is the wire-up seam;Build.Maintenance.csis gone.Packstill gainsDownloadLicensesviaDependentFor<IPack>;UpdateContributorsinheritsIHandleExternalRepositories.Why interfaces, not plain
StepobjectsStandalone step classes would need a hand-threaded context (
RootDirectory,Solution,GitRepository, tasks…) and aTargetwrapper each to stay invocable — re-implementing what the framework gives for free, and dropping the dogfooding. Class-level attributes ([GitHubActions],[DisableDefaultOutput]) can't ride an interface, soBuild.CI.GitHubActions.cs/Build.Terminal.csstay partials by necessity.Verification
dotnet build build/_build.csprojclean;dotnet formatclean.dotnet fallout --helplists every target as before, with thePack → DownloadLicensesedge intact.No behaviour change.