Skip to content

Wrong dependencies downloaded #775

Closed

Description

@haf

Hi,

I have a package 'A' v0.1.1, that depend on 'B', but previously depended on 'C'. Paket is downloading the wrong metadata, that of A v0.0.1, instead of v0.1.1; or the myget server is returning the wrong metadata; how do I inspect what 'call' paket has done that make it download that C is a dependency of A?

Can I toggle a verbose flag and see what data it gets back from what URL?

So I can narrow it down.

I've cleaned out packages/ and the cache. Downloading package 'A' manually shows it contains the right versions in the nuspec file. Paket still downloads an old version.

Activity

  1. forki commented on Apr 14, 2015

    @forki
    Member

    let me guess: it's not on a public nuget server? ;-)

    Can I toggle a verbose flag and see what data it gets back from what URL?

    nope, but that might be interesting. Currently I always break in the debugger if something like that happens. Let me see if I can add more verbose output at that point.

  2. haf commented on Apr 14, 2015

    @haf
    MemberAuthor

    That's right, it's MyGet again ;)

  3. haf commented on Apr 14, 2015

    @haf
    MemberAuthor

    Ok, so I added some debug code to Paket, and lo-and-behold, MyGet is returning faulty data... Here's a patch for the changes:

    diff --git a/src/Paket.Core/NuGetV2.fs b/src/Paket.Core/NuGetV2.fs
    index 726fa90..0281c8c 100644
    --- a/src/Paket.Core/NuGetV2.fs
    +++ b/src/Paket.Core/NuGetV2.fs
    @@ -279,7 +279,8 @@ Environment.NewLine exn.Message
    
                 let! (invalidCache,details) = loadFromCacheOrOData force cacheFile.FullName auth nugetURL package version
    
    -            verbosefn "loaded details for '%s@%O' from url '%s'" package version nugetURL
    +            verbosefn "loaded details for '%s@%O' from url '%s':" package version nugetURL
    +            verbosefn "%A" details
    
                 errorFile.Delete()
                 if invalidCache then
    diff --git a/src/Paket.Core/Utils.fs b/src/Paket.Core/Utils.fs
    index 16a6e41..ae8689f 100644
    --- a/src/Paket.Core/Utils.fs
    +++ b/src/Paket.Core/Utils.fs
    @@ -180,7 +180,8 @@ econt args.Error
     let getFromUrl (auth:Auth option, url : string) = 
         async { 
             try
    -            use client = createWebClient(url,auth)
    +            use client = createWebClient(url, auth)
    +            verbosefn "downloading from url %s" url
                 return! client.AsyncDownloadString(Uri(url))
             with
             | exn -> 
    
    
  4. forki commented on Apr 14, 2015

    @forki
    Member

    please try latest paket 0.41.2.0 with - -f -v

  5. haf commented on Apr 14, 2015

    @haf
    MemberAuthor

    It seems myget is returning multiple results to this query:

    https://www.myget.org/F/logibit/Packages?$filter=Id%20eq%20%27My.Package%27%20and%20NormalizedVersion%20eq%20%270.1.1%27

    Trying such a specific version with NuGet returns only a single version.

  6. forki commented on Apr 14, 2015

    @forki
    Member

    summoning our MyGet guru @maartenba

    are we missing something in Paket?

  7. maartenba commented on Apr 14, 2015

    @maartenba

    Looking into it. Our expression tree rewriter seems to have missrd a beat.

  8. maartenba commented on Apr 14, 2015

    @maartenba

    A fix has been deployed.

  9. haf commented on Apr 14, 2015

    @haf
    MemberAuthor

    I've verified the fix as well! Works now!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions