Add net10 Solution.g codegen console + toggle (Lever 1, dogfooded)#15
Closed
ChrisonSimtian wants to merge 9 commits into
Closed
Add net10 Solution.g codegen console + toggle (Lever 1, dogfooded)#15ChrisonSimtian wants to merge 9 commits into
ChrisonSimtian wants to merge 9 commits into
Conversation
Host.Default scans every public subclass of Host and asserted each defines a
static IsRunning{Name} property. The Nuke.* transition shim emits
Nuke.Common.Host (a public subclass with no IsRunningHost), so detection threw
inside FalloutBuild's static constructor — aborting *any* build that merely
referenced the shim, before a single target ran.
Treat a subclass that doesn't follow the convention as not-running instead of
throwing. Adds a runtime regression test in Nuke.Common.Shim.Tests (the existing
shim tests are compile-only, which is why this slipped through).
Surfaced by the new fallout.canary acceptance suite (Fallout-build/Fallout.Canary#3).
Convert the new HostDetectionTests to the repo's FluentAssertions convention (per review nitpick) and add a note to docs/dependencies.md explaining why we pin FluentAssertions 8.x: it's covered by the free Xceed Community License as an OSS, test-only dependency. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Create PRs as draft by default (issue-and-pr-style.md) - Test naming follows AV1600 behavior-focused style (conventions.md) - Test files/classes use Specs suffix (conventions.md) - Revert AGENTS.md to remove overly broad rules; keep canonical brief Closes Fallout-build#438
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ld#387) GitHubActionsJob.Write emitted runs-on: {Image.GetValue()} unconditionally, so a workflow could only target the fixed GitHubActionsImage enum. Self-hosted runner pools are selected by a label array (runs-on: [self-hosted, linux, x64]) which was impossible to produce. Add an additive string[] RunsOnLabels to GitHubActionsAttribute, plumb it through GetJobs onto GitHubActionsJob, and branch in Write: non-empty emits the array form via JoinCommaSpace(), otherwise the existing scalar path is unchanged. RunsOnLabels defaults empty, so existing usages generate byte-for-byte identical YAML. Validated at configuration-generation time: it requires exactly one image (a multi-image matrix is ambiguous) and rejects null/empty/whitespace entries that would emit malformed YAML. Covered by a runs-on-labels Verify snapshot and GitHubActionsRunsOnLabelsValidationTest.
First half of freeing the Fallout.SourceGenerators dependency cone (issue Fallout-build#441, Lever 1): introduce a net10 pre-build codegen path for the strongly-typed [Solution] accessor as the future default, with the in-compiler generator retained as the toggle fallback. - src/shared/SolutionEmitter.cs: the Scriban emit logic extracted out of StronglyTypedSolutionGenerator into a single shared source file, linked into BOTH the generator and the new console so they emit byte-identical Solution.g.cs. - StronglyTypedSolutionGenerator: refactored to call SolutionEmitter (behaviour unchanged — still the in-IDE/live fallback). - src/Fallout.Solution.Codegen: net10 console that discovers [Solution(GenerateProjects = true)] members by parsing the build project's .cs syntactically (no compilation available pre-build), reads the solution with the real Fallout.Persistence.Solution parser (no parsing-parity risk), and emits via the shared emitter. Verified end-to-end against this repo's own build/Build.cs + fallout.slnx — output matches the generator. - AssemblyInfo: IVT for the console (it uses Build.Shared's internal Constants). Remaining (next commits on this branch): the packaged pre-build MSBuild target + FalloutSolutionCodegenMode toggle (default = console; suppress the generator in console mode), dogfood-build wiring, and — as the deliberate follow-up — dropping the now-removable cone refs from Fallout.SourceGenerators once the fallback is retired/cone-freed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…1, steps 1-2) - StronglyTypedSolutionGenerator self-suppresses when FalloutSolutionCodegenMode == Build (reads it via CompilerVisibleProperty), so exactly one path emits. - src/Fallout.Solution.Codegen/build/Fallout.Solution.Codegen.targets: reusable pre-build target that runs the console (via FalloutSolutionCodegenProject or a published FalloutSolutionCodegenAssembly), writes <Member>.g.cs into obj/, and includes it. Exposes the toggle to the fallback generator. - build/_build.csproj: dogfoods the console path (FalloutSolutionCodegenMode=Build). Verified: the target runs the console, emits Solution.g.cs from fallout.slnx, the generator suppresses, and _build compiles (0 errors). Full fallout.slnx build green. Default is unchanged for everyone else (generator runs unless a project opts into Build), so this is non-breaking. Remaining follow-ups: ship the console + targets in the consumer package and flip the default to Build, then drop the now-removable cone refs from Fallout.SourceGenerators. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…allout.Solution.Codegen project The generator's output for fallout.slnx now includes the new Fallout.Solution.Codegen project; the only snapshot change is that one accessor line (confirming the shared-emitter refactor preserved output). BOM stripped to match the repo's no-BOM verified convention. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
b35a7fd to
9567f9a
Compare
Owner
Author
|
Superseded by the upstream PR Fallout-build#442 — same branch ( |
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.
Lever 1 of the framework-modernization work (Fallout-build#441): a net10 pre-build codegen path for the strongly-typed
[Solution]accessor, so the in-compiler Roslyn generator can eventually shed itsSolution/Persistence/Utilities/Globbingcone (which forces those to netstandard2.0).What's here (built, dogfooded, verified)
src/shared/SolutionEmitter.cs— Scriban emit logic extracted into one shared source file, linked into both the generator and the console → byte-identical output, no parity drift.StronglyTypedSolutionGenerator— refactored onto the shared emitter; self-suppresses whenFalloutSolutionCodegenMode == Build(read viaCompilerVisibleProperty). Otherwise unchanged → stays the live in-IDE fallback.src/Fallout.Solution.Codegen(net10 console) — discovers[Solution(GenerateProjects=true)]by syntactic parse (no pre-build compilation), reads the solution with the realFallout.Persistence.Solutionparser, emits via the shared emitter.Fallout.Solution.Codegen.targets— reusable pre-build target (FalloutSolutionCodegenProjectfor in-repo, or a publishedFalloutSolutionCodegenAssemblyfor packaged consumers) + the toggle plumbing.build/_build.csproj— dogfoods the console path (Mode=Build). Verified: target runs the console →Solution.g.csfromfallout.slnx→ generator suppresses →_buildcompiles (0 errors). Fullfallout.slnxbuild green.Non-breaking
The default is unchanged for everyone else — the generator runs unless a project explicitly opts into
Build. Only the dogfood build is switched. Consumers are untouched.Remaining follow-ups (out of scope here)
build/) and flip the consumer default toBuild.Fallout.SourceGenerators— the step that actually freesSolution/Utilitiesto net10.Fallout.MSBuildTasks) — unblocksConfigure<T>/AbsolutePath→ Core (tracked in Move off legacy target frameworks (netstandard2.0 / net472) so shared contracts can live in Fallout.Core Fallout-build/Fallout#441).🤖 Generated with Claude Code