Repository navigation
Description
What's wrong
Every CI run on main since 2026-10-13 has ended in failure. The tests pass on all three OSes. The failing step is Analyze & Release → Release (ktsubuild release). Package validation (ApiCompat) refuses four of the packages it packs:
| Project | Errors per run |
|---|---|
Semantics.Color |
11 |
Semantics.Cpp |
9 |
Semantics.Music |
11 |
Semantics.Strings.Identifiers |
11 |
All of the errors are CP0014/CP0015 between adjacent target frameworks (lib/net8.0 vs lib/net9.0, and lib/net9.0 vs lib/net10.0). They are raised on the Polyfill shims compiled into each assembly:
error CP0015: Cannot change arguments of attribute 'System.Runtime.CompilerServices.NullableContextAttribute' on 'System.Diagnostics.CodeAnalysis.ExperimentalAttribute'. [...\Semantics.Color\Semantics.Color.csproj]
error CP0014: Cannot remove attribute 'System.Runtime.CompilerServices.NullableContextAttribute(2)' from 'System.Diagnostics.CodeAnalysis.ExperimentalAttribute.UrlFormat.get'.
error CP0014: Cannot remove attribute 'System.Runtime.CompilerServices.NullableAttribute(0)' from 'System.Runtime.CompilerServices.DefaultInterpolatedStringHandler'.
error CP0014: Cannot remove attribute 'System.Runtime.CompilerServices.CompilerGeneratedAttribute' from 'System.Diagnostics.CodeAnalysis.ExperimentalAttribute.UrlFormat.set'.
The release step therefore never runs to the end, and nothing has been published since v5.12.1 (2026-10-12T23:30Z). Everything merged after that is unreleased, including the [major] changes for #310 (WeakString set only through Create) and #498 (directory Name is a DirectoryName). The new benchmark-history.yml workflow_run trigger (#320) has therefore never seen a successful CI run: its three runs so far all ended skipped.
Runs (all on main):
- Last green run: 38321074578 (a198bca, 2026-10-12). It packed and released 5.12.1 with KtsuBuild 2.19.2 on SDK 10.0.401.
- First red run: 38368803947 (1aa6971, 2026-10-13). It failed with the same SDK 10.0.401 but KtsuBuild 2.19.3. None of the four projects changed between the two commits.
- Latest red run: 40994500092 (5d5ea9a, 2026-10-30). Same four projects, same diagnostics, on SDK 10.0.403.
Three other projects already reference Polyfill and are multi-targeted, and they pass: Strings, Paths and Quantities. Each of them carries a CompatibilitySuppressions.xml covering exactly these shim differences, together with a comment explaining why:
Semantics.Strings/Semantics.Strings.csproj#L7-L11Semantics.Strings/CompatibilitySuppressions.xml, which has the sameExperimentalAttribute.get_UrlFormatandDefaultInterpolatedStringHandlerentries
The four failing projects reference Polyfill and multi-target, but have no suppression file:
Semantics.Color/Semantics.Color.csproj#L6-L10Semantics.Music/Semantics.Music.csproj#L6-L10Semantics.Strings.Identifiers/Semantics.Strings.Identifiers.csproj#L5-L8Semantics.Cpp/Semantics.Cpp.csproj#L9-L23
The red run starts exactly when KtsuBuild went from 2.19.2 to 2.19.3. This suggests the tool now runs package validation on pack where it did not before, and the four packages without suppressions are the ones exposed by that change. Other repositories in the org that multi-target with Polyfill and have no suppression file may be hitting the same thing.
Reproduce
dotnet pack Semantics.Color -c Release
This fails with the CP0014/CP0015 errors above. The same happens for Semantics.Music, Semantics.Strings.Identifiers and Semantics.Cpp.
Suggested fix
Do for these four projects what Strings, Paths and Quantities already do:
- Generate a
CompatibilitySuppressions.xmlfor each project withdotnet pack -p:ApiCompatGenerateSuppressionFile=true. - Check that every generated entry is a Polyfill shim (
System.Diagnostics.CodeAnalysis.ExperimentalAttribute,System.Runtime.CompilerServices.DefaultInterpolatedStringHandler, …) rather than a real API difference in the library. - Commit the files, with the same explanatory comment in each csproj.
If the 2.19.3 change turns out to be unintended, raise it with KtsuBuild as well. The suppressions are still correct either way, because they cover by-design differences between target frameworks.
Acceptance criteria
dotnet packsucceeds for every shipped project on all target frameworks.- A CI run on
mainreaches the end of the Release step and publishes the next version, which is a major release because of Public init on SemanticString.WeakString bypasses canonicalization and validation:uuid with { WeakString = "not a uuid" }compiles and runs #310 and AbsoluteDirectoryPath.Name and DirectoryPath.Name return FileName, so dir.Parent / dir.Name builds a file path #498. - No suppression entry names a type in a
ktsu.*namespace.
Activity