Build the solution with no warnings at all - #40
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A cold build of
mainreports 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.CS0618— parameterlessRedisBuilderis obsoleteRedisStateProviderTests.cs:34xUnit2013—Assert.Equalfor a collection sizeHardeningTests.cs:22xUnit2013— sameDiagnosticsTests.cs:181xUnit1051—Task.Delaywithout the test's tokenUptimeTests.cs:334Three diagnostics × 2 target frameworks + the obsolete constructor × 2 = 8.
Testcontainers deprecated
new RedisBuilder().WithImage(...)in favour ofnew RedisBuilder(image)— which is where the image belonged anyway.I had reverted the two
xUnit2013and thexUnit1051fixes 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
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.