Skip to content

fix(ci): exclude BCArtifact from lowest-version TFM outputs - #554

Merged
Arthurvdv merged 6 commits into
mainfrom
fix/exclude-bcartifact-from-lowest-tfm
Sep 19, 2026
Merged

Arthurvdv merged 6 commits into
mainfrom
fix/exclude-bcartifact-from-lowest-tfm

Conversation

@Arthurvdv

@Arthurvdv Arthurvdv commented Sep 19, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Compile floor change (get-bc-devtools): BCArtifact sources are excluded from tfm-*-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 the Test v16.4.41.39421 (BC 27.5, net10.0) and Test 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 leg Test v18.0.41.62505 stays (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.md now 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.39421 leg 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

  • No Test v16.4.41.39421 job in the matrix
  • No Test v17.0.41.39411 job in the matrix
  • Test v18.0.41.62505 job is present (BC 29 preview leg kept)
  • Zero CS1705 errors or annotations in any job
  • Every test job logs seven Total tests: lines (one per cop + Common)
  • Local dotnet test ALCops.sln passes with RoslynTestKit 1.5.0 after re-running .vscode/Setup-BCDevTools.ps1 (1873 tests, 7 projects)
  • Test Report check is green

🤖 Generated with Claude Code

Arthurvdv and others added 6 commits September 19, 2026 12:13
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>
@Arthurvdv
Arthurvdv merged commit 3adc03c into main Sep 19, 2026
37 checks passed
@Arthurvdv
Arthurvdv deleted the fix/exclude-bcartifact-from-lowest-tfm branch September 19, 2026 14:05
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