Skip to content

feat(packaging): publish the CLI as pz, not Pz.Cli - #4

Merged
coccor merged 1 commit into
mainfrom
worktree-package-id-pz
Aug 20, 2026
Merged

feat(packaging): publish the CLI as pz, not Pz.Cli#4
coccor merged 1 commit into
mainfrom
worktree-package-id-pz

Conversation

@coccor

@coccor coccor commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Makes the install line dotnet tool install -g pz. <PackageId>pz</PackageId> on Pz.Cli.csproj is the whole functional change; the project, assembly, and namespace keep their names, so this is the one place a published id differs from a project name.

scripts/lib/packable-ids.sh derived the expected package set from project names, which is now one name short of the truth. It reads each project's <PackageId> and falls back to the project name, so the derivation survives this override and any future one.

pz is unclaimed on nuget.org (no package, no versions), so the id is available.

Two manual steps this PR cannot do

Both are written into CONTRIBUTING.md's release section and release.yml's prerequisites block, where whoever cuts the release will look:

  1. The trusted publishing policy must name pz. The existing policy globs Pz.*, which does not match a bare pz. Without widening it (or adding a second policy), the release push fails authentication for this package alone — after the other three have published against a tag that can't be reused.
  2. Deprecate Pz.Cli on nuget.org ("Other", alternate package pz) and leave its versions listed so existing lock files still restore. Don't publish under both ids: two packages claiming the same pz shim make the second global install fail.

Existing users

NuGet has no redirect, so dotnet tool update -g Pz.Cli stays pinned at 0.2.0, and installing pz over a global Pz.Cli fails on the shim collision. The README now says to uninstall first, and the offline bundle's install.ps1 removes a legacy tool-path install before installing pz.

Verification

  • dotnet build Pz.slnx -c Release — 0 warnings, 0 errors
  • dotnet test Pz.slnx -c Release --no-build (PZ_TESTS_OFFLINE=1) — 0 failed
  • scripts/verify-tool-install.sh — pack → dotnet tool install pz from a local-feed-only config → offline pz init → offline pz run --all, 12/12 nodes. PASS.

Follow-up in pz-site

Four install lines need the new id; the other Pz.Cli mentions there are project paths and stay correct.

  • src/content/docs/quickstart.md:19
  • src/content/docs/index.mdx:190
  • src/content/docs/articles/10-meet-pz.md:21
  • src/content/docs/how-to/run-scheduled-on-windows.md:29

The install line is the first thing a stranger runs, and an id they have to
be told ("it's Pz.Cli, with a dot") is friction on the one command that has
to work before any other. `<PackageId>pz</PackageId>` makes
`dotnet tool install -g pz` the real line; the project, assembly, and
namespace stay Pz.Cli, so this is the single place the two names diverge.

scripts/lib/packable-ids.sh derived the expected package set from project
names, which is now one name short of the truth -- it reads each project's
<PackageId> and falls back to the project name, so the derivation keeps
working for any future override too.

Two consequences no code can enforce, so both are written down where the
person doing them will look:

- The nuget.org trusted publishing policy globs ids as "Pz.*", which a bare
  "pz" does not match. Without a policy naming it, release.yml's push fails
  authentication for this package alone, after the other three have already
  published against a tag that cannot be reused. CONTRIBUTING.md's policy
  setup and release.yml's prerequisites block both say so now.
- Pz.Cli published 0.1.0 through 0.2.0 and keeps resolving forever; NuGet has
  no redirect. It gets deprecated on nuget.org pointing at `pz`, stays listed
  so existing lock files restore, and must not be published under both ids --
  two packages claiming the same `pz` shim make the second install fail. The
  README tells an existing user to uninstall first, and the offline bundle's
  install.ps1 removes a legacy tool-path install before installing `pz`.

Verified with scripts/verify-tool-install.sh: pack -> tool install by the new
id from a local-feed-only config -> offline `pz init` -> offline `pz run
--all`, 12/12 nodes.
@coccor
coccor marked this pull request as ready for review August 20, 2026 19:49
@coccor
coccor merged commit ca90edb into main Aug 20, 2026
3 checks passed
@coccor
coccor deleted the worktree-package-id-pz branch August 20, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant