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

Revert "Avoid hitting the UI thread when retrieving MEF specific services" #4242

Merged
merged 1 commit into from
Sep 2, 2021

Conversation

kartheekp-ms
Copy link
Contributor

@kartheekp-ms kartheekp-ms commented Sep 2, 2021

…ices (#4229)

This reverts commits 38f679c that is not required for Preview 4.

Bug

Fixes: https://github.com/NuGet/Client.Engineering/issues/1122

Regression? Last working version:

Description

VS insertion PR for preview 4 is failing because of null reference exception thrown by below method. VS Pull request link is specified in the linked issue.

private static string[] GetEnabledPackageSources(ISourceRepositoryProvider sourceRepositoryProvider)
{
var enabledSources = sourceRepositoryProvider
.GetRepositories()
.Where(r => r.PackageSource.IsEnabled)
.ToArray();
var packageSources = new List<string>();
if (enabledSources.Length > 1)
{
packageSources.Add(AggregateSourceName);
}
packageSources.AddRange(
enabledSources.Select(r => r.PackageSource.Name));
return packageSources.ToArray();
}

I installed VS build from the PR and created ASP.NET C# MVC Application (Empty template) project, I noticed a popup window with null reference exception only for the first time.

It looks like a change was made to PowerShellHost.cs file in #4229 PR which was merged into dev 2 days ago. I am guessing this change is causing the test to fail in the VS PR.

https://github.com/NuGet/NuGet.Client/pull/4229/files#diff-6a61a5a4dcb437c8fb19e6189ca397aa926ae66e4442acbe9aab2e9ca896bb21R109-R113

PR Checklist

  • PR has a meaningful title

  • PR has a linked issue.

  • Described changes

  • Tests

    • N/A
  • Documentation

    • N/A

@kartheekp-ms kartheekp-ms requested a review from a team as a code owner September 2, 2021 21:22
@kartheekp-ms kartheekp-ms changed the title Revert "Avoid hitting the UI thread when retrieving MEF specific serv… Revert "Avoid hitting the UI thread when retrieving MEF specific services" and other 2 commits Sep 2, 2021
@kartheekp-ms kartheekp-ms force-pushed the dev-kartheekp-ms-revert-pr-4229 branch from 9bc1028 to 5c6d0ef Compare September 2, 2021 23:51
@kartheekp-ms kartheekp-ms changed the title Revert "Avoid hitting the UI thread when retrieving MEF specific services" and other 2 commits Revert "Avoid hitting the UI thread when retrieving MEF specific services" Sep 2, 2021
@kartheekp-ms
Copy link
Contributor Author

@aortiz-msft for approval.

@aortiz-msft aortiz-msft merged commit fcb4b9a into dev Sep 2, 2021
@aortiz-msft aortiz-msft deleted the dev-kartheekp-ms-revert-pr-4229 branch September 2, 2021 23:58
nkolev92 added a commit that referenced this pull request Sep 3, 2021
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.

2 participants