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

Enable execution of well known batch fixer from non-VS host #23492

Merged
merged 3 commits into from
Nov 30, 2017

Conversation

mavasani
Copy link
Contributor

@mavasani mavasani commented Nov 30, 2017

Well known batch fixer expects a MEF exported IDocumentTextDifferencingService, but we only have one in the EditorFeatures layer.
We already have a simple default differencing service in the workspace, this change exports it at the default service layer.
This change unblocks enabling FixAll testing in roslyn-analyzers repo: dotnet/roslyn-analyzers#1420

Ask Mode template

Customer scenario

Unable to write FixAll unit tests for fixers using well known batch fixer outside of Roslyn code base.

Bugs this fixes

dotnet/roslyn-analyzers#1420

Workarounds, if any

None, except for not using the well known batch fixer.

Risk

Low as we are just MEF exporting an existing service implementation.

Performance impact

Low

Is this a regression from a previous update?

No

Root cause analysis

We do not have any FixAll unit tests in roslyn-analyzers repo currently. We are planning to add them this sprint.

How was the bug found?

Attempting to implement dotnet/roslyn-analyzers#1420

Test documentation updated?

N/A

Well known batch fixer expects a MEF exported IDocumentTextDifferencingService, but we only have one in the EditorFeatures layer.
We already have a simple default differencing service in the workspace, this change exports it at the default service layer.
This change unblocks enabling FixAll testing in roslyn-analyzers repo: dotnet/roslyn-analyzers#1420
@sharwell
Copy link
Member

sharwell commented Nov 30, 2017

💭 Do you know why this was never a problem for StyleCop Analyzers testing?

Edit: Requirement is "new": #17497.

@mavasani
Copy link
Contributor Author

@sharwell StyleCop seems to be using a custom well known batch fixer, not Roslyn's well known batch fixer.

@sharwell
Copy link
Member

@mavasani The custom batch fixer is just an old build of the Roslyn batch fixer with the determinism bug fixed. 😄

@mavasani
Copy link
Contributor Author

@heejaechang
Copy link
Contributor

@mavasani you probably want to remove new Default... in http://source.roslyn.io/#Microsoft.CodeAnalysis.Workspaces/LinkedFileDiffMerging/LinkedFileDiffMergingSession.cs,89

since we have default service now.

@mavasani
Copy link
Contributor Author

@heejaechang I tried to remove that in the previous commit, but seems it is needed for test path with custom export provider. See the failure: https://ci.dot.net/job/dotnet_roslyn/job/master/job/windows_debug_unit32_prtest/10901/testReport/junit/Microsoft.VisualStudio.LanguageServices.UnitTests.Preview/PreviewChangesTests/TestLinkedFileChangesMergedAndDeduplicated/. I will revert my last commit c24e51e

@mavasani
Copy link
Contributor Author

@Pilchie @jinujoseph for ask mode approval.

@Pilchie
Copy link
Member

Pilchie commented Nov 30, 2017

@mavasani I need an ask mode template.

@mavasani
Copy link
Contributor Author

@Pilchie Sorry, added now.

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.

4 participants