Guard against updates with no type changes#56443
Conversation
| */ | ||
| "; | ||
|
|
||
| var generator = new TestSourceGenerator() { ExecuteImpl = GenerateSource }; |
There was a problem hiding this comment.
Is the usage of code generators necessary to repro?
There was a problem hiding this comment.
It was the only case in our existing battery of tests that resulted in an empty updated types list, but there could be other repros, I didn't look too hard.
There was a problem hiding this comment.
Wouldn't just adding the comment directly (w/o source generator) do?
There was a problem hiding this comment.
Yes, it does. I could have sworn I tried it, but maybe I had the comment in the wrong place ¯\_(ツ)_/¯
| var delta = updates.Updates.Single(); | ||
| Assert.Empty(delta.UpdatedTypes); | ||
|
|
||
| EndDebuggingSession(debuggingSession); |
There was a problem hiding this comment.
@davidwengier This line throws an System.InvalidOperationException : Pending update has not been committed or discarded. in the current main branch. See the CI tags in the readme https://github.com/dotnet/roslyn#desktop-unit-tests
The failure is reproducible locally on my machine. A detailed log can be found here https://dev.azure.com/dnceng/public/_build/results?buildId=1377343&view=ms.vss-test-web.build-test-results-tab&runId=40162926&resultId=210614&paneView=debug
Fixes #56431