Skip to content

Build the solution with no warnings at all - #40

Merged
ivanvyd merged 1 commit into
mainfrom
fix/redis-builder-obsolete
Jul 29, 2026
Merged

Build the solution with no warnings at all#40
ivanvyd merged 1 commit into
mainfrom
fix/redis-builder-obsolete

Conversation

@ivanvyd

@ivanvyd ivanvyd commented Jul 29, 2026

Copy link
Copy Markdown
Owner

A cold build of main reports 8 warnings. I had been reading counts off incremental builds, where analyzer and obsolete diagnostics don't reappear — so I called the solution clean several times today when it wasn't. That's the actual mistake here.

warning where mine from
CS0618 — parameterless RedisBuilder is obsolete RedisStateProviderTests.cs:34 #39
xUnit2013Assert.Equal for a collection size HardeningTests.cs:22 #32
xUnit2013 — same DiagnosticsTests.cs:181 earlier
xUnit1051Task.Delay without the test's token UptimeTests.cs:334 earlier

Three diagnostics × 2 target frameworks + the obsolete constructor × 2 = 8.

Testcontainers deprecated new RedisBuilder().WithImage(...) in favour of new RedisBuilder(image) — which is where the image belonged anyway.

I had reverted the two xUnit2013 and the xUnit1051 fixes once before, deliberately, to keep an unrelated diff reviewable. That was right at the time and left them as the last thing between the build and a real zero, so they go here.

Verification

0 Warning(s)
0 Error(s)

on a cleaned build, plus 463 tests green on net8.0 and net10.0. No behaviour changes — the point is that the next warning to appear will be visible instead of arriving in a crowd.

A cold build reported eight. I had been reading warning counts off incremental
builds, where analyzer and obsolete diagnostics do not reappear, so I called
the solution clean when it was not.

Two were mine from the Redis provider: Testcontainers has deprecated the
parameterless RedisBuilder in favour of the one that takes the image, which is
where the image belonged anyway rather than in a separate WithImage call.

The other six are three diagnostics, each counted once per target framework,
and all three are also mine from earlier in this run: two Assert.Equal calls
checking a collection's size where Assert.Single says it, and a Task.Delay
without the test's cancellation token. I had reverted exactly these once
before, to keep an unrelated diff focused, which was right then and left them
as the last thing standing between the build and a real zero.

Nothing here changes behaviour. It means the next warning to appear will be
visible instead of arriving in a crowd.
@ivanvyd
ivanvyd merged commit 23b9267 into main Jul 29, 2026
8 checks passed
@ivanvyd
ivanvyd deleted the fix/redis-builder-obsolete branch July 30, 2026 02:16
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