-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Honor suppression on switch expression #57204
Merged
Merged
Conversation
This file contains 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
jcouv
added
Area-Compilers
New Language Feature - Pattern Matching
Pattern Matching
New Language Feature - Nullable Reference Types
Nullable Reference Types
labels
Oct 18, 2021
@RikkiGibson @cston @dotnet/roslyn-compiler Please review this PR for a tiny fix. Thanks |
cston
approved these changes
Oct 19, 2021
RikkiGibson
approved these changes
Oct 19, 2021
ghost
added this to the Next milestone
Oct 19, 2021
RikkiGibson
added a commit
that referenced
this pull request
Oct 19, 2021
* Addresses the first bullet point in #56843. Prior to this change, compiler diagnostic analyzer could only be run from the IDE for entire document span. This is primarily due to lack of an analyzer API that allows the analyzer to register a span-based semantic diagnostic callback. Though we can consider designing and adding such an analyzer API, it would be purely an IDE-only analyzer action, as analyzers are never executed for a span in batch compilation mode - this would make it difficult to justify adding such an API. With this PR, we add a workaround in the analyzer driver to allow executing compiler analyzer's semantic model action scoped to a filter span. This should speed up executing the compiler analyzer for lightbulb scenarios in the IDE, which are always scoped to current line span. Verified that both the compiler and IDE tests added with this PR fail prior to the product changes. **NOTE:** This change would not give us any perceivable improvement in non-async lightbulb scenario, as we are extremely likely to have at least one other analyzer that needs to run on the entire document. The performance improvement should be perceivable in async lightbulb scenario as the high priority code fixes bucket (add usings and merge conflict resolution) only run the compiler analyzer. * Update src/Compilers/Core/Portable/DiagnosticAnalyzer/DiagnosticAnalysisContext.cs * Add test and fix filtering by analysis scope. * Address further feedback * Add work item attribute to test * Remove GetAdjustedSpanForCompilerAnalyzerAsync workaround in the IDE * Unncessary usings * Revert "Unncessary usings" This reverts commit 510edb8. * Revert "Remove GetAdjustedSpanForCompilerAnalyzerAsync workaround in the IDE" This reverts commit 23e3310. * Update test to account for workaround in IDE DocumentAnalysisExecutor for #1557 * Address PR feedback * Fix VisualStudioActiveDocumentTracker to handle VSSELELEMID.SEID_WindowFrame Fixes #57203. Issue description has more details * Update src/Compilers/Core/Portable/DiagnosticAnalyzer/CompilationUnitCompletedEvent.cs * Apply arcade-powered source-build patches (#55823) * Don't include desktop artifacts that don't exist in source-build. Source-build doesn't have these artifacts available, even when we eventually will build desktop TFMs, because Roslyn is one of the first builds in source-build. Instead Roslyn is picking up reference packages that don't have the `lib` directory which is causing a build failure. This disables the attempt to grab these desktop artifacts so source-build just skips them instead. * Honor suppression on switch expression (#57204) * Merge pull request #57227 from dotnet/dev/rigibson/update-feature-status-2 Update Language Feature Status.md Co-authored-by: Manish Vasani <mavasani@microsoft.com> Co-authored-by: Chris Rummel <crummel@microsoft.com> Co-authored-by: Julien Couvreur <jcouv@users.noreply.github.com> Co-authored-by: Rikki Gibson <rigibson@microsoft.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area-Compilers
New Language Feature - Nullable Reference Types
Nullable Reference Types
New Language Feature - Pattern Matching
Pattern Matching
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.
Fixes #52143