fsprojects / fsprojects/Paket

Paket fails if the latest version of a package is not indexed completly

Open
#1,498 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug resilience
Dominant language
F#
Stars
2.1k
Forks
528
Avg merge
1d 12m
Merged PRs (30d)
54

Description

I don't know if this is a regression, but in latest version I get the following error if I try to do a paket update immediatly after I pushed a new version of a package (Yaaf.AdvancedBuilding in this case).
I think at the time I finished writing this post the error cannot be reproduced any longer, but the stacktrace and verbose output might be enough to track this down:

$ .paket/paket.exe update -v
Paket version 2.51.4.0
found: C:\PROJ\Yaaf.DependencyInjection\paket.dependencies
Parsing C:\PROJ\Yaaf.DependencyInjection\paket.dependencies
Resolving packages for group Main:
  0 packages in resolution. 9 requirements left
  Trying to resolve Foq  (from C:\PROJ\Yaaf.DependencyInjection\paket.dependencies)
  - fetching versions for Foq
 - Foq 1.7.1
  1 packages in resolution. 8 requirements left
  Trying to resolve FSharp.Core  (from C:\PROJ\Yaaf.DependencyInjection\paket.dependencies)
  - fetching versions for FSharp.Core
 - FSharp.Core 4.0.0.1
  2 packages in resolution. 7 requirements left
  Trying to resolve FsUnit  (from C:\PROJ\Yaaf.DependencyInjection\paket.dependencies)
  - fetching versions for FsUnit
 - FsUnit 2.0.0
  3 packages in resolution. 8 requirements left
  Trying to resolve NUnit  (from C:\PROJ\Yaaf.DependencyInjection\paket.dependencies)
  - fetching versions for NUnit
 - NUnit 3.0.1
  4 packages in resolution. 7 requirements left
  Trying to resolve NUnit.Runners  (from C:\PROJ\Yaaf.DependencyInjection\paket.dependencies)
  - fetching versions for NUnit.Runners
 - NUnit.Runners 3.2.0
  5 packages in resolution. 11 requirements left
  Trying to resolve Portable.Ninject  (from C:\PROJ\Yaaf.DependencyInjection\paket.dependencies)
  - fetching versions for Portable.Ninject
 - Portable.Ninject 3.3.1
  6 packages in resolution. 10 requirements left
  Trying to resolve SimpleInjector  (from C:\PROJ\Yaaf.DependencyInjection\paket.dependencies)
  - fetching versions for SimpleInjector
 - SimpleInjector 3.1.2
  7 packages in resolution. 23 requirements left
  Trying to resolve Unquote  (from C:\PROJ\Yaaf.DependencyInjection\paket.dependencies)
  - fetching versions for Unquote
 - Unquote 3.1.1
  8 packages in resolution. 22 requirements left
  Trying to resolve Yaaf.AdvancedBuilding  (from C:\PROJ\Yaaf.DependencyInjection\paket.dependencies)
  - fetching versions for Yaaf.AdvancedBuilding
 - Yaaf.AdvancedBuilding 0.13.1
Response from https://www.nuget.org/api/v2/Packages?$filter=(Id eq 'Yaaf.AdvancedBuilding') and (NormalizedVersion eq '0.13.1'):

<?xml version="1.0" encoding="utf-8"?><feed xml:base="https://www.nuget.org/api/v2" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml"><m:count>0</m:count><id>http://schemas.datacontract.org/2004/07/</id><title /><updated>2016-03-06T12:54:15Z</updated><link rel="self" href="https://www.nuget.org/api/v2/Packages" /><author><name /></author></feed>
Response from https://www.nuget.org/api/v2/Packages?$filter=(Id eq 'Yaaf.AdvancedBuilding') and (Version eq '0.13.1'):

<?xml version="1.0" encoding="utf-8"?><feed xml:base="https://www.nuget.org/api/v2" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml"><m:count>0</m:count><id>http://schemas.datacontract.org/2004/07/</id><title /><updated>2016-03-06T12:54:15Z</updated><link rel="self" href="https://www.nuget.org/api/v2/Packages" /><author><name /></author></feed>
Source 'https://www.nuget.org/api/v2' exception: System.Exception: Could not get package details for Yaaf.AdvancedBuilding from https://www.nuget.org/api/v2
   at Paket.NuGetV2.getDetailsFromNuGetViaOData@224-5.Invoke(String message)
   at Paket.NuGetV2.getDetailsFromNuGetViaOData@220-3.Invoke(FSharpOption`1 _arg2)
   at Microsoft.FSharp.Control.AsyncBuilderImpl.args@835-1.Invoke(a a)
Response from https://www.nuget.org/api/v2/Packages?$filter=(Id eq 'Yaaf.AdvancedBuilding') and (NormalizedVersion eq '0.13.1'):

<?xml version="1.0" encoding="utf-8"?><feed xml:base="https://www.nuget.org/api/v2" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml"><m:count>0</m:count><id>http://schemas.datacontract.org/2004/07/</id><title /><updated>2016-03-06T12:54:15Z</updated><link rel="self" href="https://www.nuget.org/api/v2/Packages" /><author><name /></author></feed>
Response from https://www.nuget.org/api/v2/Packages?$filter=(Id eq 'Yaaf.AdvancedBuilding') and (Version eq '0.13.1'):

<?xml version="1.0" encoding="utf-8"?><feed xml:base="https://www.nuget.org/api/v2" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml"><m:count>0</m:count><id>http://schemas.datacontract.org/2004/07/</id><title /><updated>2016-03-06T12:54:15Z</updated><link rel="self" href="https://www.nuget.org/api/v2/Packages" /><author><name /></author></feed>
Source 'https://www.nuget.org/api/v2' exception: System.Exception: Could not get package details for Yaaf.AdvancedBuilding from https://www.nuget.org/api/v2
   at Paket.NuGetV2.getDetailsFromNuGetViaOData@224-5.Invoke(String message)
   at Paket.NuGetV2.getDetailsFromNuGetViaOData@220-3.Invoke(FSharpOption`1 _arg2)
   at Microsoft.FSharp.Control.AsyncBuilderImpl.args@835-1.Invoke(a a)
Paket failed with:
        Couldn't get package details for package Yaaf.AdvancedBuilding 0.13.1 on https://www.nuget.org/api/v2.
StackTrace:
     at Paket.NuGetV2.GetPackageDetails@531-5.Invoke(String message)
   at Paket.NuGetV2.GetPackageDetails(String root, Boolean force, FSharpList`1 sources, PackageName packageName, SemVerInfo version)
   at Paket.UpdateProcess.lockFile@207-6.Invoke(FSharpList`1 sources, PackageName packageName, SemVerInfo version)
   at Paket.PackageResolver.getExploredPackage$cont@254-1(UpdateMode updateMode, FrameworkRestrictions globalFrameworkRestrictions, FSharpFunc`2 getPackageDetailsF, IDictionary`2 rootSettings, Dictionary`2 exploredPackages, PackageRequirement dependency, SemVerInfo version, FSharpList`1 packageSources, Tuple`2 key, Unit unitVar)
   at Paket.PackageResolver.step@421(UpdateMode updateMode, FSharpList`1 sources, GroupName groupName, FSharpOption`1 globalStrategyForTransitives, FSharpOption`1 globalStrategyForDirectDependencies, FrameworkRestrictions globalFrameworkRestrictions, FSharpFunc`2 getVersionsF, FSharpFunc`2 getPackageDetailsF, FSharpRef`1 lastConflictReported, FSharpOption`1 packageFilter,IDictionary`2 rootSettings, Dictionary`2 exploredPackages, Dictionary`2 conflictHistory, HashSet`1 knownConflicts, FSharpRef`1 tryRelaxed, Boolean relax, FSharpMap`2 filteredVersions, FSharpMap`2 currentResolution, FSharpSet`1 closedRequirements, FSharpSet`1 openRequirements)
   at Paket.PackageResolver.step@421(UpdateMode updateMode, FSharpList`1 sources, GroupName groupName, FSharpOption`1 globalStrategyForTransitives, FSharpOption`1 globalStrategyForDirectDependencies, FrameworkRestrictions globalFrameworkRestrictions, FSharpFunc`2 getVersionsF, FSharpFunc`2 getPackageDetailsF, FSharpRef`1 lastConflictReported, FSharpOption`1 packageFilter,IDictionary`2 rootSettings, Dictionary`2 exploredPackages, Dictionary`2 conflictHistory, HashSet`1 knownConflicts, FSharpRef`1 tryRelaxed, Boolean relax, FSharpMap`2 filteredVersions, FSharpMap`2 currentResolution, FSharpSet`1 closedRequirements, FSharpSet`1 openRequirements)
   at Paket.PackageResolver.step@421(UpdateMode updateMode, FSharpList`1 sources, GroupName groupName, FSharpOption`1 globalStrategyForTransitives, FSharpOption`1 globalStrategyForDirectDependencies, FrameworkRestrictions globalFrameworkRestrictions, FSharpFunc`2 getVersionsF, FSharpFunc`2 getPackageDetailsF, FSharpRef`1 lastConflictReported, FSharpOption`1 packageFilter,IDictionary`2 rootSettings, Dictionary`2 exploredPackages, Dictionary`2 conflictHistory, HashSet`1 knownConflicts, FSharpRef`1 tryRelaxed, Boolean relax, FSharpMap`2 filteredVersions, FSharpMap`2 currentResolution, FSharpSet`1 closedRequirements, FSharpSet`1 openRequirements)
   at Paket.PackageResolver.step@421(UpdateMode updateMode, FSharpList`1 sources, GroupName groupName, FSharpOption`1 globalStrategyForTransitives, FSharpOption`1 globalStrategyForDirectDependencies, FrameworkRestrictions globalFrameworkRestrictions, FSharpFunc`2 getVersionsF, FSharpFunc`2 getPackageDetailsF, FSharpRef`1 lastConflictReported, FSharpOption`1 packageFilter,IDictionary`2 rootSettings, Dictionary`2 exploredPackages, Dictionary`2 conflictHistory, HashSet`1 knownConflicts, FSharpRef`1 tryRelaxed, Boolean relax, FSharpMap`2 filteredVersions, FSharpMap`2 currentResolution, FSharpSet`1 closedRequirements, FSharpSet`1 openRequirements)
   at Paket.PackageResolver.step@421(UpdateMode updateMode, FSharpList`1 sources, GroupName groupName, FSharpOption`1 globalStrategyForTransitives, FSharpOption`1 globalStrategyForDirectDependencies, FrameworkRestrictions globalFrameworkRestrictions, FSharpFunc`2 getVersionsF, FSharpFunc`2 getPackageDetailsF, FSharpRef`1 lastConflictReported, FSharpOption`1 packageFilter,IDictionary`2 rootSettings, Dictionary`2 exploredPackages, Dictionary`2 conflictHistory, HashSet`1 knownConflicts, FSharpRef`1 tryRelaxed, Boolean relax, FSharpMap`2 filteredVersions, FSharpMap`2 currentResolution, FSharpSet`1 closedRequirements, FSharpSet`1 openRequirements)
   at Paket.PackageResolver.step@421(UpdateMode updateMode, FSharpList`1 sources, GroupName groupName, FSharpOption`1 globalStrategyForTransitives, FSharpOption`1 globalStrategyForDirectDependencies, FrameworkRestrictions globalFrameworkRestrictions, FSharpFunc`2 getVersionsF, FSharpFunc`2 getPackageDetailsF, FSharpRef`1 lastConflictReported, FSharpOption`1 packageFilter,IDictionary`2 rootSettings, Dictionary`2 exploredPackages, Dictionary`2 conflictHistory, HashSet`1 knownConflicts, FSharpRef`1 tryRelaxed, Boolean relax, FSharpMap`2 filteredVersions, FSharpMap`2 currentResolution, FSharpSet`1 closedRequirements, FSharpSet`1 openRequirements)
   at Paket.PackageResolver.step@421(UpdateMode updateMode, FSharpList`1 sources, GroupName groupName, FSharpOption`1 globalStrategyForTransitives, FSharpOption`1 globalStrategyForDirectDependencies, FrameworkRestrictions globalFrameworkRestrictions, FSharpFunc`2 getVersionsF, FSharpFunc`2 getPackageDetailsF, FSharpRef`1 lastConflictReported, FSharpOption`1 packageFilter,IDictionary`2 rootSettings, Dictionary`2 exploredPackages, Dictionary`2 conflictHistory, HashSet`1 knownConflicts, FSharpRef`1 tryRelaxed, Boolean relax, FSharpMap`2 filteredVersions, FSharpMap`2 currentResolution, FSharpSet`1 closedRequirements, FSharpSet`1 openRequirements)
   at Paket.PackageResolver.step@421(UpdateMode updateMode, FSharpList`1 sources, GroupName groupName, FSharpOption`1 globalStrategyForTransitives, FSharpOption`1 globalStrategyForDirectDependencies, FrameworkRestrictions globalFrameworkRestrictions, FSharpFunc`2 getVersionsF, FSharpFunc`2 getPackageDetailsF, FSharpRef`1 lastConflictReported, FSharpOption`1 packageFilter,IDictionary`2 rootSettings, Dictionary`2 exploredPackages, Dictionary`2 conflictHistory, HashSet`1 knownConflicts, FSharpRef`1 tryRelaxed, Boolean relax, FSharpMap`2 filteredVersions, FSharpMap`2 currentResolution, FSharpSet`1 closedRequirements, FSharpSet`1 openRequirements)
   at Paket.PackageResolver.step@421(UpdateMode updateMode, FSharpList`1 sources, GroupName groupName, FSharpOption`1 globalStrategyForTransitives, FSharpOption`1 globalStrategyForDirectDependencies, FrameworkRestrictions globalFrameworkRestrictions, FSharpFunc`2 getVersionsF, FSharpFunc`2 getPackageDetailsF, FSharpRef`1 lastConflictReported, FSharpOption`1 packageFilter,IDictionary`2 rootSettings, Dictionary`2 exploredPackages, Dictionary`2 conflictHistory, HashSet`1 knownConflicts, FSharpRef`1 tryRelaxed, Boolean relax, FSharpMap`2 filteredVersions, FSharpMap`2 currentResolution, FSharpSet`1 closedRequirements, FSharpSet`1 openRequirements)
   at Paket.PackageResolver.Resolve(GroupName groupName, FSharpList`1 sources, FSharpFunc`2 getVersionsF, FSharpFunc`2 getPackageDetailsF, FSharpOption`1 globalStrategyForDirectDependencies, FSharpOption`1 globalStrategyForTransitives, FrameworkRestrictions globalFrameworkRestrictions, FSharpSet`1 rootDependencies, UpdateMode updateMode)
   at <StartupCode$Paket-Core>.$DependenciesFile.resolveGroup@529-1.Invoke(GroupName groupName, b _arg1)
   at Microsoft.FSharp.Collections.MapTreeModule.mapiOpt[a,b,c](FSharpFunc`3 f, MapTree`2 m)
   at Microsoft.FSharp.Collections.FSharpMap`2.Map[b](FSharpFunc`2 f)
   at Paket.UpdateProcess.selectiveUpdate(Boolean force, FSharpFunc`2 getSha1, FSharpFunc`2 getSortedVersionsF, FSharpFunc`2getPackageDetailsF, LockFile lockFile, DependenciesFile dependenciesFile, UpdateMode updateMode, SemVerUpdateMode semVerUpdateMode)
   at Paket.UpdateProcess.SelectiveUpdate(DependenciesFile dependenciesFile, UpdateMode updateMode, SemVerUpdateMode semVerUpdateMode, Boolean force)
   at Paket.UpdateProcess.SmartInstall(DependenciesFile dependenciesFile, UpdateMode updateMode, UpdaterOptions options)
   at <StartupCode$Paket-Core>.$PublicAPI.Update@193.Invoke(Unit unitVar0)
   at Paket.Utils.RunInLockedAccessMode[a](String rootFolder, FSharpFunc`2 action)
   at Paket.Program.handler@342-16.Invoke(ParseResults`1 results)
   at Paket.Program.processWithValidation[T](FSharpFunc`2 validateF, FSharpFunc`2 commandF, Command command, String[] args)
   at Paket.Program.processCommand@61-1.Invoke(Command command, String[] args)
   at Paket.Program.main()

It might be a good idea to use the older version in this case and print a warning? Or is this a NuGet bug?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining Paket.NuGetV2.GetPackageDetails and the NuGet V2 requests shown in the verbose output, then trace how Paket.UpdateProcess and Paket.PackageResolver handle a package whose latest version is not yet indexed. Reproduce the failure if possible with paket update -v and a newly published Yaaf.AdvancedBuilding version. Done means the update handles this indexing state without failing, with a regression test covering it.

Written by the indexing model from the issue text.

Assessment

Tech stack
fsharp
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.