dotnet / dotnet/winforms

Verify cancellation behavior of `EnumValidationGenerator`

Open
#13,565 0 comments 0 reactions 0 assignees View on GitHub
needs-area-label
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
20h 23m
Merged PRs (30d)
103

Description

https://github.com/dotnet/winforms/blob/f2060dfa61556829461a5175b05120ae34a584ed/src/System.Windows.Forms.PrivateSourceGenerators/src/System/Windows/Forms/SourceGenerators/EnumValidationGenerator.cs#L211-L214

This feels suspicious. I think it may happen that the compiler caches this step, causing incomplete result to be cached and re-used. This should use `ThrowIfCancellationRequested`.

(Putting aside that the generator is likely to have severe perf issues)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.