-
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
Update vssdk versions #27027
Update vssdk versions #27027
Conversation
<Rule Id="VSTHRD001" Action="None" /> <!-- don't enforce useage of JTF --> | ||
<Rule Id="VSTHRD002" Action="None" /> <!-- don't enforce useage of JTF --> | ||
<Rule Id="VSTHRD010" Action="None" /> <!-- don't enforce useage of JTF --> | ||
<Rule Id="VSTHRD103" Action="None" /> <!-- without flow analysis this rule has a lot of false positives and provides little value --> |
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.
❔ Was the problem here flow analysis, or lack of support for local functions?
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.
I can investigate the implementation further but fundamentally I have never seen VSTHRD103
catch a product bug. It uses string matching to try and determine if methods have async versions. You can look at the source here: https://github.com/Microsoft/vs-threading/blob/29d8c6ebb3758ccf1aa1488feb7083ae4744a267/src/Microsoft.VisualStudio.Threading.Analyzers/VSTHRD103UseAsyncOptionAnalyzer.cs
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.
It caught several bugs in GitExtensions during its conversion. Arguably one of the most helpful analyzers of the entire set there.
You indicated in this comment that the analyzer was reporting false positives. I have not seen this occur outside of local functions, and was wondering what you saw.
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.
Well in project system we implement or use methods that are named similar to other a sync methods. As a result we had hundreds of false positives about a synchronous API that is implementing and interface needing to call an async method when that is not the method contract, there was a separate async method that did call the async api. Turning this on for roslyn just seems to trigger on t.Result
calls though, so I have no problem turning it on.
<Rule Id="VSTHRD002" Action="None" /> <!-- don't enforce useage of JTF --> | ||
<Rule Id="VSTHRD010" Action="None" /> <!-- don't enforce useage of JTF --> | ||
<Rule Id="VSTHRD103" Action="None" /> <!-- without flow analysis this rule has a lot of false positives and provides little value --> | ||
<Rule Id="VSTHRD200" Action="None" /> <!-- don't enforce that names must end in 'Async' they are either tests or part of a public API --> |
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.
💭 Seems like this should eventually be moved to the non-shipping projects rule set, and suppressions added for anything that shipped in the public API.
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.
I feel that this should be enforced via naming styles in editorconfig that allows us to specify our exact rules instead of relying on an analyzer whose rules may not meet our needs.
📝 If there are any remaining cases of |
32b0351
to
b8e3eaf
Compare
@jmarolf when this PR will go in? I need this PR to check in BulkFileOperation change. tagging @jinujoseph |
@@ -56,6 +56,7 @@ | |||
<PackageReference Include="Microsoft.VisualStudio.ComponentModelHost" Version="$(MicrosoftVisualStudioComponentModelHostVersion)" /> | |||
<PackageReference Include="Microsoft.VisualStudio.Diagnostics.PerformanceProvider" Version="$(MicrosoftVisualStudioDiagnosticsPerformanceProviderVersion)" /> | |||
<PackageReference Include="Microsoft.VisualStudio.Shell.Design" Version="$(MicrosoftVisualStudioShellDesignVersion)" /> | |||
<PackageReference Include="Microsoft.VisualStudio.Threading" Version="$(MicrosoftVisualStudioThreadingVersion)" /> |
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.
I don't know much on this area but is there a reason why Microsoft.VisualStudio.Threading is explicitly added everywhere? I thought this PR is about updating vssdk version. not adding new dependency. is it because of some version conflicts?
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.
Indeed, @jmarolf can we split this out into two PRs?
@@ -106,6 +106,13 @@ | |||
<Rules AnalyzerId="Microsoft.NetCore.Analyzers" RuleNamespace="Microsoft.NetCore.Analyzers.ImmutableCollections"> | |||
<Rule Id="RS0012" Action="Warning" /> | |||
</Rules> | |||
<Rules AnalyzerId="Microsoft.VisualStudio.Threading.Analyzers" RuleNamespace="Microsoft.VisualStudio.Threading.Analyzers"> |
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 MS.VS.Threading.Analyzers package contains not only dll, but analyzers I guess? and that is why we are seeing all these new errors? since this PR is about updating vssdk, shouldn't all those new analyzers disabled by default (since it is new thing) and track that issue in another PR (finding out and decising which analyzer should be enabled and what is not?) so that this PR is not blocked by this?
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.
We've been trying to move to using PackageReferences-flow-across-ProjectReferences to our advantage, which means you should only be adding Microsoft.VisualStudio.Threading in as few places as possible. I'm also with @heejaechang that although the things it's flagging are perhaps worth flagging, I think we should split that out into a separate PR if possible.
@@ -43,6 +43,7 @@ | |||
<ItemGroup> | |||
<Reference Include="System.ComponentModel.Composition" /> | |||
<PackageReference Include="Microsoft.VisualStudio.Language.Intellisense" Version="$(MicrosoftVisualStudioLanguageIntellisenseVersion)" /> | |||
<PackageReference Include="Microsoft.VisualStudio.Threading" Version="$(MicrosoftVisualStudioThreadingVersion)" /> |
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.
We do want to rely on flowing through project references: assuming this is being added in EditorFeatures.csproj we shouldn't be adding this here.
@@ -38,6 +38,7 @@ | |||
<PackageReference Include="Microsoft.VisualStudio.Imaging" Version="$(MicrosoftVisualStudioImagingVersion)" /> | |||
<PackageReference Include="Microsoft.VisualStudio.ImageCatalog" Version="$(MicrosoftVisualStudioImageCatalogVersion)" /> | |||
<PackageReference Include="Microsoft.VisualStudio.Text.UI.Wpf" Version="$(MicrosoftVisualStudioTextUIWpfVersion)" /> | |||
<PackageReference Include="Microsoft.VisualStudio.Threading" Version="$(MicrosoftVisualStudioThreadingVersion)" /> |
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.
Don't add if it's coming from project references.
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.
I'll fix this up. I agree adding this is wrong
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.
@@ -29,6 +29,7 @@ | |||
<PackageReference Include="Microsoft.VisualStudio.Language.Intellisense" Version="$(MicrosoftVisualStudioLanguageIntellisenseVersion)" /> | |||
<PackageReference Include="Microsoft.VisualStudio.Imaging.Interop.14.0.DesignTime" Version="$(MicrosoftVisualStudioImagingInterop140DesignTimeVersion)" /> | |||
<PackageReference Include="Microsoft.VisualStudio.Text.UI" Version="$(MicrosoftVisualStudioTextUIVersion)" /> | |||
<PackageReference Include="Microsoft.VisualStudio.Threading" Version="$(MicrosoftVisualStudioThreadingVersion)" /> |
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.
Why adding this? Does this need nuspec updates as well?
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.
b8e3eaf
to
ce7fe82
Compare
1bd82dd
to
a36d881
Compare
@heejaechang just need this to be reviewed to unblock you |
a36d881
to
59957d8
Compare
cc @ivanbasov @dpoeschl for info and review |
6fbcf49
to
7a8c4a8
Compare
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.
There's some whitespace issues in TestObscuringTipManager & TestWaitIndicator (not sure how that happened), but it looks good. If this build is green, I wouldn't block on the formatting.
@heejaechang @ivanbasov @sharwell @jasonmalinowski -- Unit tests seem to be "passing" now. 😄 Please re-review. |
/cc: @jinujoseph |
} | ||
|
||
[WorkItem(20258, "https://github.com/dotnet/roslyn/issues/20258")] | ||
[WpfFact, Trait(Traits.Feature, Traits.Features.SplitStringLiteral)] | ||
public void TestBeforeEndQuote2() | ||
{ | ||
// Do not verifyUndo because of https://github.com/dotnet/roslyn/issues/28033 | ||
// When that issue is fixed, we can reenable verifyUndo | ||
// </summary> |
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.
💭 Have some stray "XML" elements
[Export(typeof(IObscuringTipManager))] | ||
internal class TestObscuringTipManager : IObscuringTipManager | ||
{ | ||
{ |
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.
💡 Doesn't seem necessary to add a bunch of trailing whitespace...
private readonly IWaitContext _waitContext; | ||
private readonly Microsoft.VisualStudio.Language.Intellisense.Utilities.IWaitContext _platformWaitContext = new UncancellableWaitContext(); | ||
|
||
{ |
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.
💡 Bunch of trailing whitespace additions here too
@@ -1204,7 +1206,7 @@ End Class | |||
End Function | |||
|
|||
Protected Overrides Function CreateTestWorkspace(code As String) As TestWorkspace | |||
Return TestWorkspace.CreateVisualBasic(code) | |||
Return TestWorkspace.CreateVisualBasic(code, exportProvider:=ExportProviderCache.GetOrCreateExportProviderFactory(TestExportProvider.EntireAssemblyCatalogWithCSharpAndVisualBasic.WithoutPartsOfType(GetType(CommitConnectionListener))).CreateExportProvider()) |
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.
@jasonmalinowski I thought you implemented the CommitConnectionListener
somewhere else?
Edit: It was 15b76be03f435880c7bda4d0d5f66379159583b6. Would be good to consolidate this PR and the other on approach. #Resolved
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.
@ivanbasov #Resolved
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.
CommitConnectionListener is an existing file. VSSDK attempts to call within some unit test comparing to the previous version. To provide a unity of those tests, it would be better to exclude this class.
In reply to: 196966852 [](ancestors = 196966852)
@dotnet-bot test ci please. |
Our unofficial packages don't correctly pull in some DesignTime dependencies (since they always create packages without any dependencies), but this caused issues once we moved to AsyncPackage since there's new PIA types being involved. For now, to sort this out just move back to the official packages which just do the right thing to start. As a part of this, I also move us to the official Microsoft.VisualStudio.SDK.EmbedInteropTypes package; we had our own clone of the code but it wasn't covering all the assemblies that we now need to embed as well.
build/Targets/Packages.props
Outdated
<MicrosoftVisualStudioEditorVersion>15.8.414-preview</MicrosoftVisualStudioEditorVersion> | ||
<MicrosoftVisualStudioGraphModelVersion>15.8.27812-alpha</MicrosoftVisualStudioGraphModelVersion> | ||
<MicrosoftVisualStudioImageCatalogVersion>15.8.27812-alpha</MicrosoftVisualStudioImageCatalogVersion> |
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.
The editor already carries along this as a dependency; in some cases they have a higher version than we did so we were just creating package downgrade issues. This removes them.
build/Targets/Packages.props
Outdated
<MicrosoftVisualStudioShellInteropVersion>7.10.6072</MicrosoftVisualStudioShellInteropVersion> | ||
<MicrosoftVisualStudioShellInterop100Version>10.0.30320</MicrosoftVisualStudioShellInterop100Version> | ||
<MicrosoftVisualStudioShellInterop110Version>11.0.61031</MicrosoftVisualStudioShellInterop110Version> | ||
<MicrosoftVisualStudioShellInterop121DesignTimeVersion>12.1.30328</MicrosoftVisualStudioShellInterop121DesignTimeVersion> | ||
<MicrosoftVisualStudioShellInterop140DesignTimeVersion>14.3.26929</MicrosoftVisualStudioShellInterop140DesignTimeVersion> | ||
<MicrosoftVisualStudioShellInterop150DesignTimeVersion>15.8.27812-alpha</MicrosoftVisualStudioShellInterop150DesignTimeVersion> | ||
<MicrosoftVisualStudioShellInterop153DesignTimeVersion>15.8.27812-alpha</MicrosoftVisualStudioShellInterop153DesignTimeVersion> |
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.
These are all dependencies of the main shell packages.
@ivanbasov @dpoeschl @jinujoseph @jmarolf So I had to merge this with the AsyncPackage changes, which created a bunch of issues. Our 15.8 self-created packages were missing dependencies that caused other build issues. I bit the bullet and fixed it so we're building cleanly again...but against Shell 15.7 packages. We are still using Editor 15.8 packages. My plan is to merge this PR, then upgrade back to the Shell 15.8 packages in a separate PR. |
@dotnet-bot test ci please. |
To deal with that, we write this target which finds that added package, removes it from | ||
the references list, then adds it back in again with the 'EmbedInteropTypes' flag properly | ||
set. --> | ||
<Target Name="MarkNuGetVisualStudioPackageWithEmbedInteropType" AfterTargets="ResolvePackageDependenciesForBuild"> |
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.
This commit moves us to the standard NuGet package for doing exclusions, which already does this for NuGet.VisualStudio.
On our 15.8 machines, there aren't release versions...because we haven't released it yet.
@dotnet-bot test ci please. |
1 similar comment
@dotnet-bot test ci please. |
Right now this is waiting for dotnet/core-eng#3920 to get completed; it seemed the integration test run against the older image was failing due to what looked like editor bugs. |
@dotnet-bot test ci please. |
@dotnet-bot test ci please. |
@dotnet test ci please. |
@dotnet-bot test ci please. |
1 similar comment
@dotnet-bot test ci please. |
Merging: the integration test failures on this are because we are also carrying along a change to the netci.groovy; the test ci please jobs were ran to verify everything works. |
Updates roslyn to use the latest editor nuget packages
Known issues that require follow-up