-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Have RoslynAnalyzers reference shared utilities/extensions from Roslyn layer itself. #79030
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
Conversation
Fix more Update versions Fix more In progress Flip Fix Fix remove wrapper Fix Fix in progress Fix DeclarationKind layering fix One building In progress Breaking out refactoring helpers into core api vs service VB side In progress Move type workaround Update src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/CSharpCompilerExtensions.projitems Fix SubText ctor parameter verification. (dotnet#78989) * Fix SubText ctor parameter verification. This ctor currently throws given a zero length span at the end (and only the end) of the subtext. This evidently became far more prevalent with this (fairly) recent change to optimize newline information in our sourcetext classes. (dotnet#74728) It doesn't make to allow zero length spans at all locations but at the end of the subtext, so the fix is just to allow construction in that case too. Big props to Manish Vasani for providing a very actionable repro for this. Fixes dotnet#78985. Note there is a potentially related issue outlined in dotnet#76225 that looks attributable to the PR above too. It possible that this addresses that issue too, but I'm not completely convinced. Extensions: bind unconditionally of LangVer (dotnet#78947) Extensions: use specific tracking issues for different areas (second pass) (dotnet#78971) Fix nullable analysis involving extensions and collection expressions (dotnet#78926) Update src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/CSharpCompilerExtensions.projitems in progrss Update src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/CompilerExtensions.projitems Update src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/VisualBasicCompilerExtensions.projitems extensions Fix RootNamespace Fixes Fixes IN progress in progress
| |Enabled|True| | ||
| |Severity|Warning| | ||
| |CodeFix|True| | ||
| |CodeFix|False| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very strange. i don't know how this doc generator works, or why it now thinks there is no codefix for some of these analyzers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JoeRobich Do you have any idea what might be causing this? i'm not even sure how to get this to run locally :'(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spoke offline and I suggested it might be the transitive pinning in conjunction with the source-build specific PackageVersion removal in the GenerateDocumentationAndConfigFiles tool project. This led us to add a Directory.Packages.props to disable pinning. It apparently isn't the entire fix, but did resolve one of the reported errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding Microsoft.BCL.AsyncInterfaces dependency to the tool project was the other necessary change to fix this issue.
src/RoslynAnalyzers/Utilities/Compiler/Analyzer.Utilities.projitems
Outdated
Show resolved
Hide resolved
| catch | ||
| catch (Exception ex) | ||
| { | ||
| Console.WriteLine($"Error processing analyzer file reference: {ex.Message}\r\n{ex}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we keep this, it would be useful to include Path.GetFileName(analyzerFileReference.FullPath) in the message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sgtm.
…items Co-authored-by: Joey Robichaud <joseph.robichaud@microsoft.com>

Have RoslynAnalyzers reference shared utilities/extensions from Roslyn layer itself.