Skip to content

fallout-migrate 10.4.0: IHaz* not rewritten, scripts outside the root, stale build.schema.json, lost indentation #686

Closed

Description

@ANcpLua

Usage Information

fallout-migrate 10.4.0 run as dnx --yes fallout.migrate@10.4.0 ., migrating three NUKE 10.1.0 builds to Fallout.Common / Fallout.Components 10.4.0. .NET SDK 10.0.401, macOS 27 arm64. Source references are to develop at 68e637e. The central-package-management gap from the same migration is #492 (comment added there).

Description

The tool reports "Migration complete", but each build needed these hand edits before it compiled and its targets passed.

1. IHaz* component interfaces are neither aliased nor rewritten.
#120 planned [Obsolete] IHaz* aliases for a non-breaking migration and #242 a code fix for the resulting CS0618. In 10.4.0 the aliases are absent, so IHazSolution, IHazArtifacts and IHazConfiguration fail with CS0246, and RewriteCsFilesStep rewrites only the Nuke. prefix, NukeBuild and INukeBuild (lines 21–33). Either the aliases or a \bIHaz(?=[A-Z]) → IHas rewrite would close it. (Related: #619.)

2. Bootstrap scripts outside the repository root are skipped.
RewriteBootstrapScriptsStep checks only context.RootDirectory / name for build.cmd, build.ps1, build.sh (line 43). With eng/build.sh + eng/build.ps1 and NukeScriptDirectory=.., the scripts keep .nuke/temp and the NUKE_ENTERPRISE_TOKEN feed block. Rewriting the scripts the build's script directory points at, or listing them as skipped, would help.

3. .nuke/build.schema.json is moved, not regenerated.
RenameNukeDirectoryStep renames the directory (lines 17–18), so .fallout/build.schema.json still defines "NukeBuild". The schema is rewritten only when BuildProjectFile resolves by walking up from the build assembly's directory (FalloutBuild.Statics.cs, GetBuildProjectFile); with build output under a root Artifacts/ folder that walk finds no *.csproj, so the stale file stays. Deleting it during migration (or warning) would avoid shipping it.

4. Removing a line drops the next line's indentation, and the Cryptography.Xml removal leaves its comment behind.

-    <NukeTelemetryVersion>1</NukeTelemetryVersion>
-    <NukeExcludeConfig>True</NukeExcludeConfig>
+<FalloutExcludeConfig>True</FalloutExcludeConfig>
     <!-- Pin transitive dependency to a patched version to avoid the NU1903 audit error ... -->
-    <PackageReference Include="System.Security.Cryptography.Xml"/>
-  </ItemGroup>
+</ItemGroup>

On 10.4.0 the removal itself is harmless: Fallout.Common 10.4.0 depends on System.Security.Cryptography.Xml 10.0.10, which fixes all five advisories against 10.0.0–10.0.9. Only the explanatory comment above the removed reference is left behind. (An earlier version of this issue said the removal could downgrade to a vulnerable 10.0.6; that is true of 10.3.49's dependency, not 10.4.0's.)

Reproduction Steps

  1. A NUKE 10.1.0 build using Nuke.Components (IHazSolution etc.), CPM with $(NukeVersion), bootstrap scripts in eng/, and ArtifactsPath under the repository root.
  2. dnx --yes fallout.migrate@10.4.0 .
  3. ./eng/build.sh Compile → CS0246 on IHaz*; restore NU1010 per fallout-migrate: CPM repos fail to restore after migration (NU1010); Directory.Packages.props & VersionOverride not rewritten #492; .fallout/build.schema.json still says NukeBuild.

Activity

  1. ANcpLua commented on Oct 2, 2026

    @ANcpLua
    ContributorAuthor

    Clarification on point 1: the [Obsolete] IHaz* aliases do exist at 68e637e, but only in the Nuke.Components transition shim (src/Shims/Nuke.Components/IHaz*.cs, namespace Nuke.Components). src/Fallout.Components has IHasSolution etc. and no IHaz*.

    RewriteCsFilesStep turns using Nuke.Components; into using Fallout.Components;, so migrated code no longer sees the shim aliases and fails with CS0246. The \bIHaz(?=[A-Z]) → IHas rewrite in that step is the fix that matches what the tool already emits.

  2. ANcpLua commented on Oct 2, 2026

    @ANcpLua
    ContributorAuthor

    Two corrections to the description above.

    Point 3. The stated cause needs an opt-in. Fallout's default build template ships a Directory.Build.props that blocks the parent import (src/Fallout.Cli/templates/Directory.Build.props), so a root ArtifactsPath does not reach the build project and the first build regenerates the schema. The cause applies only when the build project imports the root Directory.Build.props.

    In every case the migration moves the schema without regenerating it, so fallout completion and :secrets fail on the stale NukeBuild schema until the first build. That is the same code path as #664 / #663.

    Point 4. The lost indentation is a 10.4.0 bug and is already fixed on develop by da19722. Only the comment left behind above the removed System.Security.Cryptography.Xml reference still happens on develop.

  3. ANcpLua commented on Oct 12, 2026

    @ANcpLua
    ContributorAuthor

    Status update: #693 (IHaz* rename, bootstrap scripts outside the root, schema rename) fixed points 1 to 3. da19722 fixed the lost indentation from point 4. Only the comment left above the removed System.Security.Cryptography.Xml reference still happens on develop.

  4. ANcpLua commented on Oct 18, 2026

    @ANcpLua
    ContributorAuthor

    All points are fixed or decided:

    Closing.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions