diff --git a/.github/workflows/ubuntu-latest.yml b/.github/workflows/ubuntu-latest.yml index 721ca8569..7aaa4355a 100644 --- a/.github/workflows/ubuntu-latest.yml +++ b/.github/workflows/ubuntu-latest.yml @@ -34,6 +34,11 @@ jobs: with: submodules: recursive fetch-depth: 0 + # Check out the source branch (not the merge SHA) so HEAD stays + # attached. GitHubTasksTest.GitHubRepositoryFromLocalDirectoryTest + # requires repository.Branch to be non-null. NOTE: this file is + # auto-generated by Fallout; next regen will overwrite. Track in #110. + ref: ${{ github.head_ref }} - name: 'Cache: .fallout/temp, ~/.nuget/packages' uses: actions/cache@v4 with: diff --git a/fallout.slnx b/fallout.slnx index f85edeeb2..797d0cb45 100644 --- a/fallout.slnx +++ b/fallout.slnx @@ -17,7 +17,9 @@ + + diff --git a/src/Shims/Nuke.Build/Nuke.Build.csproj b/src/Shims/Nuke.Build/Nuke.Build.csproj new file mode 100644 index 000000000..2db4b8b3b --- /dev/null +++ b/src/Shims/Nuke.Build/Nuke.Build.csproj @@ -0,0 +1,30 @@ + + + + net10.0 + Nuke.Build + Nuke.Build + Nuke.Build + Nuke.Build (Fallout transition shim) + + true + Transition shim that re-exports the most common Nuke.Build types as subclasses/wrappers of the canonical Fallout.* types. For projects mid-migration from NUKE to Fallout. Published only to GitHub Packages (nuget.org's Nuke.Build is owned by the original NUKE maintainer). + build automation continuous-integration tools orchestration nuke shim transition + + false + + + + + + + + diff --git a/src/Shims/Nuke.Build/README.md b/src/Shims/Nuke.Build/README.md new file mode 100644 index 000000000..c4d6797d8 --- /dev/null +++ b/src/Shims/Nuke.Build/README.md @@ -0,0 +1,19 @@ +# Nuke.Build transition shim + +Transition shim for projects mid-migration from NUKE to Fallout. Published to **GitHub Packages** only — `Nuke.Build` on nuget.org is owned by the original NUKE maintainer. + +Generated by Fallout's `TransitionShimGenerator` from the canonical `Fallout.Build` namespace surface. Types are emitted as subclass/sub-interface wrappers inheriting from their `Fallout.*` counterparts; consumer code that says `using Nuke.Build;` keeps compiling against the new types. + +Coverage and limitations are the same as the `Nuke.Common` shim — see [`../Nuke.Common/README.md`](../Nuke.Common/README.md) for the full surface description. + +## Consumer setup + +Add this fork's GitHub Packages feed to your `nuget.config`: + +```xml + +``` + +Then bump your `Nuke.Build` package reference to the latest 10.3.x or later. + +Full migration walkthrough: [`docs/migration/from-nuke.md`](../../../docs/migration/from-nuke.md). diff --git a/src/Shims/Nuke.Build/ShimMarker.cs b/src/Shims/Nuke.Build/ShimMarker.cs new file mode 100644 index 000000000..cd8dc5a3a --- /dev/null +++ b/src/Shims/Nuke.Build/ShimMarker.cs @@ -0,0 +1,12 @@ +// Copyright 2026 Maintainers of Fallout. +// Originally based on NUKE by Matthias Koch and contributors. +// Distributed under the MIT License. +// https://github.com/ChrisonSimtian/Fallout/blob/main/LICENSE + +// Tells the TransitionShimGenerator to emit shims for every public type whose +// namespace begins with "Fallout.Build." into the corresponding "Nuke.Build." +// namespace. + +[assembly: Fallout.Migrate.Shims.ShimAllPublicTypesUnder( + fromNamespacePrefix: "Fallout.Build", + toNamespacePrefix: "Nuke.Build")] diff --git a/src/Shims/Nuke.Components/Nuke.Components.csproj b/src/Shims/Nuke.Components/Nuke.Components.csproj new file mode 100644 index 000000000..0bb08b6c8 --- /dev/null +++ b/src/Shims/Nuke.Components/Nuke.Components.csproj @@ -0,0 +1,28 @@ + + + + net10.0 + Nuke.Components + Nuke.Components + Nuke.Components + Nuke.Components (Fallout transition shim) + + true + Transition shim that re-exports the Nuke.Components composition interfaces (ICompile, IRestore, IPack, etc.) as sub-interfaces of the canonical Fallout.Components types. For projects mid-migration from NUKE to Fallout. Published only to GitHub Packages. + build automation continuous-integration tools orchestration nuke shim transition components + false + + + + + + + + diff --git a/src/Shims/Nuke.Components/README.md b/src/Shims/Nuke.Components/README.md new file mode 100644 index 000000000..db8cf1a09 --- /dev/null +++ b/src/Shims/Nuke.Components/README.md @@ -0,0 +1,19 @@ +# Nuke.Components transition shim + +Transition shim for projects mid-migration from NUKE to Fallout. Published to **GitHub Packages** only — `Nuke.Components` on nuget.org is owned by the original NUKE maintainer. + +Mirrors the canonical `Fallout.Components` interface family (`ICompile`, `IRestore`, `IPack`, `ITest`, `IPublish`, the `IHaz*` family, etc.) under the `Nuke.Components` namespace. Consumer code that says `class Build : NukeBuild, IPack, ITest` continues to compile. + +Limitations are the same as the `Nuke.Common` shim — see [`../Nuke.Common/README.md`](../Nuke.Common/README.md). + +## Consumer setup + +Add this fork's GitHub Packages feed to your `nuget.config`: + +```xml + +``` + +Then bump your `Nuke.Components` package reference to the latest 10.3.x or later. + +Full migration walkthrough: [`docs/migration/from-nuke.md`](../../../docs/migration/from-nuke.md). diff --git a/src/Shims/Nuke.Components/ShimMarker.cs b/src/Shims/Nuke.Components/ShimMarker.cs new file mode 100644 index 000000000..b1fc4d3f7 --- /dev/null +++ b/src/Shims/Nuke.Components/ShimMarker.cs @@ -0,0 +1,13 @@ +// Copyright 2026 Maintainers of Fallout. +// Originally based on NUKE by Matthias Koch and contributors. +// Distributed under the MIT License. +// https://github.com/ChrisonSimtian/Fallout/blob/main/LICENSE + +// Tells the TransitionShimGenerator to emit shims for every public type whose +// namespace begins with "Fallout.Components" into the corresponding +// "Nuke.Components" namespace. The bulk of this assembly is the component +// interface family (ICompile, IRestore, IPack, ITest, IPublish, IHaz*). + +[assembly: Fallout.Migrate.Shims.ShimAllPublicTypesUnder( + fromNamespacePrefix: "Fallout.Components", + toNamespacePrefix: "Nuke.Components")] diff --git a/tests/Fallout.SourceGenerators.Tests/StronglyTypedSolutionGeneratorTest.Test#Solution.g.verified.cs b/tests/Fallout.SourceGenerators.Tests/StronglyTypedSolutionGeneratorTest.Test#Solution.g.verified.cs index c6ea8197a..d1264f175 100644 --- a/tests/Fallout.SourceGenerators.Tests/StronglyTypedSolutionGeneratorTest.Test#Solution.g.verified.cs +++ b/tests/Fallout.SourceGenerators.Tests/StronglyTypedSolutionGeneratorTest.Test#Solution.g.verified.cs @@ -39,8 +39,10 @@ internal class Solution(SolutionModel model, AbsolutePath path) : Fallout.Common public Fallout.Common.ProjectModel.Project Fallout_Utilities_Text_Json => this.GetProject("Fallout.Utilities.Text.Json"); public Fallout.Common.ProjectModel.Project Fallout_Utilities_Text_Yaml => this.GetProject("Fallout.Utilities.Text.Yaml"); public Fallout.Common.ProjectModel.Project Fallout_VisualStudio_SolutionPersistence => this.GetProject("Fallout.VisualStudio.SolutionPersistence"); + public Fallout.Common.ProjectModel.Project Nuke_Build => this.GetProject("Nuke.Build"); public Fallout.Common.ProjectModel.Project Nuke_Common => this.GetProject("Nuke.Common"); public Fallout.Common.ProjectModel.Project Nuke_Common_Shim_Tests => this.GetProject("Nuke.Common.Shim.Tests"); + public Fallout.Common.ProjectModel.Project Nuke_Components => this.GetProject("Nuke.Components"); public _misc misc => Unsafe.As<_misc>(this.GetSolutionFolder("misc"));