fix(ci): exclude BCArtifact from lowest-version TFM outputs - #554
Merged
Merged
Conversation
BCArtifact sandbox snapshots include SDK versions as old as v12.x, which predate the RoslynTestKit compilation target (v17.0.34). When these define the compile-time floor, the Build job hits CS1705 assembly-version mismatches on every cop test project. Filter BCArtifact sources out of the tfm-*-version-lowest pipelines so only VSIX and NuGet sources set the floor. BCArtifact sources remain in the test matrix. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The Build job compiles analyzers once per TFM against the lowest VSIX/NuGet SDK version. BCArtifact sandbox snapshots (BC 27.5, BC 28.5) ship net10.0 SDKs older than that floor, so the pre-built DLLs cannot be loaded (CS1705). The new filter in setup-test-matrix computes the per-TFM floor from VSIX/NuGet sources and drops BCArtifact entries below it; preview artifacts above the floor stay. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Its net10.0 lib references SDK 18.0.41.39415 which matches the net10.0 build floor, so it can never trip CS1705 on any kept test leg. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The rules doc now describes the actual mechanism behind the VSIX/NuGet-only compile floor and the matching test-matrix filter: BC sandbox artifacts ship net10.0 SDKs older than any marketplace or NuGet net10.0 release, and pre-built analyzer DLLs cannot be loaded by an older SDK assembly. It also records the accepted detection gap and the SDK-version contract RoslynTestKit must honour. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
RoslynTestKit 1.5.0 references the net10.0 SDK 18.0.41.39415, the same version CI uses as the net10.0 compile floor. The previous local pin (18.0.36.33307-beta) is older, so every cop test project failed to compile locally with CS1705. The stable NuGet package ships tools/net10.0/any. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Compute the floor from the same source list get-bc-devtools uses, so the two floors cannot diverge when the unwanted-versions list removes a candidate. Cast versions with '-as [version]' so an unparseable version yields $null instead of a pipeline error, and wrap the matrix 'include' in @() so a single surviving entry still serializes as a JSON array. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Compile floor change (
get-bc-devtools): BCArtifact sources are excluded fromtfm-*-version-lowest, so the net10.0 build floor moves from the BC 27.5 artifact SDK 16.4.41.39421 to the NuGet SDK 18.0.41.39415. The netstandard2.1 and net8.0 floors are unchanged.Test-matrix version-floor filter (
setup-test-matrix): A new filter computes the per-TFM lowest VSIX/NuGet version and drops BCArtifact test legs whose SDK is below that floor. This removes theTest v16.4.41.39421(BC 27.5, net10.0) andTest v17.0.41.39411(BC 28.5, net10.0) legs, which would fail with CS1705 because the pre-built analyzer DLLs reference a higher SDK assembly version. The BC 29 preview legTest v18.0.41.62505stays (its SDK is above the floor) and continues to catch forward-compatibility breaks.RoslynTestKit 1.5.0: Bumped from 1.4.1. Its net10.0 lib references SDK 18.0.41.39415 (equal to the new net10.0 build floor), so it can never trip CS1705 on any kept test leg. Its net8.0 lib references 16.0.22.22232 and its netstandard2.1 lib references 12.0.13.24028, both at or below their respective floors.
Local DevTools pin (
.vscode/Setup-BCDevTools.ps1): the net10.0 pin moves from the beta 18.0.36.33307 to the stable NuGet 18.0.41.39415, matching the CI compile floor and the RoslynTestKit 1.5.0 reference. Re-run the script after pulling; with the old local SDK every cop test project fails to compile with CS1705.Rules doc: the design-decision row in
.claude/rules/get-bc-devtools.mdnow describes the real mechanism (BC sandbox artifacts ship net10.0 SDKs older than any marketplace or NuGet release) instead of the earlier v12.x claim, and records the accepted limitation and the RoslynTestKit SDK-version contract.Accepted limitation
An API gap between the net10.0 compile floor (18.0.41.39415) and the net10.0 SDK shipped inside BC 27.5 (16.4.41.39421) or BC 28.5 (17.0.41.39411) containers is no longer detected by CI. This is accepted because those sandbox SDKs are significantly older than any marketplace or NuGet net10.0 release, and the netstandard2.1/net8.0 build floors remain unchanged.
Note on main's CS1705 annotations
The CS1705 annotations visible on main's
Test v16.4.41.39421leg all name RoslynTestKit (its 1.4.1 net10.0 lib was built against SDK 17.0.34.45391). They were not caused by the build floor itself — bumping RoslynTestKit to 1.5.0 resolves that secondary source of CS1705.Test plan
Test v16.4.41.39421job in the matrixTest v17.0.41.39411job in the matrixTest v18.0.41.62505job is present (BC 29 preview leg kept)Total tests:lines (one per cop + Common)dotnet test ALCops.slnpasses with RoslynTestKit 1.5.0 after re-running.vscode/Setup-BCDevTools.ps1(1873 tests, 7 projects)🤖 Generated with Claude Code