-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Move CodeStyle layer to Microsoft.CodeAnalysis 3.6.0 #43367
Conversation
…oft.CodeAnalysis in CodeStyle layer
forEachStatement.AttributeLists, | ||
#endif |
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.
nice. how are you finding this. are you just going to all CODE_STYLE locations and trying to remove them?
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.
Yep, exactly.
var diagnostic = Diagnostic.Create( | ||
Descriptor, | ||
GetDiagnosticLocation(switchBlock), | ||
properties: properties, | ||
additionalLocations: new[] { switchBlock.GetLocation() }); | ||
#pragma warning restore CS8620 |
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.
note certain i get what's going on. the local properties
is non-null... so why is it a problem to pass that along.
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.
So, the signature of Diagnostic.Create
was changed post 3.6.0 in https://github.com/dotnet/roslyn/pull/43023/files#diff-b3066efb626184718718c2d1642f1266R109, but the CodeStyle layer still does not reference the package version that has that change, hence the nullable diagnostic. Once we bump up the CodeStyle layer's MS.CA version to 3.7.0, we should be able to revert this suppression.
=> CreateResult(Compilation.GetSpecialType(type) | ||
#if !CODE_STYLE // TODO: remove this #if directive once the below public API is available in CodeStyle layer. | ||
.WithNullableAnnotation(nullableAnnotation) | ||
#endif |
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.
does these changes impact any tests anywhere?
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.
Good question - I did also scan through the conditional directives in tests, but let me double check if something specific to this feature had tests disabled in CodeStyle layer.
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.
You are indeed correct - good catch! I did miss unskipping tests that were failing due to this. Thanks!
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.
Auto-approval
Also remove bunch of conditional code that was added due to older version of Microsoft.CodeAnalysis in CodeStyle layer