Skip to content

chore(rebrand): rename NukeBuild → FalloutBuild + INukeBuild → IFalloutBuild - #59

Merged
ChrisonSimtian merged 1 commit into
mainfrom
chore/p3.5a-type-identifier-rename
May 20, 2026
Merged

chore(rebrand): rename NukeBuild → FalloutBuild + INukeBuild → IFalloutBuild#59
ChrisonSimtian merged 1 commit into
mainfrom
chore/p3.5a-type-identifier-rename

Conversation

@ChrisonSimtian

Copy link
Copy Markdown
Collaborator

Summary

Mechanical type-identifier rename deferred from #54. Touches only the NukeBuild / INukeBuild types and their containing files — leaves the other identifier families (MSBuild props, env vars, credential store, internal constants) for follow-up PRs with their own deprecation analysis.

Refs #57.

What changed

  • 7 files renamed (git mv, history follows):
    • src/Fallout.Build/NukeBuild.{,Events,Interface,Statics,Output}.csFalloutBuild.{,Events,Interface,Statics,Output}.cs
    • src/Fallout.Build/INukeBuild.csIFalloutBuild.cs
    • src/Fallout.SourceGenerators/Shims/NukeBuild.csFalloutBuild.cs
  • ~281 identifier occurrences across 84 files swapped via anchored regex (\bNukeBuild\b, \bINukeBuild\b)
  • Verify snapshots (cake-scripts/*.verified.cs, SchemaUtilityTest *.verified.json) updated to match the new generator output
  • This repo's own build/Build.cs updated alongside

Carve-outs preserved

  • CHANGELOG.md — historical entries reference the old types verbatim
  • .fallout/build.schema.json — regenerated by the build, not hand-edited

Out of scope (will be follow-up PRs)

While auditing, I found significantly more identifiers carrying the legacy Nuke brand than the issue body anticipated. Each needs its own discussion:

FamilyWhy separateApproach
Constants.cs internals (NukeFileName, NukeDirectoryName, NukeCommonPackageId, GetNukeDirectory, GlobalNukeDirectory)Internal — no consumer impact. Pure mechanical.One mechanical PR.
MSBuild target / property names (NukeTasksAssembly, NukeContinueOnError, NukeBaseDirectory, ~19 others in .targets/.csproj)Consumer-visible — BREAKING for downstream .csproj files.Needs design call: deprecation period? Read both old + new with warning?
Env vars (NUKE_TELEMETRY_OPTOUT, NUKE_GLOBAL_TOOL_*, NUKE_INTERNAL_INTERCEPTOR)Consumer-visible — set in CI configs.Fallback: read new, then legacy with one-time warning.
Credential store name prefix ("NUKE: ...")Consumer-visible — affects stored credentials on user machines.Read legacy on miss; opportunistically migrate on write.
Telemetry property keys (version_nuke_common, version_nuke_global_tool)Server-side analytics — coordinated rename.Mechanical rename + note in telemetry endpoint.

#57 will be updated to reflect the expanded scope.

Verification

  • dotnet build fallout.slnx -c Debug: 0 errors, 15 pre-existing warnings
  • dotnet test fallout.slnx: 391 passed, 7 skipped, 0 failed
  • Verify snapshots regenerated and committed in lockstep — diff matches the new generator output

Test plan

  • ubuntu-latest CI green on this PR
  • After merge, no telemetry/CI breakage on main's release run (release won't republish — same version)

🤖 Generated with Claude Code

…utBuild
Mechanical type-identifier rename deferred from #54.
## What changed
- 7 files renamed (git mv preserves history):
- src/Fallout.Build/NukeBuild.{,Events,Interface,Statics,Output}.cs
→ FalloutBuild.{,Events,Interface,Statics,Output}.cs
- src/Fallout.Build/INukeBuild.cs → IFalloutBuild.cs
- src/Fallout.SourceGenerators/Shims/NukeBuild.cs → FalloutBuild.cs
- ~281 identifier occurrences across 84 files swapped via anchored
regex (\bNukeBuild\b, \bINukeBuild\b)
- Verify snapshots (cake-scripts/*.verified.cs, SchemaUtilityTest
verified.json) updated to match the new generator output
- build/Build.cs (this repo's own build script) updated alongside
## Carve-outs preserved
- CHANGELOG.md — historical entries reference the old types verbatim
- .fallout/build.schema.json — regenerated by the build, not hand-edited
## Out of scope (follow-up PRs)
While auditing, I found more identifiers carrying the legacy Nuke
brand than the issue body anticipated:
- Constants.cs internals: NukeFileName, NukeDirectoryName,
NukeCommonPackageId, GetNukeDirectory, GlobalNukeDirectory
- MSBuild target / property names (consumer-visible, BREAKING):
NukeTasksAssembly, NukeContinueOnError, NukeTaskTimeout,
NukeBaseDirectory, NukeUseNestedNamespaces, NukeRepositoryUrl,
NukeUpdateReferences, NukeExternalFiles, NukePackPackageTools,
NukeEmbedPackagesForSelfContained, NukeCodeGeneration,
NukeSpecificationFiles, NukeBaseNamespace, NukeTasksDirectory,
NukeTasksEnabled, NukeDefaultExcludes, NukeRootDirectory,
NukeScriptDirectory, NukeTelemetryVersion
- Env vars (NUKE_TELEMETRY_OPTOUT, NUKE_GLOBAL_TOOL_*, NUKE_INTERNAL_INTERCEPTOR)
- Credential store name prefix "NUKE: ..."
- Telemetry property keys version_nuke_common, version_nuke_global_tool
The MSBuild props are consumer-visible and need their own deprecation
discussion (set both old + new for a release? Read both with warning?).
Env vars + credential store need migration logic. Splitting these out
keeps the diff reviewable and lets each concern get its own design call.
#57 updated to reflect the expanded scope.
## Verification
- dotnet build fallout.slnx -c Debug: 0 errors, 15 pre-existing warnings
- dotnet test fallout.slnx: 391 passed, 7 skipped, 0 failed
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ChrisonSimtian
ChrisonSimtian merged commit 897989c into mainMay 20, 2026
1 check passed
@ChrisonSimtian
ChrisonSimtian deleted the chore/p3.5a-type-identifier-rename branch May 20, 2026 22:48
ChrisonSimtian added a commit that referenced this pull request May 21, 2026
Closes part of #48 (MVP — see "What's NOT in this PR" below).
## What it does
A new `dotnet tool` that walks a consumer repo and rewrites the
NUKE-era artifacts into their Fallout equivalents in place:
dotnet tool install -g Fallout.Migrate
cd path/to/my-nuke-repo
fallout-migrate # apply
fallout-migrate --dry-run # preview without writing
Transformations:
| Layer | Rewriter | What changes |
|---|---|---|
| `.csproj` | CsprojRewriter | PackageReference Include="Nuke.X" → Fallout.X; MSBuild props on the known P3.5b list (NukeRootDirectory, NukeBaseDirectory, NukeTelemetryVersion, NukeTasksEnabled, …) → Fallout* |
| `.cs` | CodeRewriter | `\bNuke\.(?=[A-Z])` → `Fallout.` for using directives, attribute namespaces, qualified type references; `\bNukeBuild\b` → `FalloutBuild`; `\bINukeBuild\b` → `IFalloutBuild` |
| `build.{cmd,ps1,sh}` | ScriptRewriter | `dotnet nuke` → `dotnet fallout`; `.nuke/` path references → `.fallout/`; legacy NUKE_* env vars → FALLOUT_* |
| `.nuke/` dir | DirectoryRenamer | Renames to `.fallout/` (warning emitted if both exist) |
Each rewriter uses anchored regex matching the same approach the
rebrand itself used in #54 / #59 (`\bNuke\.` with case-aware lookaheads).
Internal regex-only — no Roslyn dependency, no MSBuild evaluation,
keeps the tool a single small binary.
## Output
fallout-migrate — migrating: /path/to/repo
edit build/_build.csproj (3 changes)
edit build/Build.cs (2 changes)
edit build.sh (2 changes)
rename .nuke -> .fallout
Files changed: 3
Edits made: 7
Directories: 1 renamed
Migration complete. Verify the build: ./build.ps1 (or ./build.sh on unix)
## Tests
17 tests:
- CsprojRewriterTest: PackageReference, MSBuild property, false-positive guard, no-op
- CodeRewriterTest: using directive, qualified type, NukeBuild, INukeBuild, partial-identifier guard, lowercase .nuke guard
- ScriptRewriterTest: dotnet nuke, .nuke dir refs, env vars, plain-word guard
- MigrationIntegrationTest: end-to-end vanilla fixture (csproj+cs+sh+.nuke), dry-run, both-dirs warning
Plus a manual end-to-end smoke from a fixture in /tmp confirmed dry-run
output matches the expected diff.
## What's NOT in this PR (deferred)
- Roslyn-based AST rewrites — kept it regex-only for MVP. The issue
mentions reusing the Cake rewriting infrastructure; that's more
appropriate when we hit cases regex can't handle (e.g. partial
identifier disambiguation, semantic-aware refactors). None observed
in vanilla consumer repos yet.
- Tested on a real external NUKE consumer repo — volunteer needed
per the issue's "Done when" list. Open follow-up.
- Published to GitHub Packages — release pipeline will pick this up
on next push to main since the project is in fallout.slnx and
PackAsTool=true.
- Link from migration guide (#37) — that PR doesn't exist yet.
## Side-effect
StronglyTypedSolutionGeneratorTest verify snapshot regenerated —
solution generator now emits Solution.Fallout_Migrate and
Solution.Fallout_Migrate_Tests properties from the two new projects.
## Verification
- dotnet build src/Fallout.Migrate: 0 errors, 0 warnings
- dotnet test fallout.slnx: 408 passed (was 391; +17 new), 7 skipped, 0 failed
- End-to-end dry-run on /tmp fixture: edits + rename reported correctly
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@ChrisonSimtian