Repository navigation
fallout-migrate 10.4.0: IHaz* not rewritten, scripts outside the root, stale build.schema.json, lost indentation #686
Description
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
- A NUKE 10.1.0 build using
Nuke.Components(IHazSolutionetc.), CPM with$(NukeVersion), bootstrap scripts ineng/, andArtifactsPathunder the repository root. dnx --yes fallout.migrate@10.4.0 ../eng/build.sh Compile→ CS0246 onIHaz*; restore NU1010 per fallout-migrate: CPM repos fail to restore after migration (NU1010); Directory.Packages.props & VersionOverride not rewritten #492;.fallout/build.schema.jsonstill saysNukeBuild.
Activity
ANcpLua commentedon Oct 2, 2026
Clarification on point 1: the
[Obsolete]IHaz*aliases do exist at68e637e, but only in theNuke.Componentstransition shim (src/Shims/Nuke.Components/IHaz*.cs, namespaceNuke.Components).src/Fallout.ComponentshasIHasSolutionetc. and noIHaz*.RewriteCsFilesStepturnsusing Nuke.Components;intousing Fallout.Components;, so migrated code no longer sees the shim aliases and fails with CS0246. The\bIHaz(?=[A-Z])→IHasrewrite in that step is the fix that matches what the tool already emits.ANcpLua commentedon Oct 2, 2026
Two corrections to the description above.
Point 3. The stated cause needs an opt-in. Fallout's default build template ships a
Directory.Build.propsthat blocks the parent import (src/Fallout.Cli/templates/Directory.Build.props), so a rootArtifactsPathdoes not reach the build project and the first build regenerates the schema. The cause applies only when the build project imports the rootDirectory.Build.props.In every case the migration moves the schema without regenerating it, so
falloutcompletion and:secretsfail on the staleNukeBuildschema 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
developby da19722. Only the comment left behind above the removedSystem.Security.Cryptography.Xmlreference still happens ondevelop.ANcpLua commentedon Oct 12, 2026
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.Xmlreference still happens ondevelop.ANcpLua commentedon Oct 18, 2026
All points are fixed or decided:
System.Security.Cryptography.Xmlreference: it stays on purpose, as decided in Rewrite central package versions and version properties in .props files in fallout-migrate #694.Closing.