Skip to content

[major] Retire .Core from the published package ID - #101

Merged
matt-edmondson merged 1 commit into
mainfrom
rename/retire-core-package-id
Sep 22, 2026
Merged

matt-edmondson merged 1 commit into
mainfrom
rename/retire-core-package-id

Conversation

@matt-edmondson

Copy link
Copy Markdown
Contributor

Fixes #72

What changed

Keybinding.Core.csproj published as ktsu.Keybinding.Core. Because ktsu.Sdk derives the package ID from the project filename, an internal decision about whether the repo also ships an executable was leaking into the published ID.

  • Renamed the project folder and file Keybinding.CoreKeybinding, so the derived package ID becomes ktsu.Keybinding.
  • Updated the solution entry and the ProjectReference in both Keybinding.Test and Keybinding.Demo.
  • Retargeted all 80 entries in CompatibilitySuppressions.xml, which address suppressions by assembly path (lib/<tfm>/ktsu.Keybinding.Core.dlllib/<tfm>/ktsu.Keybinding.dll).
  • Updated the NuGet badges and the project-reference sentence in README.md, and the tree diagram in CLAUDE.md.

Keybinding.Demo already matched the convention and needed no rename.

Verification

Package produced Tests Demo build
main ktsu.Keybinding.Core.1.0.54.nupkg
this branch ktsu.Keybinding.1.0.54.nupkg 52/52 passed 0 errors

The CompatibilitySuppressions.xml retarget is load-bearing. Reverting just that file and re-packing surfaces 6 diagnostics that main suppresses:

Diagnostic main this branch suppressions left stale
CP0014 5
CP0015 1
unmatched-suppression 2 2 3
CP0001 / CP0002 / CP0008 / CP0016 6 / 20 / 1 / 7 6 / 20 / 1 / 7 6 / 20 / 1 / 7

With the file retargeted, this branch's diagnostic signature is identical to main's.

Note that dotnet pack exits non-zero on main in this environment already — suppressed diagnostics resurface regardless of the rename. That is pre-existing and orthogonal; the point of the table is that the before/after signatures match exactly.

One open question, deliberately not decided here

Source namespaces still read ktsu.Keybinding.Core, ktsu.Keybinding.Core.Models, ktsu.Keybinding.Core.Contracts and so on. The issue's Convention paragraph says "assembly name and root namespace equal the package ID", which would make these ktsu.Keybinding.* — but its numbered Change list asks only for the folder, .csproj and solution entry.

Those differ in blast radius by a lot. Renaming the package alone breaks a consumer's PackageReference line; renaming the namespaces additionally breaks every using directive they have. I kept to the change list, so this PR is a package-ID break only and existing source keeps compiling. If the namespaces should move too, that is worth its own issue and is best landed in the same major.

Not in this PR

Step 3 of the issue — republishing ktsu.Keybinding.Core once as a deprecated meta-package depending on ktsu.Keybinding, so the 35 already-published versions get a working upgrade path rather than a dead ID — is a nuget.org publishing action rather than a source change. It still needs doing before or alongside the first ktsu.Keybinding release.

The commit is tagged [major] per the issue's "ship at the next major".

🤖 Generated with Claude Code

https://claude.ai/code/session_01KgqmLojZd3sn1M5mRN75ms


Generated by Claude Code

Keybinding.Core.csproj published as ktsu.Keybinding.Core, so an internal
decision about whether the repo also ships an executable leaked into the
package ID. Forty-odd single-library repos in the org publish under the
bare family name; this one did not.

Rename the project folder and file to Keybinding, so ktsu.Sdk derives the
package ID ktsu.Keybinding, and update the solution entry along with the
ProjectReference in both Keybinding.Test and Keybinding.Demo.

CompatibilitySuppressions.xml addresses its 80 suppressions by assembly
path, so every entry had to move from ktsu.Keybinding.Core.dll to
ktsu.Keybinding.dll. Left stale, 6 diagnostics that main suppresses
(5 CP0014, 1 CP0015) resurface.

Namespaces still read ktsu.Keybinding.Core.*, which the issue's
convention paragraph would also have equal the package ID. Renaming them
would break every consumer's using directives rather than just their
PackageReference, and the issue's change list does not ask for it, so it
is left for a separate decision.

Fixes #72

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KgqmLojZd3sn1M5mRN75ms
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
52.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@matt-edmondson
matt-edmondson merged commit 7baa221 into main Sep 22, 2026
10 of 12 checks passed
@matt-edmondson
matt-edmondson deleted the rename/retire-core-package-id branch September 22, 2026 00:40
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.

Retire .Core from the published package ID

2 participants