Skip to content

Feat/union suppressor and editorconfig stamp - #42

Merged
kieronlanning merged 10 commits into
mainfrom
feat/union-suppressor-and-editorconfig-stamp
Oct 22, 2026
Merged

kieronlanning merged 10 commits into
mainfrom
feat/union-suppressor-and-editorconfig-stamp

Conversation

@kieronlanning

Copy link
Copy Markdown
Contributor

No description provided.

…skip idle bootstrap work

Adds PDS0006, a diagnostic suppressor for CA1815 on union declarations: a union is a value type, but
C# does not synthesise value equality for one and a union is read by matching its active case, so the
rule asks for members a union cannot provide. Both the `union` keyword and
System.Runtime.CompilerServices.UnionAttribute are recognised; case types and nested types keep the
warning.

The bootstrapped .editorconfig now opens with a version marker, stamped at build and pack time from
the version being packed rather than maintained by hand. A file carrying the marker is refreshed when
the SDK version changes; a file without it belongs to the developer and is never touched.

Performance: the repository bootstrap no longer invokes its inline task when there is nothing to do
(~724ms per build, measured), and PurviewRepositoryRootStrategy replaces the unconditional `git
rev-parse` with a marker walk by default.

Fixes two .editorconfig defects: dotnet_style_prefer_foreach_explicit_cast_in_source was declared in
two overlapping sections so its `warning` severity was silently discarded for every C# file, and
csharp_prefer_system_threading_lock was declared twice.

CI now runs every test suite rather than the unit ones only, and SkillsTesting.UnitTests joins the PR
matrix.
A PackageVersion is already a minimum, so floating "*" was never needed to stay current. What it did
do was make the packed result depend on the day it was built: Purview.Skills.Testing ships TUnit.Core
and TUnit.Assertions as dependencies, and the floor it declared moved from 1.75.0 to 1.76.0 between
1.0.6 and 1.1.0 purely because time passed between the two packs. Consumers then had to satisfy a
minimum nobody chose, and in an Aspire repository it reached as far as the Aspire baseline.

CentralPackageFloatingVersionsEnabled is no longer needed and has been removed.

The starter template names versions for the same reason. It also referenced
Microsoft.SourceLink.AzureDevOps.Git, which does not exist on nuget.org; the package is
Microsoft.SourceLink.AzureRepos.Git. The floating version hid that, because nothing ever restored it.
Pairs with the existing ManagePackageVersionsCentrally default, so a transitive dependency cannot
resolve to a version the repository never named. A central pin below what a transitive requires now
fails restore with NU1109 instead of resolving upward silently, so consumers may need to raise a pin
on upgrade.
The previous commit truncated CHANGELOG.md to zero bytes through a scripting error. Restored from
4d81bca and adds the entry for CentralPackageTransitivePinningEnabled that was meant to accompany it.
A C# 14 extension block compiles into a nested type inside its owning
static class, so CA1034 fires on every one - reported at the extension
keyword and naming nothing, because the generated type has no source
name. The nesting is the language's encoding of the feature rather than
a design choice, and CA1034 ships at error in the shipped .editorconfig,
so a single extension block failed the build.

The suppression is narrow: only the block's own declaration, decided
from syntax alone since there is no name to match. An ordinary nested
type keeps the warning whether it sits beside the block or inside it.
@kieronlanning
kieronlanning merged commit df56500 into main Oct 22, 2026
5 checks passed
@kieronlanning
kieronlanning deleted the feat/union-suppressor-and-editorconfig-stamp branch October 22, 2026 09:31
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