Skip to content

Silence CS8632 nullable annotation spam project-wide - #267

Merged
tehtelev merged 1 commit into
indevfrom
fix/silence-cs8632-nullable-annotation-spam
Aug 19, 2026
Merged

Silence CS8632 nullable annotation spam project-wide#267
tehtelev merged 1 commit into
indevfrom
fix/silence-cs8632-nullable-annotation-spam

Conversation

@Zaldaryon

Copy link
Copy Markdown
Contributor

Summary

A clean build of VintageStory.slnx produces 1565 warnings, and 2796 of the raw warning lines are CS8632 ("nullable annotation used outside a #nullable context"). All of it comes from vanilla files the decompiler emits with the original assembly's own nullable annotations intact, not from Stratum's own patches. A real compile error sitting among that many warnings is easy to miss, which is exactly what #263 reports and screenshots: a genuine CS1503 buried in a wall of CS8632.

Fix: add CS8632 to Directory.Build.props's existing NoWarn list, the same mechanism already silencing eight other decompiler-inherent codes (CS1591, CS1572, CS1573, CS1570, CS0649, CS0414, CS0169, CS0162, CS0168). NoWarn only affects warnings; a real compile error still stops the build and prints regardless of this list, so nothing about error visibility changes, only the noise around it.

Type

  • Bug fix
  • Performance
  • New feature
  • Refactor or cleanup
  • Docs or build

Checklist

  • .\scripts\extract-patches.ps1 ran clean. Not applicable: no vanilla file touched, only the shared Directory.Build.props MSBuild config, so there's nothing for extract-patches to regenerate.
  • dotnet build VintageStory.slnx -c Release is green.
  • Every vanilla edit has a // Stratum marker. Not applicable, same reason: no vanilla file edited.
  • No vanilla source committed.
  • Tested on a real server start, not just compilation.

Performance numbers

Not a performance change, but the fix is a number, so here it is anyway. Clean rebuild (--no-incremental) before and after, same tree:

Before After
Total warnings 1565 167
CS8632 2796 raw lines 0
Errors 0 0

Smoke test passes both before and after: server reaches RunGame, no fatal errors.

Related issues

Fixes #263

A clean build produces 1565 warnings, 2796 of the raw lines CS8632
("nullable annotation used outside a #nullable context"), all from
vanilla files the decompiler emits with the original assembly's own
nullable annotations intact. None of them come from Stratum's own
patches: contributors already avoid adding new nullable annotations
to files without #nullable enable, per the style rules. A real
compile error sitting among that many warnings is easy to miss, which
is exactly what #263 reports and screenshots.

Adds CS8632 to Directory.Build.props's existing NoWarn list, the same
mechanism already silencing eight other decompiler-inherent codes
(CS1591, CS1572, CS1573, CS1570, CS0649, CS0414, CS0169, CS0162,
CS0168). NoWarn only affects warnings; a real compile error still
stops the build and prints regardless of this list.

Verified with a clean rebuild before and after: 1565 warnings down to
167, zero CS8632 remaining, 0 errors both times. Smoke test passes,
server reaches RunGame with no fatal errors.

Fixes #263

@tehtelev tehtelev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is much better.

@tehtelev
tehtelev merged commit 28d8194 into indev Aug 19, 2026
2 checks passed
@tehtelev tehtelev mentioned this pull request Aug 19, 2026
1 task
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.

2 participants