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

Update Roslyn and use new step tracking API in incremental tests. #63978

Merged
merged 18 commits into from
Mar 3, 2022

Conversation

jkoritzinsky
Copy link
Member

@jkoritzinsky jkoritzinsky commented Jan 19, 2022

Update Roslyn and update the DllImportGenerator incremental generation tests to use the Incremental Step Tracking API.

Blocked on dotnet/roslyn#58935

… of Roslyn so we can update our Roslyn version for generators that will either ship in .NET 7 or are for internal use only without accidentally breaking back-compat VS support.
…n tests to use the Incremental Step Tracking API.

Blocked on dotnet/roslyn#58937
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@ghost ghost assigned jkoritzinsky Jan 19, 2022
@jkoritzinsky jkoritzinsky added area-Infrastructure blocked Issue/PR is blocked on something - see comments labels Jan 19, 2022
@ghost
Copy link

ghost commented Jan 19, 2022

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

Issue Details

Update Roslyn and update the DllImportGenerator incremental generation tests to use the Incremental Step Tracking API.

Blocked on dotnet/roslyn#58935

Author: jkoritzinsky
Assignees: jkoritzinsky
Labels:

blocked, area-Infrastructure

Milestone: -

…eration tests. Make the remaining Select callbacks static now that we aren't using any state on the generator object.
@jkoritzinsky jkoritzinsky removed the blocked Issue/PR is blocked on something - see comments label Jan 21, 2022
@jkoritzinsky jkoritzinsky marked this pull request as ready for review January 21, 2022 00:44
@jkoritzinsky
Copy link
Member Author

cc: @dotnet/runtime-infrastructure @stephentoub for the infrastructure changes and updates to sources around new Roslyn warnings.

cc: @dotnet/interop-contrib for review on the updates to DllImportGenerator and the improvements to the incrementality tests that use the new API and put us back on the "Roslyn best practices" track.

<MicrosoftCodeAnalysisNetAnalyzersVersion>7.0.0-preview1.22067.1</MicrosoftCodeAnalysisNetAnalyzersVersion>
<MicrosoftCodeAnalysisVersion>4.2.0-1.22070.6</MicrosoftCodeAnalysisVersion>
<MicrosoftNetCompilersToolsetVersion>4.2.0-1.22070.6</MicrosoftNetCompilersToolsetVersion>
Copy link
Member

Choose a reason for hiding this comment

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

What Visual Studio does this require?

Copy link
Member Author

Choose a reason for hiding this comment

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

IIRC, using the toolset package doesn't require a given VS version to match, but I don't remember the specifics.

eng/Versions.props Outdated Show resolved Hide resolved
eng/Versions.props Outdated Show resolved Hide resolved
src/libraries/Common/src/Interop/OSX/Interop.Libraries.cs Outdated Show resolved Hide resolved
src/libraries/Common/src/Interop/Unix/Interop.Libraries.cs Outdated Show resolved Hide resolved
@jkoritzinsky
Copy link
Member Author

NullabilityInfoContext failures are known. The Wasm tests failed with a NuGet error due to a network blip. Merging this in.

@jkoritzinsky jkoritzinsky merged commit 1e529bc into dotnet:main Mar 3, 2022
@jkoritzinsky jkoritzinsky deleted the update-roslyn branch March 3, 2022 01:07
<MicrosoftCodeAnalysisAnalyzersVersion>3.3.3</MicrosoftCodeAnalysisAnalyzersVersion>
<MicrosoftCodeAnalysisCSharpCodeStyleVersion>4.2.0-2.22128.1</MicrosoftCodeAnalysisCSharpCodeStyleVersion>
<MicrosoftCodeAnalysisCSharpWorkspacesVersion>4.2.0-2.22128.1</MicrosoftCodeAnalysisCSharpWorkspacesVersion>
<MicrosoftCodeAnalysisCSharpVersion>4.2.0-2.22128.1</MicrosoftCodeAnalysisCSharpVersion>
Copy link
Member

Choose a reason for hiding this comment

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

@eerhardt does this need to be a change that makes our OOB source generators cross-compile? What's going to happen when someone now installs the JSON or logging source generator package on a 6.0 GA SDK/Visual Studio 2022?

Copy link
Member Author

Choose a reason for hiding this comment

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

I specifically updated our in-box analyzers that we have already shipped to be pinned to the RTM versions of the Roslyn API surface they built against when they shipped. The JSON and Logging generators are pinned to 3.11 and 4.0. They don't build against these new versions.

Copy link
Member

Choose a reason for hiding this comment

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

Can we guarantee that all net7.0 consumers will have this version of roslyn? I know we have some surprising combinations that are sometimes supported due to the roslyn shipping in VS at a different cadence.

Copy link
Member Author

Choose a reason for hiding this comment

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

By the time this commit ships, we will have at least this version of Roslyn in the product. By the time .NET 7 ships, all places where .NET 7 is supported will also have a version of Roslyn that is at least this version (likely the release version of 4.2.0)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants