Background
src/Service.Tests/Azure.DataApiBuilder.Service.Tests.csproj declares
<Nullable>disable</Nullable>, but a handful of test files use C# nullable
reference type syntax (e.g. string? result, string? issuer). The compiler
emits CS8632 ("The annotation for nullable reference types should only be
used in code within a '#nullable' annotations context") for every such usage.
Known files (non-exhaustive)
- src/Service.Tests/Configuration/RuntimeConfigLoaderTests.cs (~3 warnings)
- src/Service.Tests/UnitTests/RequestParserUnitTests.cs (~4 warnings)
- src/Service.Tests/UnitTests/SqlQueryExecutorUnitTests.cs (~4 warnings)
A full sweep is needed; the list above came from incidental observation, not
a project-wide audit.
Why it's worth fixing
- The warnings are noise in CI build logs and can mask real issues.
- They are inconsistent with the rest of the repo, which builds clean.
- Some build configurations (e.g. Docker, certain Release flows) already
enable TreatWarningsAsErrors=True. If Service.Tests ever inherits
that setting, these become hard build breaks.
Background
src/Service.Tests/Azure.DataApiBuilder.Service.Tests.csprojdeclares<Nullable>disable</Nullable>, but a handful of test files use C# nullablereference type syntax (e.g.
string? result,string? issuer). The compileremits CS8632 ("The annotation for nullable reference types should only be
used in code within a '#nullable' annotations context") for every such usage.
Known files (non-exhaustive)
A full sweep is needed; the list above came from incidental observation, not
a project-wide audit.
Why it's worth fixing
enable
TreatWarningsAsErrors=True. IfService.Testsever inheritsthat setting, these become hard build breaks.