dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
18.83k stars 4k forks source link

Remove VS myget feeds from NuGet.config #43242

Open tmat opened 4 years ago

tmat commented 4 years ago

It seems we will be able to remove the following feeds once we upgrade some VS dependencies to 16.6.45:

    <add key="vs-editor" value="https://myget.org/F/vs-editor/api/v3/index.json" />
    <add key="experimental-vs-packages" value="https://dotnet.myget.org/F/experimental-vs-packages/api/v3/index.json" />

All VS packages should be available from

    <add key="vssdk" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/vssdk/nuget/v3/index.json" />
    <add key="vs-impl" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/vs-impl/nuget/v3/index.json" />
jasonmalinowski commented 4 years ago

I'm currently upgrading some packages and am deleting these at the same time since it seems to be working.

tmat commented 4 years ago

@jasonmalinowski Any progress?

jasonmalinowski commented 4 years ago

Oh right and then we discovered some of the packages in the feed were broken. @tmat feel free to also do a cleanup here; I might still be going ahead with reflection hackery for awhile longer.

jasonmalinowski commented 4 years ago

Alright this turns out to be an ugly mess. This feed:

<add key="experimental-vs-packages" value="https://dotnet.myget.org/F/experimental-vs-packages/api/v3/index.json" />

Is needed, despite no actual packages may be chosen from it. We depend on Microsoft.VisualStudio.LanguageServer.Protocol which requires 16.0.201 of Microsoft.VisualStudio.Text.Data. That specific version exists only in that feed, and doesn't exist anywhere else that I can find. Even though we are specifying we want to use a higher version, NuGet still insists it must be able to find that older version in a feed, or else:

error NU1603: Microsoft.VisualStudio.LanguageServer.Protocol.Extensions 16.7.43 depends on Microsoft.VisualStudio.Text.Data (>= 16.0.201) but Microsoft.VisualStudio.Text.Data 16.0.201 was not found. An approximate best match of Microsoft.VisualStudio.Text.Data 16.0.428 was resolved.

I can't fathom why NuGet is complaining here.

jasonmalinowski commented 4 years ago

Alright I understand why it's complaining: we weren't specifying in that project a direct reference to Microsoft.VisualStudio.Text.Data, but rather a direct reference to Microsoft.VisualStudio.Text.UI which depends on the same higher version of Microsoft.VisualStudio.Text.Data. It seems the resolution algorithm then independently changes both dependency chains and hits this even though no package in the range would ever come out in the end.

jasonmalinowski commented 4 years ago

It does turn out that that feed also seems to have some Microsoft.VisualStudio.LiveShare.LanguageServices.Guest packages which don't exist elsewhere.

tmat commented 4 years ago

@nkolev92 Could you please take a look at the NuGet issue?

tmat commented 4 years ago

@jasonmalinowski Are you following up with LiveShare team to publish the package?

jasonmalinowski commented 4 years ago

At this point I've spent far more time on this than I should have, and I don't even understand the background of these feeds at this point. @dibarbet do you know more?

tmat commented 4 years ago

@jasonmalinowski This is actually useful work. We are being asked to remove dependencies on MyGet.

dibarbet commented 4 years ago

@jasonmalinowski

vs-editor feed, I have no idea

experimental-vs-packages was for the LSP client / protocol packages, service broker, and liveshare packages that we needed when migrating the liveshare code. At that point in time they were not available in a publicly accessible feed, so this was created to unblock that work.

Now that LSP client / protocol packages and service broker packages should be coming from other feeds it shouldn't be needed for those. But I think Microsoft.VisualStudio.LiveShare.LanguageServices.Guest is still coming from there unless that has been also moved. @daytonellwanger is there an alternative (public) devops feed we could use until we fully remove the liveshare pieces?

nkolev92 commented 4 years ago

@tmat @jasonmalinowski reached out to the team via e-mail. What he's describing sounds right. I think we're being too noisy with NU1603.

daytonellwanger commented 4 years ago

@dibarbet Microsoft.VisualStudio.LiveShare.LanguageServices is on NuGet.org. We didn't add the guest package because ya'll are the only ones using it and we want to keep it that way 😄. However, that's the only reason it doesn't exist in a public location.

I think you're only using it for a few requests at the moment.. once everything is moved to official LSP you shouldn't need it.

tmat commented 4 years ago

@daytonellwanger Can you publish the Guest package to vs-impl feed? https://pkgs.dev.azure.com/azure-public/vside/_packaging/vs-impl/nuget/v3/index.json I don't think we should block removing MyGet dependencies on moving everything to official LSP.

daytonellwanger commented 4 years ago

@tmat , feel free to download the package from whatever feed you currently pull it from and reupload it there. We're not planning on making any changes to it until you all are done using it.

I think @dibarbet may have been the one who uploaded it in the first place 😄

dibarbet commented 4 years ago

@AArnott I attempted to upload the package to the feed mentioned by Tomas, but I don't appear to have authorization (just keeps prompting me for credentials). Do you happen to know how I could accomplish it?

AArnott commented 4 years ago

@dibarbet Permissions to push to that feed are limited to just a few individuals and Azure Pipelines, in part because want to make sure only real signed packages to pushed there. If you'll share how to download the package with James Williams he can upload it for you.

JPWilli commented 4 years ago

Pushed https://dev.azure.com/devdiv/DevDiv/_packaging?_a=package&feed=vs-impl&package=Microsoft.VisualStudio.LiveShare.LanguageServices.Guest&protocolType=NuGet&version=2.0.1

dibarbet commented 4 years ago

@tmat the liveshare packages have been added to vs-impl, but there are still NU1603 warnings:

C:\Users\dabarbet\source\repos\roslyn\src\VisualStudio\Setup\Roslyn.VisualStudio.Setup.csproj : warning NU1603: Microsoft.VisualStudio.LanguageServer.Protocol.Extensions 16.7.29 depends on Microsoft.VisualStudio.CoreUtility (>= 16.0.201) but Microsoft.VisualStudio.CoreUtility 16.0.201 was not found. An approximate best match of Microsoft.VisualStudio.CoreUtility 16.0.428 was resolved. [C:\Users\dabarbet\source\repos\roslyn\Roslyn.sln]

I filed https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1141817 on the LSP client to change the versions they're depending on to shipped versions.

AArnott commented 4 years ago

@JPWilli didn't you need to push to the Azure-public account for roslyn to consume it?

dibarbet commented 4 years ago

@JPWilli didn't you need to push to the Azure-public account for roslyn to consume it?

@AArnott it's on the right feed, think it was just the wrong link - https://dev.azure.com/azure-public/vside/_packaging?_a=package&feed=vs-impl%40Local&package=Microsoft.VisualStudio.LiveShare.LanguageServices.Guest&protocolType=NuGet&version=2.0.1&view=versions