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

Dependency resolution does not work for VSTS feed #1798

Closed
wrummler opened this Issue Jul 8, 2016 · 6 comments

Comments

Projects
None yet
3 participants
@wrummler

wrummler commented Jul 8, 2016

Description

I have a private package A in my VSTS feed that depends on a package B from the nuget.org feed. When I paket install, A is resolved and downloaded, but A's dependency on B is not resolved (and B is not downloaded). By comparision, when I source a local folder feed containing A, B is successfully resolved and downloaded.

Repro steps

  1. Create a new feed in a VSTS project.
  2. For private package A depending on nuget.org package B, push A to the VSTS feed.
  3. Add the VSTS feed and package A to paket.dependencies, e.g.:
    • c:\path\to\project\paket.dependencies:

      source https://www.nuget.org/api/v2
      source https://myproject.pkgs.visualstudio.com/_packaging/myfeed/nuget/v2
      
      nuget A
      
  4. paket install

Expected behavior

Paket version 3.4.0.0
Resolving packages for group Main:
 - A 0.1.0.36
 - B 1.2.0
Locked version resolution written to c:\path\to\project\paket.lock
2 seconds - ready.

Actual behavior

Paket version 3.4.0.0
Resolving packages for group Main:
 - A 0.1.0.36
Locked version resolution written to c:\path\to\project\paket.lock
4 seconds - ready.

Known workarounds

None.

Related information

  • Windows 7 Pro 64-bit
  • .NET Framework 4.6.1
@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Jul 12, 2016

Member

ok this sounds very very strange.
Is there a way to reproduce with a public feed?

@isaacabraham do you have seen this?

Member

forki commented Jul 12, 2016

ok this sounds very very strange.
Is there a way to reproduce with a public feed?

@isaacabraham do you have seen this?

@forki forki added the needs-repro label Jul 12, 2016

@kostrse

This comment has been minimized.

Show comment
Hide comment
@kostrse

kostrse Oct 4, 2016

Contributor

I'm also reproducing this problem, even with packages from the same source.
We are using internal package feed for mirroring nuget.org.

paket.dependencies with nuget.org source

framework: >= net461
source https://www.nuget.org/api/v2
nuget Microsoft.AspNet.WebApi.OwinSelfHost ~> 5.2.3

paket intall

$ .\.paket\paket.exe install
Paket version 3.20.2.0
Resolving packages for group Main:
 - Microsoft.AspNet.WebApi.OwinSelfHost 5.2.3
 - Microsoft.AspNet.WebApi.Owin 5.2.3
 - Microsoft.Owin.Host.HttpListener 3.0.1
 - Microsoft.Owin.Hosting 3.0.1
 - Microsoft.AspNet.WebApi.Core 5.2.3
 - Microsoft.Owin 3.0.1
 - Owin 1.0
 - Microsoft.AspNet.WebApi.Client 5.2.3
 - Newtonsoft.Json 9.0.1
Locked version resolution written to D:\Temp\Test1\paket.lock
5 seconds - ready.

the same paket.dependencies but with a custom source

framework: >= net461
source https://xyz.pkgs.visualstudio.com/_packaging/xyz/nuget/v3/index.json
nuget Microsoft.AspNet.WebApi.OwinSelfHost ~> 5.2.3

paket install with custom source

$ .\.paket\paket.exe install
Paket version 3.20.2.0
Resolving packages for group Main:
 - Microsoft.AspNet.WebApi.OwinSelfHost 5.2.3
Locked version resolution written to D:\Temp\Test1\paket.lock
3 seconds - ready.
Contributor

kostrse commented Oct 4, 2016

I'm also reproducing this problem, even with packages from the same source.
We are using internal package feed for mirroring nuget.org.

paket.dependencies with nuget.org source

framework: >= net461
source https://www.nuget.org/api/v2
nuget Microsoft.AspNet.WebApi.OwinSelfHost ~> 5.2.3

paket intall

$ .\.paket\paket.exe install
Paket version 3.20.2.0
Resolving packages for group Main:
 - Microsoft.AspNet.WebApi.OwinSelfHost 5.2.3
 - Microsoft.AspNet.WebApi.Owin 5.2.3
 - Microsoft.Owin.Host.HttpListener 3.0.1
 - Microsoft.Owin.Hosting 3.0.1
 - Microsoft.AspNet.WebApi.Core 5.2.3
 - Microsoft.Owin 3.0.1
 - Owin 1.0
 - Microsoft.AspNet.WebApi.Client 5.2.3
 - Newtonsoft.Json 9.0.1
Locked version resolution written to D:\Temp\Test1\paket.lock
5 seconds - ready.

the same paket.dependencies but with a custom source

framework: >= net461
source https://xyz.pkgs.visualstudio.com/_packaging/xyz/nuget/v3/index.json
nuget Microsoft.AspNet.WebApi.OwinSelfHost ~> 5.2.3

paket install with custom source

$ .\.paket\paket.exe install
Paket version 3.20.2.0
Resolving packages for group Main:
 - Microsoft.AspNet.WebApi.OwinSelfHost 5.2.3
Locked version resolution written to D:\Temp\Test1\paket.lock
3 seconds - ready.
@kostrse

This comment has been minimized.

Show comment
Hide comment
@kostrse

kostrse Oct 4, 2016

Contributor

Paket calls v2 API for VSTS even when v3 source specified (as in my example above).

To retrieve a Nuget package details (including a list of dependencies) Paket.NuGetV2.getDetailsFromNuGetViaODataFast makes the following HTTP requests:

For pkgs.visualstudio.com source (v2 API)
Request:

GET https://xyz.pkgs.visualstudio.com/_packaging/xyz/nuget/v2/Packages?$filter=(Id%20eq%20'Microsoft.AspNet.WebApi.OwinSelfHost')%20and%20(NormalizedVersion%20eq%20'5.2.3')

Response:
The d:Dependencies property set to empty:

<d:Dependencies m:null="true"/>

For nuget.org source (v2 API)
Request:

GET https://www.nuget.org/api/v2/Packages?$filter=(Id%20eq%20'Microsoft.AspNet.WebApi.OwinSelfHost')%20and%20(NormalizedVersion%20eq%20'5.2.3')

Response:
The property has a correct list of dependencies:

<d:Dependencies>Microsoft.AspNet.WebApi.Owin:[5.2.3, 5.3.0):|Microsoft.Owin.Hosting:2.0.2:|Microsoft.Owin.Host.HttpListener:2.0.2:</d:Dependencies>

As result, I have two JSON files in my C:\Users\user1\AppData\Local\NuGet\Cache:
one of them with corrent dependencies, another one without.

Contributor

kostrse commented Oct 4, 2016

Paket calls v2 API for VSTS even when v3 source specified (as in my example above).

To retrieve a Nuget package details (including a list of dependencies) Paket.NuGetV2.getDetailsFromNuGetViaODataFast makes the following HTTP requests:

For pkgs.visualstudio.com source (v2 API)
Request:

GET https://xyz.pkgs.visualstudio.com/_packaging/xyz/nuget/v2/Packages?$filter=(Id%20eq%20'Microsoft.AspNet.WebApi.OwinSelfHost')%20and%20(NormalizedVersion%20eq%20'5.2.3')

Response:
The d:Dependencies property set to empty:

<d:Dependencies m:null="true"/>

For nuget.org source (v2 API)
Request:

GET https://www.nuget.org/api/v2/Packages?$filter=(Id%20eq%20'Microsoft.AspNet.WebApi.OwinSelfHost')%20and%20(NormalizedVersion%20eq%20'5.2.3')

Response:
The property has a correct list of dependencies:

<d:Dependencies>Microsoft.AspNet.WebApi.Owin:[5.2.3, 5.3.0):|Microsoft.Owin.Hosting:2.0.2:|Microsoft.Owin.Host.HttpListener:2.0.2:</d:Dependencies>

As result, I have two JSON files in my C:\Users\user1\AppData\Local\NuGet\Cache:
one of them with corrent dependencies, another one without.

@kostrse

This comment has been minimized.

Show comment
Hide comment
@kostrse

kostrse Oct 4, 2016

Contributor

This commit doesn't solve the problem.
OData v2 API of pkgs.visualstudio.com doesn't return any dependencies.

Why does Paket always stick to v2 API?

I tried to debug with Paket.NuGetV3.getPackageDetails implementatioin, but it crashes (API incompatibility or something similar).

Contributor

kostrse commented Oct 4, 2016

This commit doesn't solve the problem.
OData v2 API of pkgs.visualstudio.com doesn't return any dependencies.

Why does Paket always stick to v2 API?

I tried to debug with Paket.NuGetV3.getPackageDetails implementatioin, but it crashes (API incompatibility or something similar).

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Oct 4, 2016

Member

Because c3 is faster in nearly all situations.

Is there a way for me to reproduce?

Am 04.10.2016 21:13 schrieb "Sergey Kostrukov" notifications@github.com:

This commit doesn't solve the problem.
OData v2 API of pkgs.visualstudio.com doesn't return any dependencies.

Why does Paket always stick to v2 API?

I tried to debug with Paket.NuGetV3.getPackageDetails implementatioin,
but it crashes (API incompatibility or something similar).


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#1798 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADgNN0WdiET0X0ylpP1Vf8kRQk8L3ezks5qwqVGgaJpZM4JIMJd
.

Member

forki commented Oct 4, 2016

Because c3 is faster in nearly all situations.

Is there a way for me to reproduce?

Am 04.10.2016 21:13 schrieb "Sergey Kostrukov" notifications@github.com:

This commit doesn't solve the problem.
OData v2 API of pkgs.visualstudio.com doesn't return any dependencies.

Why does Paket always stick to v2 API?

I tried to debug with Paket.NuGetV3.getPackageDetails implementatioin,
but it crashes (API incompatibility or something similar).


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#1798 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADgNN0WdiET0X0ylpP1Vf8kRQk8L3ezks5qwqVGgaJpZM4JIMJd
.

@kostrse

This comment has been minimized.

Show comment
Hide comment
@kostrse

kostrse Oct 4, 2016

Contributor

I will create an account in VSTS with a private NuGet feed for reproduction.

Contributor

kostrse commented Oct 4, 2016

I will create an account in VSTS with a private NuGet feed for reproduction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment