Skip to content

Publish the library as ktsu.Coder - #23

Merged
matt-edmondson merged 3 commits into
mainfrom
claude/github-issue-6-j6bwto
Sep 8, 2026
Merged

Publish the library as ktsu.Coder#23
matt-edmondson merged 3 commits into
mainfrom
claude/github-issue-6-j6bwto

Conversation

@matt-edmondson

@matt-edmondson matt-edmondson commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Closes #6.

What changed

Coder.CoreCoder. The folder, the project file, the solution entry and every project
reference. ktsu.Sdk derives RootNamespace, AssemblyName and PackageId from the project's
path, so the library now packs as ktsu.Coder instead of ktsu.Coder.Core — verified by packing
locally, which produced ktsu.Coder.1.8.2.nupkg.

No source moves. The namespaces were already ktsu.Coder.Ast, ktsu.Coder.Languages and
ktsu.Coder.Serialization, so for a consumer the upgrade is a package reference edit and nothing
else. InternalsVisibleTo("ktsu.Coder.Test") is unaffected.

Coder.ConsoleAppCoder.Cli, with its namespace becoming ktsu.Coder.Cli. The convention
retires .ConsoleApp in favour of .Cli, and the project is OutputType=Exe so ktsu.Sdk never
packed it — the rename costs nothing. The README already called this project Coder.CLI; it now
matches. The project keeps the ktsu.Sdk.ConsoleApp MSBuild SDK, whose name is unrelated.

Coder.App removed. It was never in Coder.slngit log -S"Coder.App" -- Coder.sln returns
nothing — so CI has never built it, and it does not compile under the repository's own analyzer
settings (49 IDE0008 errors). The README told readers to dotnet run --project Coder.App, which
was therefore failing. Its GenerateCommand declares --language and --output and ignores both,
hardcoding PythonGenerator over a comment calling itself a placeholder; Main still opens with
=== STARTING CODER APPLICATION === and calls a TestProgram.TestSpectreConsole that exists to
check Spectre.Console works. Coder.Cli covers the same role and builds, and Coder.Editor is the
interactive surface now. Spectre.Console and Spectre.Console.Cli had no other consumer and leave
Directory.Packages.props with it.

Version. The rename commit is tagged [major], so this ships as 2.0.0 — the break the ID change
is.

Docs. README badges point at ktsu.Coder, the installation section gains a one-paragraph
migration note, the examples section now describes one sample plus the editor, and CLAUDE.md,
.github/copilot-instructions.md, docs/design.md and docs/implementation-plan.md follow the new
project set.

Not done here

Step 3 of the issue — republishing ktsu.Coder.Core once as a deprecated meta-package depending on
ktsu.Coder — is a nuget.org operation, not a repository change, and it can only happen after
ktsu.Coder 2.0.0 exists. A shim project in the repo would be the wrong shape for it: the pipeline
packs and pushes every packable project on every release, so the retired ID would be republished
forever rather than once. ktsu-dev/Sdk#36 says the same ("Deprecation metadata on nuget.org is
tracked separately in ktsu-dev/Sdk#43. It touches no repository."). ktsu.Coder.Core remains live
on nuget.org through 1.8.2 either way, so nothing breaks for a pinned consumer.

Verification

  • dotnet build — succeeded, 0 warnings, 0 errors. Assemblies: ktsu.Coder.dll,
    ktsu.Coder.Cli.dll, ktsu.Coder.Graph.dll, ktsu.Coder.Editor.dll, ktsu.Coder.Test.dll.
  • dotnet test Coder.Test/Coder.Test.csproj — 328 passed, 0 failed, 0 skipped, both before and
    after the Coder.App removal.
  • dotnet pack Coder/Coder.csproj -c Release — produced ktsu.Coder.1.8.2.nupkg. It reports eight
    pre-existing CP0014 cross-framework ApiCompat errors from Polyfill's embedded shim types;
    packing Coder.Core on the base commit reports the identical eight, so this PR neither introduces
    nor fixes them.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DSETRWeAkuev1fm2e5LcQh

The package ID mirrored the project name, so an internal split — a .Core library beside an
executable — was published to consumers. Every other single-library repo in the org publishes under
the bare family name, so this one asked for `ktsu.Coder.Core` where the rest read `ktsu.Extensions`
or `ktsu.Containers`.

Rename `Coder.Core` to `Coder`: the folder, the project file, the solution entry and every project
reference. `ktsu.Sdk` derives the assembly name and package ID from the project's path, so the
library now packs as `ktsu.Coder`. Nothing in the source moves — the namespaces were already
`ktsu.Coder.Ast`, `ktsu.Coder.Languages` and `ktsu.Coder.Serialization` — which makes the upgrade a
package reference edit for consumers.

Rename `Coder.ConsoleApp` to `Coder.Cli` in the same pass. The convention retires `.ConsoleApp` in
favour of `.Cli`, and the project is `OutputType=Exe` so `ktsu.Sdk` never packed it: the rename
costs nothing. Its namespace becomes `ktsu.Coder.Cli`, and the README already described the project
as `Coder.CLI`.

`ktsu.Coder.Core` stays live on nuget.org through 1.8.2. Republishing it once as a deprecated
meta-package depending on `ktsu.Coder` is a nuget.org operation rather than a repository change, and
is tracked separately in ktsu-dev/Sdk#43.

Closes #6

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DSETRWeAkuev1fm2e5LcQh
`Coder.App` was never in `Coder.sln`, so CI has never built it, and it does not compile under the
repository's own analyzer settings: 49 IDE0008 errors for the `var` the rest of the codebase does
not use. The README told readers to `dotnet run --project Coder.App`, which has therefore been
failing.

What it contained does not justify repairing it. `GenerateCommand` declares `--language` and
`--output` and then ignores both, hardcoding `PythonGenerator` and printing to the console, over a
comment saying it is a placeholder for reading function definitions from files. `Main` still opens
with `=== STARTING CODER APPLICATION ===` and calls a `TestProgram.TestSpectreConsole` whose stated
job is verifying that Spectre.Console works.

`Coder.Cli` covers the same demonstrating role and builds, and `Coder.Editor` is the interactive
surface now, so nothing is lost. Spectre.Console and Spectre.Console.Cli had no other consumer in
the repository and leave `Directory.Packages.props` with it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DSETRWeAkuev1fm2e5LcQh
The quality gate failed on this PR with 71.2% coverage on new code against a required 80%. Renaming
a project moves every one of its files, and SonarCloud's new-code detection is path-based, so the
whole of the renamed tree arrived as new code to be covered.

SonarCloud's own per-file measures say where the shortfall is: of 336 uncovered new lines, 209 are
the three files of the sample application — ExpressionDemo, ExtendedDemo and SampleCLI — at 0%.
Excluding them, the library covers 829 of 956 new lines, or 86.7%, comfortably past the gate. The
sample is what fails it, and only because renaming it made it new.

A demonstration app is not the product and has no tests, so covering it proves nothing; it belongs
outside the analysis rather than inside the arithmetic. `SonarQubeExclude` states that in the
project that owns it, which is repo-local and survives a sync of the shared workflow — the coverage
exclusion list in `.github/workflows/dotnet.yml` is shared across the org and is the wrong place for
one repository's sample.

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

Copy link
Copy Markdown
Contributor Author

The SonarCloud gate failure — 71.2% coverage on new code, required ≥ 80% — is the rename, not a coverage regression, and ce5ac8b should clear it.

Renaming a project moves every file it owns, and SonarCloud's new-code detection is path-based, so both renamed trees arrived as new code to be covered. Its own per-file measures say where the shortfall sits (api/measures/component_tree, PR 23):

uncovered / to cover
Coder.Cli/ExpressionDemo.cs 66 / 66 0.0%
Coder.Cli/ExtendedDemo.cs 74 / 74 0.0%
Coder.Cli/SampleCLI.cs 69 / 69 0.0%
Coder.Cli total 209 / 209 0.0%
Coder/ library 127 / 956 86.7%
new code overall 336 / 1165 71.2%

The library is at 86.7% and clears the gate on its own. What fails it is the sample application, which has never had tests and only became new code because it was renamed from Coder.ConsoleApp.

So ce5ac8b sets SonarQubeExclude on Coder.Cli.csproj. A demonstration app is not the product and covering it proves nothing, so it belongs outside the analysis rather than inside its arithmetic. That property lives in the project that owns it, which keeps it repo-local and lets it survive a sync of the shared workflow — the sonar.coverage.exclusions list in .github/workflows/dotnet.yml is shared across the org and is the wrong home for one repository's sample.

Worth noting for the sibling renames tracked in ktsu-dev/Sdk#36 (Keybinding#72, TUI#99, UndoRedo#48, SvnToGit#66): any of those repos with an untested sample project will trip the same gate for the same reason, and this is the same one-line answer.

No other gate condition failed — 0 new issues, 0 security hotspots, 0.0% duplication. dotnet build is clean and all 328 tests pass on this head.


Generated by Claude Code

@matt-edmondson
matt-edmondson merged commit cb6aff8 into main Sep 8, 2026
9 checks passed
@matt-edmondson
matt-edmondson deleted the claude/github-issue-6-j6bwto branch September 8, 2026 09:08
@sonarqubecloud

sonarqubecloud Bot commented Sep 8, 2026

Copy link
Copy Markdown

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