Skip to content

feat(shims): add Nuke.Build and Nuke.Components transition shims (#69 session 3)#112

Merged
ChrisonSimtian merged 2 commits into
mainfrom
feature/expand-shim-projects-build-components
May 22, 2026
Merged

feat(shims): add Nuke.Build and Nuke.Components transition shims (#69 session 3)#112
ChrisonSimtian merged 2 commits into
mainfrom
feature/expand-shim-projects-build-components

Conversation

@ChrisonSimtian

Copy link
Copy Markdown
Collaborator

Summary

Spins up the two remaining historically-published Nuke.* package IDs as transition shims:

  • Nuke.Build (mirrors the Fallout.Build namespace)
  • Nuke.Components (mirrors the Fallout.Components interface family — IPack, ICompile, ITest, IPublish, the IHaz* series)

Both follow the exact same scaffolding as src/Shims/Nuke.Common: tiny csproj, ShimMarker.cs with a single [assembly: ShimAllPublicTypesUnder(...)], README pointing at the migration guide. The TransitionShimGenerator does all the actual mirror emission at compile time.

Why these two?

These are the four Nuke.* IDs that ever shipped on nuget.org:

  • Nuke.Common — already shimmed
  • Nuke.Build — added here
  • Nuke.Components — added here
  • Nuke.GlobalTool — CLI tool, not a library; consumers don't using it, so no shim needed

Nuke.MSBuildTasks never went to nuget.org, so it's also out of scope.

Verification

  • Both shim projects build clean (0 errors, 0 warnings each)
  • Whole-solution build clean
  • StronglyTypedSolutionGeneratorTest snapshot updated to include the two new projects (verified passes)
  • release.yml already globs output/packages/Nuke.*.nupkg for the GH Packages push ([P5] Ship Nuke.* type-forwarding shim packages on our GH Packages feed #47), so the new shim nupkgs will be published automatically on the next release run — no workflow changes needed

Notes

  • These shims don't include hand-written renamed-type bridges (no NukeBuild/INukeBuild equivalent in this namespace). The Nuke.Common shim is the only one that needed those because of the NukeBuildFalloutBuild type rename.
  • Nuke.Build shim is small — Fallout.Build namespace currently only contains Fallout.Build.Execution.Extensions types. The shim grows automatically if more types land in that namespace.
  • Nuke.Components shim is bigger — covers the full component-interface family that consumers used in their Build class declarations.

#69 roadmap status after this

  • session 1: ✅ Easy-tier generator + Nuke.Common shim
  • session 2: ✅ Static-class method delegation
  • session 3 (this PR): ✅ Nuke.Build + Nuke.Components shims
  • session 2b: ⏳ Sealed-class wrappers (deferred)

ChrisonSimtian and others added 2 commits May 23, 2026 00:01
…session 3)

Adds the two remaining historically-published Nuke.* package IDs as
transition shims. `Nuke.GlobalTool` is omitted (was a CLI tool, not a
library consumers used `using` against). `Nuke.MSBuildTasks` is omitted
(never shipped to nuget.org).

Each shim is the same pattern as src/Shims/Nuke.Common:
- TargetFramework=net10.0
- Analyzer-attached Fallout.SourceGenerators reference, so the
  TransitionShimGenerator emits the type mirror at compile time
- ShimMarker.cs holds the single `[assembly: ShimAllPublicTypesUnder]`
  declaration scoping the generator's namespace swap
- README.md pointing at docs/migration/from-nuke.md

Marker namespaces:
- Nuke.Build  ← Fallout.Build  (currently covers Fallout.Build.Execution.Extensions)
- Nuke.Components  ← Fallout.Components  (covers the IPack / ICompile / ITest /
                                          IPublish / IHaz* interface family)

Both build clean against the existing generator (0 warnings, 0 errors).
StronglyTypedSolutionGeneratorTest snapshot regenerated to include the
two new projects in fallout.slnx.

release.yml already globs `output/packages/Nuke.*.nupkg` for the GH
Packages push (#47), so the new shim nupkgs will be published
automatically on the next release run.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
actions/checkout defaults to the merge SHA on pull_request events,
leaving HEAD detached. GitRepository.FromLocalDirectory asserts
repository.Branch != null which throws in that state, so
Fallout.Common.Tests.GitHubTasksTest.GitHubRepositoryFromLocalDirectoryTest
fails the moment any PR triggers ubuntu-latest validation.

ref: ${{ github.head_ref }} checks out the source branch directly,
which leaves HEAD attached to the branch name. Tests then see the same
git state they'd see on a developer's machine.

This file is auto-generated by Fallout — the next regen via
`fallout --generate-configuration GitHubActions_ubuntu-latest` will
overwrite this fix. Tracking the underlying issue (either fix the
generator to emit ref: github.head_ref on PR triggers, or make
GitRepository.FromLocalDirectory tolerate detached HEAD) is queued.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ChrisonSimtian
ChrisonSimtian merged commit 443ace0 into main May 22, 2026
1 check passed
@ChrisonSimtian
ChrisonSimtian deleted the feature/expand-shim-projects-build-components branch May 22, 2026 12:15
Sign up for free to 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