Skip to content

Add CompatibilitySuppressions.xml to Color, Cpp, Music and Strings.Identifiers [patch] - #519

Merged
matt-edmondson merged 1 commit into
mainfrom
fix/517-compat-suppressions
Nov 4, 2026
Merged

matt-edmondson merged 1 commit into
mainfrom
fix/517-compat-suppressions

Conversation

@matt-edmondson

Copy link
Copy Markdown
Contributor

Fixes #517

What changed

This follows the issue's suggested fix, which is what Strings, Paths and Quantities already do.

  • Suppression files: I generated a CompatibilitySuppressions.xml for Semantics.Color, Semantics.Cpp, Semantics.Music and Semantics.Strings.Identifiers with -p:ApiCompatGenerateSuppressionFile=true.
  • No library types: every entry is a Polyfill shim. The targets are System.Diagnostics.CodeAnalysis.ExperimentalAttribute (including UrlFormat and its accessors) and System.Runtime.CompilerServices.DefaultInterpolatedStringHandler (the type, its .ctor and AppendFormatted). No entry names a ktsu.* type.
  • csproj comment: each of the four projects now carries the same explanatory comment as Semantics.Strings.csproj, including how to regenerate the file.

Verification

Run locally on SDK 10.0.403, for each of the four projects:

dotnet pack Semantics.<Project>/Semantics.<Project>.csproj -c Release -p:SolutionDir=<root>/ -p:SolutionName=Semantics
Project main this branch (clean bin/obj)
Color 11 CP errors, fails exit 0, ktsu.Semantics.Color.6.0.0.nupkg
Cpp 9 CP errors, fails exit 0, ktsu.Semantics.Cpp.6.0.0.nupkg
Music 11 CP errors, fails exit 0, ktsu.Semantics.Music.6.0.0.nupkg
Strings.Identifiers 11 CP errors, fails exit 0, ktsu.Semantics.Strings.Identifiers.6.0.0.nupkg

The error counts on main match the ones in the issue.

Tests:

  • dotnet test --project Semantics.Test: 1962 passed, 14 skipped, 0 failed.
  • dotnet test --project Semantics.Cpp.Test -f net10.0: 45 passed. This container has no .NET 9 runtime, so the net9.0 leg could not run here.

I didn't look into the KtsuBuild 2.19.2 → 2.19.3 question the issue raises. As the issue says, the suppressions are correct either way.


Generated by Claude Code

…entifiers [patch]

These four projects multi-target and compile Polyfill shims, but unlike
Strings, Paths and Quantities they had no suppression file, so package
validation failed the Release step with CP0014/CP0015 on the shim types
(ExperimentalAttribute.UrlFormat, DefaultInterpolatedStringHandler) between
adjacent TFMs. Generated with -p:ApiCompatGenerateSuppressionFile=true; every
entry is a System.* shim and none names a ktsu.* type. Each csproj gets the
same explanatory comment Semantics.Strings carries.

Fixes #517

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

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.

No release since v5.12.1: every CI run on main fails in Release on package validation (CP0014/CP0015) for Color, Cpp, Music and Strings.Identifiers

1 participant