Skip to content

build: Microsoft.CodeAnalysis.NetAnalyzers 11.0.100 (#829, step 1) - #838

Merged
Blind-Striker merged 1 commit into
masterfrom
build/829-netanalyzers-11
Nov 14, 2026
Merged

Blind-Striker merged 1 commit into
masterfrom
build/829-netanalyzers-11

Conversation

@Blind-Striker

Copy link
Copy Markdown
Collaborator

Microsoft.CodeAnalysis.NetAnalyzers moves from 10.0.402 to 11.0.100, the GA analyzer package for the pinned .NET SDK 11.0.100. This is step 1 of #829. AnalysisLevel (10.0) and LangVersion are unchanged; those are later steps.

Refs #829

Why

The 10.0.x package crashes on one valid test shape. This is the expiry row that #758 waits for. On OpenCode.Sdk.Tests, the analyzer DoNotPassDisposablesIntoUnawaitedTasksAnalyzer (CA2025) throws:

CSC : warning AD0001: Analyzer 'Microsoft.CodeQuality.Analyzers.QualityGuidelines.DoNotPassDisposablesIntoUnawaitedTasksAnalyzer' threw an exception of type 'System.NullReferenceException' ...

It throws on every TFM. The reduced trigger is one line in TerminalSocketCoreTests.SendAsync_Should_Expire_A_Queued_Call_Without_Closing_The_Socket:

// as committed
var first = core.SendAsync(static payload => payload, new ArraySegment<byte>([0x61]), WebSocketMessageType.Text, holdAfterSend, CancellationToken.None);
// the shape that crashes the 10.0.x analyzer
var first = DedicatedThread.Run(() => core.SendAsync(static payload => payload, new ArraySegment<byte>([0x61]), WebSocketMessageType.Text, holdAfterSend, CancellationToken.None)).Unwrap();

Measured on this branch's head (Release, --no-incremental, warnings not escalated, so every diagnostic is counted; the trigger was applied, then reverted):

NetAnalyzers AD0001 lines with the trigger Other diagnostics
10.0.402 (the current pin) 6, the crash on each TFM none
11.0.100 (this PR) 0 none

An earlier probe also found 10.0.404 crashing the same way, so only 11.0.100 fixes it. Without the trigger, the whole solution has no diagnostic at either version (AnalysisLevel 10.0). So this PR adds no new rule finding and no suppression. The expiry row itself stays with #758.

The analyzer is PrivateAssets=all, so the packages and their consumers see no difference, and there is no CHANGELOG entry.

Verification

  • The full Windows gate at 0de0be16, SDK 11.0.100: GATE PASS on both parts. Static: build 0 warnings, 0 errors; slopwatch, format and the clone gate clean. Tests: 15,521 of 15,521; the service-election leg 27 of 27.
  • Resolved version: project.assets.json resolves Microsoft.CodeAnalysis.NetAnalyzers/11.0.100, in both src/OpenCode.Sdk and tests/OpenCode.Sdk.Tests.
  • CI on all three operating systems: this PR's run.

The GA analyzer package for the .NET 11 SDK. Measured on the GA SDK with
AnalysisLevel 10: no new diagnostic across the solution, and the AD0001 crash
of DoNotPassDisposablesIntoUnawaitedTasksAnalyzer (CA2025), which 10.0.402
and 10.0.404 both hit, is gone. That crash blocks the expiry row in #758.
AnalysisLevel and LangVersion are unchanged; they are later steps of #829.
@Blind-Striker Blind-Striker added this to the 1.1.0 milestone Nov 14, 2026
@Blind-Striker
Blind-Striker added this pull request to the merge queue Nov 14, 2026
Merged via the queue into master with commit e8b3164 Nov 14, 2026
17 checks passed
@Blind-Striker
Blind-Striker deleted the build/829-netanalyzers-11 branch November 14, 2026 12:40
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