Skip to content

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

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

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

@ChrisonSimtian ChrisonSimtian commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #257 (the rename of Fallout.Common.ProjectModel to Fallout.Solutions). That rename shipped in 11.0.13 as a breaking change, with no compatibility shim. This PR does not undo that break — it stays. It adds a shim and a migration-tool fix so consumers upgrading from 11.0.1–11.0.12 have an easier, mechanical way to move to the new namespace.

Non-breaking / additive.

What changed

  • Fix the CLI migrator rule. fallout-migrate only replaced the Nuke. prefix, so using Nuke.Common.ProjectModel; was rewritten to the now-unused Fallout.Common.ProjectModel, not the real new namespace. It now maps both the old Nuke.Common.ProjectModel and the interim Fallout.Common.ProjectModel to Fallout.Solutions in one edit. This closes a gap in the CLI tool that Update Nuke→Fallout codefix to map Common.ProjectModel → Solutions for v11 #253 (an earlier fix) left open — Update Nuke→Fallout codefix to map Common.ProjectModel → Solutions for v11 #253 only fixed the analyzer's code-fix, not the CLI migrator.
  • Add a transition shim (a small compatibility layer that keeps old code working against the new API) for the common entry-point pattern. Solution and SolutionAttribute are mirrored back into Fallout.Common.ProjectModel inside Fallout.Common, so [Solution] readonly Solution Solution; still compiles.
  • Add a compile-time check. A new test project, Fallout.Consumer.ProjectModelShim (in fallout.slnx), fails CI if the shim above stops working. This mirrors how Nuke.Consumer already guards the Nuke.Common.ProjectModel shim.

Limits

This shim only covers the common entry-point pattern above — it is not a full alias for the old namespace. Code that navigates the project graph still gets the real Fallout.Solutions.* types. The GenerateProjects code generator still keys off the new namespace's attribute. Binary compatibility and the package-ID rename are unaffected. For anything beyond the entry-point pattern, fallout-migrate is the complete fix — same as the existing Nuke.Common.ProjectModel shim.

Verification

  • Fallout.Common, the shim, and the new consumer sentinel build with 0 errors.
  • Fallout.Migrate.Specs passes (34 tests, 4 new ones 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 😊

@dennisdoomen

dennisdoomen commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

I was really struggling with the title and the description. Took quite some time until I understood that this is a fix for a previous breaking change on the main branch. The cryptic AI-generated description and all the references to v11 put me on the wrong foot.

I've created #544 to help prevent that situation and took the liberty to have Copilot rewrite the description using those new instructions. Now I finally get it 😀

dennisdoomen added a commit that referenced this pull request Jul 26, 2026
The existing rule was one abstract line and easy to ignore in
practice (see PR #528's description). Break it into checkable rules
-- one idea per sentence, no idioms, define jargon on first use,
gloss cross-references -- and add two anti-pattern examples pulled
from a real PR description.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
ChrisonSimtian pushed a commit that referenced this pull request Jul 26, 2026
The existing rule was one abstract line and easy to ignore in
practice (see PR #528's description). Break it into checkable rules
-- one idea per sentence, no idioms, define jargon on first use,
gloss cross-references -- and add two anti-pattern examples pulled
from a real PR description.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
(cherry picked from commit 56733af)
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.

3 participants