Skip to content

Bump Actions past Node 20, add analyzer release tracking, fix CS8604#75

Open
NicholasMTElliott wants to merge 1 commit into
masterfrom
chore/bump-actions-and-analyzer-tracking
Open

Bump Actions past Node 20, add analyzer release tracking, fix CS8604#75
NicholasMTElliott wants to merge 1 commit into
masterfrom
chore/bump-actions-and-analyzer-tracking

Conversation

@NicholasMTElliott

Copy link
Copy Markdown
Contributor

Cleanup pass addressing the three warning categories the 8.0.0-preview.1 release run surfaced.

Changes

GitHub Actions bumps (fixes Node 20 deprecation)

The release run warned that `actions/checkout@v4` and `actions/setup-dotnet@v4` still run on Node 20 (deprecation enforcement starts June 2026). Bumping all Actions to the latest majors at once:

Action From To
actions/checkout v4 v6
actions/setup-dotnet v4 v5
actions/cache v4 v5
actions/upload-artifact v4 v7
docker/setup-buildx-action v3 v4
docker/build-push-action v5 v7

Analyzer release tracking

The release run fired `RS2008` for every generator diagnostic (JSG001–JSG008) asking them to be tracked. Added `AnalyzerReleases.Shipped.md` (all eight rules under `## Release 8.0.0`) and a stub `AnalyzerReleases.Unshipped.md` for future additions. Registered both as `` so the tracking analyzer reads them.

Side-effect: the tracker then fired `RS2003` ("rule not declared on any analyzer") for each rule, because `IIncrementalGenerator` has no `SupportedDiagnostics` surface. Suppressed at project scope with a comment explaining why.

CS8604 nullref fix

`ExpanderGenerator.cs:1065` computed `propertyTypeName = itemType?.ToDisplayString().Replace("?", "")` and passed it directly to `HashSet.Contains` — potentially-null argument. Applied the same `?? ""` coalesce already in use on the sibling function at line 1128.

Test plan

  • `dotnet build dotnet/Popcorn.SourceGenerator/Popcorn.SourceGenerator.csproj -c Release` — 0 warnings, 0 errors
  • CI `dotnet test` — 182 passing / 2 skipped maintained (local tests can't run — no .NET 8 runtime on this dev box, but CI installs it)
  • CI AOT endpoint verification — unchanged code path, should be identical result
  • CI benchmarks (relative-perf gate) — zero generator output change expected from the nullref fix

🤖 Generated with Claude Code

…CS8604

Chasing down the warnings the 8.0.0-preview.1 release run surfaced.

Actions (all now run on Node 24-compatible majors — fixes Node 20 deprecation):
- actions/checkout      v4 → v6
- actions/setup-dotnet  v4 → v5
- actions/cache         v4 → v5
- actions/upload-artifact v4 → v7
- docker/setup-buildx-action v3 → v4
- docker/build-push-action   v5 → v7

Analyzer release tracking (silences RS2008 "Enable analyzer release tracking
for rule JSG00x" at consumer builds):
- Add AnalyzerReleases.Shipped.md with JSG001–JSG008 entries under "Release 8.0.0"
- Add AnalyzerReleases.Unshipped.md as the rolling staging file for future rules
- Register both as <AdditionalFiles> so Microsoft.CodeAnalysis.Analyzers reads them
- Suppress RS2003 at project scope — fires because IIncrementalGenerator has no
  SupportedDiagnostics surface for the validator to match rule IDs against;
  safe to ignore for source generators

Code: fix CS8604 in ExpanderGenerator.cs:1065 — null-coalesce propertyTypeName
before HashSet<string>.Contains, matching the identical pattern already in use
on line 1128.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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