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

Stop using CPS JTF #4288

Merged
merged 2 commits into from
Oct 1, 2021
Merged

Stop using CPS JTF #4288

merged 2 commits into from
Oct 1, 2021

Conversation

zivkan
Copy link
Member

@zivkan zivkan commented Sep 29, 2021

Bug

Fixes: NuGet/Home#8317
Fixes: NuGet/Home#8414

Regression? no

Description

Remove all references to IProjectServiceAccessor and NuGetUIThreadHelper.SetJoinableTaskFactoryFromService.

Using IProjectServiceAccessor was the reason that NuGet's options screen didn't work in a minimal VS install. The options window caused NuGetPackage to be loaded, and our package load initializes our MEF objects, and one (or more) of the MEF objects tried to use IProjectServiceAccessor, which has no exports since CPS isn't installed without any workloads installed. By removing the need to get CPS's JTF, we no longer have dependencies on unavailable components when loading the options window.

PR Checklist

  • PR has a meaningful title

  • PR has a linked issue.

  • Described changes

  • Tests

    • Automated tests added
    • OR
    • Test exception
      • This is a VS service, so "external" to NuGet. Our Visual Studio E2E and Apex tests validate running in VS, so there's already some kind of test coverage.
    • OR
    • N/A
  • Documentation

    • Documentation PR or issue filled
    • OR
    • N/A

@zivkan zivkan requested a review from a team as a code owner September 29, 2021 04:41
@@ -69,13 +64,6 @@ public sealed class NuGetProjectFactory

await _threadingService.JoinableTaskFactory.SwitchToMainThreadAsync();

if (vsProjectAdapter.VsHierarchy != null &&
Copy link
Member

Choose a reason for hiding this comment

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

This is very satisfying! :)
It registers on every damn initialization UI delay.

@zivkan zivkan merged commit 0d7dbcf into dev Oct 1, 2021
@zivkan zivkan deleted the dev-zivkan-do-not-use-cps-jtf branch October 1, 2021 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Minimal VS install has broken NuGet UI NuGet no longer uses CPS's JTF
4 participants