Move CodeStyle layer to Microsoft.CodeAnalysis 3.6.0#43367
Conversation
…oft.CodeAnalysis in CodeStyle layer
| #if !CODE_STYLE // ForEachStatementSyntax.AttributeLists is not available in the version of Microsoft.CodeAnalysis used by CodeStyle layer | ||
| // https://github.com/dotnet/roslyn/issues/41462#issuecomment-595893953 tracks removing these conditional directives. | ||
| forEachStatement.AttributeLists, | ||
| #endif |
There was a problem hiding this comment.
nice. how are you finding this. are you just going to all CODE_STYLE locations and trying to remove them?
| GetDiagnosticLocation(switchBlock), | ||
| properties: properties, | ||
| additionalLocations: new[] { switchBlock.GetLocation() }); | ||
| #pragma warning restore CS8620 |
There was a problem hiding this comment.
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.
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.
does these changes impact any tests anywhere?
There was a problem hiding this comment.
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.
You are indeed correct - good catch! I did miss unskipping tests that were failing due to this. Thanks!
Also remove bunch of conditional code that was added due to older version of Microsoft.CodeAnalysis in CodeStyle layer