Skip to content
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

Merged
6 commits merged into from
Apr 17, 2020

Conversation

mavasani
Copy link
Contributor

Also remove bunch of conditional code that was added due to older version of Microsoft.CodeAnalysis in CodeStyle layer

forEachStatement.AttributeLists,
#endif
Copy link
Member

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?

Copy link
Contributor Author

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
Copy link
Member

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.

Copy link
Contributor Author

@mavasani mavasani Apr 15, 2020

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
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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!

@mavasani mavasani marked this pull request as ready for review April 15, 2020 19:23
@mavasani mavasani requested review from a team as code owners April 15, 2020 19:23
@mavasani mavasani mentioned this pull request Apr 15, 2020
23 tasks
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approval

@ghost ghost merged commit ef734e1 into dotnet:master Apr 17, 2020
@mavasani mavasani deleted the MoveCodeStyleLayerAhead branch April 17, 2020 14:14
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants