Skip to content

Rewrite IHaz* names, bootstrap scripts outside the root, and the moved schema in fallout-migrate - #693

Open
ANcpLua wants to merge 4 commits into
Fallout-build:developfrom
ANcpLua:bugfix/migrate-ihaz-scripts-schema
Open

ANcpLua wants to merge 4 commits into
Fallout-build:developfrom
ANcpLua:bugfix/migrate-ihaz-scripts-schema

Conversation

@ANcpLua

@ANcpLua ANcpLua commented Oct 3, 2026

Copy link
Copy Markdown

Fixes points 1 to 3 of #686 (fallout-migrate 10.4.0 leaves hand edits after "Migration complete"). One commit per fix.

What changed

  • RewriteCsFilesStep renames the nine shipped IHaz* component interfaces to IHas*. The [Obsolete] IHaz* aliases exist only in the Nuke.Components shim, which the namespace swap moves the code away from. The rename is limited to the shipped names, so a user-defined IHaz* interface keeps its name.
  • RewriteBootstrapScriptsStep and CleanupBootstrapScriptsStep search the whole tree for build.cmd, build.ps1 and build.sh instead of the repository root only, the same way the .cs and .csproj steps do. A script without NUKE-specific text is not written. CleanupBootstrapScriptsStep now leaves a file alone when the NUKE_ENTERPRISE_TOKEN line has no closing fi/}, instead of throwing.
  • RenameNukeDirectoryStep renames the NukeBuild definition and its $ref in build.schema.json before moving .nuke/ to .fallout/, so fallout completion and :secrets can read the file until the first build regenerates it. A repository already migrated by 10.4.0 is repaired the same way. This is the migration side of Fallout CLI autocompletion is not backward compatible with NukeBuild project #664 (completion fails on a NukeBuild schema); Add backward compatibility with Nuke projects not yet migrated in the CLI completion #663 makes the reader tolerant instead.

Tests

  • Two specs for the IHaz* rename, including the user-defined case.
  • Four specs for scripts in a subdirectory, an unrelated build.sh, and the token line without a block.
  • New RenameNukeDirectoryStepSpecs: moved schema, already-migrated repository, dry run.

🤖 Generated with Claude Code

ANcpLua and others added 3 commits October 3, 2026 22:00
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@ANcpLua
ANcpLua marked this pull request as ready for review October 6, 2026 21:56
@ANcpLua
ANcpLua requested a review from a team as a code owner October 6, 2026 21:56
Copilot AI balanced review requested due to automatic review settings October 6, 2026 21:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@ChrisonSimtian

Copy link
Copy Markdown
Collaborator

good catch @ANcpLua can you please add an issue for this as well for completeness sake?
Thanks :-)

Code review will follow in a sec

@ChrisonSimtian ChrisonSimtian left a comment

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.

No blocking issues. Approving.

The fixes for the three findings in #686 are clear and each has specs. I checked the nine IHaz* names against Fallout.Components and the shim, and the FalloutBuild lookup in CompletionUtility. Both match.

Comments 1 (token with an unrelated closer) and 3 (both .nuke/ and .fallout/ exist) are worth fixing before merge. The question on the tree search and the two nits are optional.

Comment thread src/Fallout.Migrate/Steps/CleanupBootstrapScriptsStep.cs
Comment thread src/Fallout.Migrate/Steps/RenameNukeDirectoryStep.cs Outdated
Comment thread src/Fallout.Migrate/Steps/RewriteBootstrapScriptsStep.cs
Comment thread src/Fallout.Migrate/Steps/RenameNukeDirectoryStep.cs
Comment thread src/Fallout.Migrate/Steps/RewriteCsFilesStep.cs
@ChrisonSimtian ChrisonSimtian added the enhancement New feature or request label Oct 8, 2026
…e in fallout-migrate

Review feedback on the IHaz*, bootstrap script and schema changes:

- Leave a script alone when the first NUKE_ENTERPRISE_TOKEN line is not the
  generated `if` line. Before, an `export` line was removed together with
  everything up to an unrelated `fi` or `}` later in the file.
- When both .nuke/ and .fallout/ exist, rewrite only the .fallout/ schema.
  The .nuke/ schema is left for the manual merge.
- Add a spec that every IHaz* alias in the Nuke.Components shim is renamed,
  so a new alias that the hard-coded list misses fails a test.
- Explain why the broad NukeBuild match in the schema is safe.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants