Skip to content

Keep publishing the CLI as Fallout.GlobalTool - #581

Merged
ChrisonSimtian merged 4 commits into
Fallout-build:mainfrom
ChrisonSimtian:fix/keep-globaltool-package-id
Jul 28, 2026
Merged

Keep publishing the CLI as Fallout.GlobalTool#581
ChrisonSimtian merged 4 commits into
Fallout-build:mainfrom
ChrisonSimtian:fix/keep-globaltool-package-id

Conversation

@ChrisonSimtian

Copy link
Copy Markdown
Collaborator

Keep publishing the dotnet tool as Fallout.GlobalTool (singular) instead of the Fallout.GlobalTools id introduced in f020810.

Fallout.GlobalTool has 52 published versions on nuget.org (10.2.12 → 10.3.49) — that's the id the entire existing install base already has pinned. Staying on it means no consumer migrates, no id gets unlisted, and no migration guide is needed. Assembly/namespace stay Fallout.Cli; the command stays fallout.

The plural id shipped exactly one prerelease, Fallout.GlobalTools 10.4.0-rc.4, so the blast radius is rc testers only — not a GA break, hence no breaking-change label. The README note covers them.

Changes

  • Fallout.Cli.csproj<PackageId>Fallout.GlobalTool</PackageId>, with a comment recording why the package id deliberately doesn't match the assembly name.
  • templates/dotnet-tools.json + BuildScaffolderfallout :setup writes a fallout.globaltool pin into consumer repos again.
  • UpdateNotificationAttribute — in-tool prompt says dotnet tool update Fallout.GlobalTool -g.
  • build/Build.cs — drive-by fix: the Install target installed Solution.Fallout_Cli.Name ("Fallout.Cli"), which never matched the packed nupkg id and has been broken since the id was first decoupled. Now uses a GlobalToolPackageId constant.
  • Docs — repo-wide sweep of the plural id: README, CONTRIBUTING, introduction, 01-installation, 02-setup, 03-execution, github-actions, rebrand-plan. Deleted docs/migration/from-globaltool-to-cli.md (documented a GlobalTool → Cli rename that is now explicitly never happening; already draft: true, no inbound links).

Deliberately not in this PR

.config/dotnet-tools.json still pins fallout.cli 10.3.45 — the repo's own dogfood pin. Flipping it needs a published Fallout.GlobalTool newer than 10.3.49; changing it here would regress dotnet tool restore for the bootstrappers.

Verification

  • dotnet pack src/Fallout.CliFallout.GlobalTool.10.0.0-preview.55.g748120854f.nupkg
  • Fallout.Cli.Specs 47/47 passing; build/_build.csproj compiles

Follow-ups

  • Cherry-pick onto release/v10.4 before 10.4.0 GA, so GA continues the Fallout.GlobalTool sequence from 10.3.49.
  • Deprecate Fallout.GlobalTools 10.4.0-rc.4 on nuget.org with Fallout.GlobalTool as the alternate package.
  • Supersedes most of Switch the global tool during migration, and target the kept package id #576 — that PR moves the repo onto the plural id and adds a RewriteToolManifestStep that rewrites consumer manifests to fallout.globaltools. Needs rebasing to the singular id or closing.

🤖 Generated with Claude Code

The dotnet-tool package id had been changed to Fallout.GlobalTools (plural)
ahead of first release. Revert it: Fallout.GlobalTool is the id the entire
10.2.x/10.3.x install base already has pinned (52 published versions, latest
10.3.49), so continuing to publish under it means nobody migrates and no id
has to be unlisted. Assembly/namespace stay Fallout.Cli; command stays
`fallout`.

- Fallout.Cli.csproj: <PackageId>Fallout.GlobalTool</PackageId>, with a comment
  recording why it deliberately doesn't match the assembly name.
- templates/dotnet-tools.json + BuildScaffolder comments: `fallout :setup`
  writes a `fallout.globaltool` pin into consumer repos again.
- UpdateNotificationAttribute: in-tool prompt says `dotnet tool update
  Fallout.GlobalTool -g`.
- build/Build.cs: the Install target installed `Solution.Fallout_Cli.Name`
  ("Fallout.Cli"), which never matched the packed nupkg id. Point it at a new
  GlobalToolPackageId constant instead.

Docs swept repo-wide for the plural id: README install + note, CONTRIBUTING,
introduction, 01-installation, 02-setup, 03-execution, github-actions,
rebrand-plan. docs/migration/from-globaltool-to-cli.md deleted — it documented
a GlobalTool -> Cli rename that is now explicitly never happening, and was
already draft:true with no inbound links.

Left alone: .config/dotnet-tools.json still pins fallout.cli 10.3.45. That is
the repo's own dogfood pin and flipping it needs a published Fallout.GlobalTool
build newer than 10.3.49; doing it here would regress `dotnet tool restore`.

Verified: pack produces Fallout.GlobalTool.*.nupkg; Fallout.Cli.Specs 47/47.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ChrisonSimtian ChrisonSimtian added bug Something isn't working target/vCurrent Targets the current version labels Jul 27, 2026
Comment thread build/Build.cs
Review feedback on Fallout-build#581: the Install target shouldn't carry yet another
hardcoded copy of the package id. Fallout.ProjectModel already exposes MSBuild
property access on the solution model, so walk the object path instead:

    Solution.Fallout_Cli.GetProperty("PackageId")   // -> Fallout.GlobalTool

Drops the GlobalToolPackageId constant added in the previous commit. The csproj
is now the single source of truth for the id, so changing it later touches one
file.

No new API was needed — ProjectExtensions.GetProperty (src/Fallout.ProjectModel)
has covered this since the NUKE days, and the same MSBuild-evaluation path is
already exercised by this build at Build.cs:98 via GetTargetFrameworks().

Verified end-to-end against fallout.slnx: GetProperty("PackageId") on the
Fallout.Cli project returns "Fallout.GlobalTool".

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Comment thread build/Build.cs
@ChrisonSimtian
ChrisonSimtian marked this pull request as ready for review July 27, 2026 22:08
@ChrisonSimtian
ChrisonSimtian requested a review from a team as a code owner July 27, 2026 22:08
ChrisonSimtian added a commit to ChrisonSimtian/Fallout that referenced this pull request Jul 27, 2026
…t id

Two changes to what fallout-migrate does about the tool package id.

Point the migration at Fallout.GlobalTool. Fallout-build#581 settled on keeping the
NUKE-era id rather than moving to Fallout.GlobalTools, so the current id and
the retired list swap places:

  current:  fallout.globaltool
  retired:  nuke.globaltool, fallout.cli, fallout.globaltools

A consumer already pinning fallout.globaltool now migrates to nothing, which is
the point of keeping that id. Covered by a spec.

Add SwitchGlobalToolStep. Rewriting .config/dotnet-tools.json only fixes the
repo. A machine-wide install of a retired tool stays behind, and two packages
providing the `fallout` command conflict, so the repo-only fix left the machine
broken. The new step reads `dotnet tool list --global`, uninstalls each retired
id that is installed, then installs the current one at the resolved version.

It runs after RewriteToolManifestStep: repo first, so an interrupted run still
leaves the committed state correct. Every command is best-effort — no dotnet on
PATH, no global install, or an unreachable feed produces a Summary warning
naming the command to run by hand, never a failed migration. --dry-run prints
the commands without running them.

Introduces CliWrap (3.10.3, central pin) for the process calls: buffered output
and a cancellation token without hand-rolled ProcessStartInfo plumbing. Scoped
to Fallout.Migrate on purpose. Fallout.Common has its own ProcessTasks layer
that build authors consume, and that is not changing. Added to
docs/dependencies.md under a new Console / process section.

Also flips .config/dotnet-tools.json to fallout.globaltool 10.3.49. The pin
could not move while the id was Fallout.GlobalTools, because nothing was
published there above 10.4.0-rc.4. Verified: `dotnet tool restore` resolves it.

docs/migration/tool-package-id.md rewritten around the kept id. It is now a
"move off a retired id" page, and most readers need no action at all.

Verified: Fallout.Migrate.Specs 63/63; solution builds; dry-run against a
scratch repo pinning fallout.cli rewrites the manifest as expected.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ChrisonSimtian

Copy link
Copy Markdown
Collaborator Author

Follow-ups from this thread are now in place:

One useful side effect: with the id back to Fallout.GlobalTool, the dogfood pin in .config/dotnet-tools.json is no longer blocked. fallout.globaltool 10.3.49 is published and restores, so #576 flips the pin off fallout.cli 10.3.45. That was the one thing this PR deliberately left alone.

ChrisonSimtian added a commit to ChrisonSimtian/Fallout that referenced this pull request Jul 27, 2026
CI on this branch went into a loop of repeated `dotnet tool restore` and was
killed by the OOM killer after 11 minutes. Two problems, one of which is a real
bug in the previous commits.

Revert .config/dotnet-tools.json to fallout.cli 10.3.45. Moving it to
fallout.globaltool 10.3.49 was verified only as far as `dotnet tool restore`
succeeding, which it does. What was never checked is that a 10.3.49 CLI can
actually run this repo's build, and CI says something in that path does not
terminate. 10.3.49 is a late one-off publish under the old id, not a build this
branch has ever run against. The pin stays where main has it until a
Fallout.GlobalTool release newer than the 10.4 line exists — which is the
constraint Fallout-build#581 documented and this branch wrongly assumed it had cleared.

Gate SwitchGlobalToolStep behind --switch-global-tool, default off.
MigrationIntegrationSpecs runs the real pipeline with dryRun: false, so the step
was shelling out to `dotnet tool list --global` on every spec run, and would
have run uninstall/install on any machine that happened to have a retired id
installed. A unit test run must not change what software is on the machine.
Beyond the specs, silently changing a machine-wide install is too large a side
effect for a tool whose job is to migrate a repository, so opt-in is the right
default regardless of the test problem.

Flag threads MigrateSettings -> Migration -> MigrationContext, next to DryRun.
docs/migration/tool-package-id.md documents it.

Verified: Fallout.Migrate.Specs 63/63. CI is the real check for the pin revert.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@dennisdoomen dennisdoomen 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.

🤔 Don't you want this on 10.4? If so, it should target the release branch.

Comment thread docs/rebrand-plan.md
Comment thread src/Fallout.Build/Execution/Extensions/UpdateNotificationAttribute.cs Outdated
ChrisonSimtian added a commit to ChrisonSimtian/Fallout that referenced this pull request Jul 28, 2026
The tool id the migration moves consumers onto was a literal, independent of
the id Fallout.Cli is actually published under. The two could drift, and a
migration would then pin an id that does not exist.

Holds the id in one place instead: a FalloutGlobalToolPackageId property in
Directory.Build.props feeds Fallout.Cli's PackageId, and a small MSBuild
target compiles the same value into Fallout.Migrate as a constant. Lowercased
on the way in, so written dotnet-tools.json manifests stay byte-identical to
what the previous literal produced.

Runtime lookup is not an option here: fallout-migrate runs against a
consumer's repository, where no Fallout csproj exists, so the
Solution.Fallout_Cli.GetProperty("PackageId") approach used in build/Build.cs
cannot reach anything.

Both projects fail the build if the property is ever empty. Without that,
Fallout.Cli would quietly fall back to its assembly name and publish as
Fallout.Cli, which is the id Fallout-build#581 exists to avoid.

This is a hotfix so Fallout-build#576 is not blocked. Fallout-build#584 designs the general mechanism
for flowing published ids into shipped code and should replace all of it; the
three touched files carry HOTFIX notes saying what to remove.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Comment thread src/Fallout.Build/Execution/Extensions/UpdateNotificationAttribute.cs Outdated
ChrisonSimtian and others added 2 commits July 29, 2026 10:05
The "UPDATE RECOMMENDED FROM 5.1.0" header was hardcoded in NUKE
9885956 (March 2021) and never updated since, so it named a version
no Fallout consumer has ever run. The header still earns its place —
it gives the numbered steps context in a server-build warning — so
only the version reference goes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
docs/rebrand-plan.md is being removed — it describes a rename that has
already landed and reads to AI tools as a live plan needing maintenance.
The reason this PackageId deliberately diverges from the assembly name
belongs with the package-id-as-consumer-contract discussion in Fallout-build#582.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ChrisonSimtian

Copy link
Copy Markdown
Collaborator Author

Review round two — all threads answered.

On 10.4 (@dennisdoomen): yes, it needs to land there, but via main first rather than retargeting.

main is the integration trunk and release/YYYY-style branches are the production line, so anything that is not a release-line-only fix lands on main and gets promoted — there is already a promote/main-to-v10.4 lane doing exactly that. Retargeting would strand the Install-target fix and the docs sweep on the release branch and let main drift straight back onto the plural id. Cherry-pick before 10.4.0 GA is tracked in the PR description, so GA continues the Fallout.GlobalTool sequence from 10.3.49.

Pushed:

  • a456106 — dropped the stale 5.1.0 from the update-notification header. It was hardcoded in NUKE 9885956b (March 2021) and never updated, so it named a version no Fallout consumer has run. Kept a --- UPDATE RECOMMENDED --- header rather than the bare "", since [UpdateNotification] is live on FalloutBuild and the numbered steps need context in a server-build warning.
  • f7226b4 — the <PackageId> comment now points at Normalise the package-id / project-name relationship so renames stop moving published ids #582 instead of docs/rebrand-plan.md, which is being removed.

Filed:

Separate PR incoming for removing docs/rebrand-plan.md. It is not a clean delete — five inbound references, one of them shipped to users as the NukeMigrationAnalyzer helpLinkUri — so it gets its own change rather than riding along here.

@ChrisonSimtian
ChrisonSimtian merged commit 9abde1d into Fallout-build:main Jul 28, 2026
2 checks passed
ChrisonSimtian added a commit that referenced this pull request Jul 28, 2026
Review feedback on #581: the Install target shouldn't carry yet another
hardcoded copy of the package id. Fallout.ProjectModel already exposes MSBuild
property access on the solution model, so walk the object path instead:

    Solution.Fallout_Cli.GetProperty("PackageId")   // -> Fallout.GlobalTool

Drops the GlobalToolPackageId constant added in the previous commit. The csproj
is now the single source of truth for the id, so changing it later touches one
file.

No new API was needed — ProjectExtensions.GetProperty (src/Fallout.ProjectModel)
has covered this since the NUKE days, and the same MSBuild-evaluation path is
already exercised by this build at Build.cs:98 via GetTargetFrameworks().

Verified end-to-end against fallout.slnx: GetProperty("PackageId") on the
Fallout.Cli project returns "Fallout.GlobalTool".

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ChrisonSimtian
ChrisonSimtian deleted the fix/keep-globaltool-package-id branch July 28, 2026 22:26
ChrisonSimtian added a commit to ChrisonSimtian/Fallout that referenced this pull request Jul 28, 2026
…tion

FalloutGlobalToolPackageId was added but never used — UpdateNotificationAttribute
still printed the id as a literal, so the constant was dead and free to drift from
the thing it claimed to mirror.

Now that Fallout-build#581 has landed and <PackageId> is settled as the singular
Fallout.GlobalTool, the two agree and the attribute can read the constant.

This is still a hand-kept copy, not a derivation: the attribute ships inside
Fallout.Common and runs in a consumer's build, where no Fallout csproj exists to
read <PackageId> from. Flowing the id in at compile time is the follow-up on Fallout-build#584.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ChrisonSimtian added a commit that referenced this pull request Jul 28, 2026
Review feedback on #581: the Install target shouldn't carry yet another
hardcoded copy of the package id. Fallout.ProjectModel already exposes MSBuild
property access on the solution model, so walk the object path instead:

    Solution.Fallout_Cli.GetProperty("PackageId")   // -> Fallout.GlobalTool

Drops the GlobalToolPackageId constant added in the previous commit. The csproj
is now the single source of truth for the id, so changing it later touches one
file.

No new API was needed — ProjectExtensions.GetProperty (src/Fallout.ProjectModel)
has covered this since the NUKE days, and the same MSBuild-evaluation path is
already exercised by this build at Build.cs:98 via GetTargetFrameworks().

Verified end-to-end against fallout.slnx: GetProperty("PackageId") on the
Fallout.Cli project returns "Fallout.GlobalTool".

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
(cherry picked from commit cef0b37)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working target/vCurrent Targets the current version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants