Skip to content

Smooth the Fallout.Common.ProjectModel → Fallout.Solutions migration path#528

Open
ChrisonSimtian wants to merge 3 commits into
mainfrom
fix/solutionmodel-rename-migration-path
Open

Smooth the Fallout.Common.ProjectModel → Fallout.Solutions migration path#528
ChrisonSimtian wants to merge 3 commits into
mainfrom
fix/solutionmodel-rename-migration-path

Conversation

@ChrisonSimtian

Copy link
Copy Markdown
Collaborator

Follow-up to the #257 rename (Fallout.Common.ProjectModelFallout.Solutions), which shipped unshielded at 11.0.13. This doesn't reclassify #257 — that break stands — it shrinks the blast radius for consumers upgrading from 11.0.1–11.0.12 and gives them a mechanical path off the old namespace.

Non-breaking / additive.

Changes

  • CLI migrator rulefallout-migrate only swapped the Nuke. prefix, so using Nuke.Common.ProjectModel; landed on the dead Fallout.Common.ProjectModel. Now maps both Nuke- and interim-Fallout-Common.ProjectModelFallout.Solutions, in one edit. Closes the CLI-side gap Update Nuke→Fallout codefix to map Common.ProjectModel → Solutions for v11 #253 left (it only fixed the analyzer codefix).
  • Entry-point transition shimSolution + SolutionAttribute mirrored back into Fallout.Common.ProjectModel inside Fallout.Common, so [Solution] readonly Solution Solution; keeps compiling.
  • Compile-time sentinelFallout.Consumer.ProjectModelShim (in fallout.slnx) fails CI if the shim regresses, mirroring how Nuke.Consumer guards the Nuke.Common.ProjectModel shim.

Deliberately shallow

The shim is an entry-point grace period, not a full alias. Graph navigation returns canonical Fallout.Solutions.* types, GenerateProjects source-gen keys off the canonical attribute, and binary compat / the package-ID rename are untouched. fallout-migrate is the complete path — same ceiling as the generated Nuke.Common.ProjectModel shim.

Test plan

  • Fallout.Common, the shim, and the sentinel build with 0 errors
  • Fallout.Migrate.Specs green (34, +4 new for the ProjectModel rule)

ChrisonSimtian and others added 2 commits July 21, 2026 14:17
The fallout-migrate CLI rewriter only swapped the `Nuke.` prefix, so a NUKE-era
`using Nuke.Common.ProjectModel;` landed on the now-dead `Fallout.Common.ProjectModel`
namespace — the solution types moved to `Fallout.Solutions` in #257. Add a rule
mapping both the Nuke and interim Fallout `Common.ProjectModel` namespaces to
`Fallout.Solutions`, run before the generic prefix swap so each reference migrates
in a single edit. Mirrors the analyzer codefix from #253, which never reached the
CLI tool.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The solution types shipped under `Fallout.Common.ProjectModel` in Fallout
11.0.1–11.0.12 and moved to `Fallout.Solutions` in 11.0.13 (#257), breaking that
upgrade with no shim. Restore the common entry-point pattern
(`[Solution] readonly Solution Solution;`) by mirroring `Solution` +
`SolutionAttribute` back into the old namespace inside Fallout.Common. Shallow by
design — deep graph navigation, GenerateProjects source-gen, and binary compat
still require `fallout-migrate` — matching the ceiling of the generated
`Nuke.Common.ProjectModel` shim. A new compile-time consumer sentinel
(Fallout.Consumer.ProjectModelShim, in fallout.slnx) fails CI if the shim regresses.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ChrisonSimtian ChrisonSimtian added enhancement New feature or request target/vCurrent Targets the current version labels Jul 21, 2026
@ChrisonSimtian ChrisonSimtian self-assigned this Jul 21, 2026
@ChrisonSimtian
ChrisonSimtian marked this pull request as ready for review July 21, 2026 02:20
@ChrisonSimtian
ChrisonSimtian requested a review from a team as a code owner July 21, 2026 02:20
… shim generator

The new Fallout.Common.ProjectModel.Solution/SolutionAttribute entry-point
shims are public types under Fallout.Common, so the Nuke.Common shim's
'Fallout.Common -> Nuke.Common' generator rule swept them up and emitted
Nuke.Common.ProjectModel.Solution — which the 'Fallout.Solutions ->
Nuke.Common.ProjectModel' rule also emits from the canonical type. Two
partial declarations with different base classes → CS0263/CS0111, failing
Compile.

Give ShimAllPublicTypesUnder an ExceptNamespacePrefixes option and exclude
Fallout.Common.ProjectModel from the broad Fallout.Common rule. Those types
relocated to Fallout.Solutions in v11 and are shimmed by the dedicated rule;
the Fallout.Common.ProjectModel re-exports are a Fallout-side grace shim that
must not be re-shimmed into Nuke. Regenerated the affected Verify snapshots
(attribute surface + the solution generator picking up the new sentinel
consumer project #528 adds).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Comment on lines 14 to +50
@@ -31,7 +41,13 @@ public static RewriteResult Rewrite(string original)
{
var edits = 0;

var content = namespacePrefix.Replace(original, _ =>
var content = projectModelNamespace.Replace(original, _ =>
{
edits++;
return "Fallout.Solutions";
});

content = namespacePrefix.Replace(content, _ =>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand the new migration design, that new migrations should go into their dedicated `XxxStep".

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, claude doesn't quite understand it yet. so this needs some work plus some agent.md adjustments. just down with a pretty bad cold this week so doing things slower and one at a time 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request target/vCurrent Targets the current version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants