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

paket install fails after adding a new group #1476

Closed
mexx opened this issue Feb 17, 2016 · 4 comments
Closed

paket install fails after adding a new group #1476

mexx opened this issue Feb 17, 2016 · 4 comments

Comments

@mexx
Copy link
Member

mexx commented Feb 17, 2016

I have added a new group to paket.dependencies and references to some nuget packages and run paket install which resulted in:

Paket version 2.50.10.0
found: D:\Dev\OpenSource\arachne\paket.dependencies
Parsing D:\Dev\OpenSource\arachne\paket.dependencies
Paket failed with:
        The given key was not present in the dictionary.
StackTrace:
   at Microsoft.FSharp.Collections.MapTreeModule.find[TValue,a](IComparer`1 comparer, TValue k, MapTree`2 m)
   at Paket.LockFile.GetTransitiveDependencies(GroupName groupName)
   at Paket.DependencyChangeDetection.findNuGetChangesInDependenciesFile@61.Invoke(GroupName groupName)
   at Microsoft.FSharp.Collections.IEnumerator.map@111.DoMoveNext(b& )
   at Microsoft.FSharp.Collections.IEnumerator.MapEnumerator`1.System-Collections-IEnumerator-MoveNext()
   at Microsoft.FSharp.Core.CompilerServices.RuntimeHelpers.takeOuter@713[T,TResult](ConcatEnumerator`2 x, Unit unitVar0)
   at Microsoft.FSharp.Collections.SetTreeModule.mkFromEnumerator[a](IComparer`1 comparer, SetTree`1 acc, IEnumerator`1 e)
   at Microsoft.FSharp.Collections.SetTreeModule.ofSeq[a](IComparer`1 comparer, IEnumerable`1 c)
   at Paket.DependencyChangeDetection.findNuGetChangesInDependenciesFile(DependenciesFile dependenciesFile, LockFile lockFile)
   at Paket.UpdateProcess.selectiveUpdate(Boolean force, FSharpFunc`2 getSha1, FSharpFunc`2 getSortedVersionsF, FSharpFunc`2 getPackageDetailsF, 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.Install@164.Invoke(Unit unitVar0)
   at Paket.Utils.RunInLockedAccessMode[a](String rootFolder, FSharpFunc`2 action)
   at Paket.Program.handler@336-11.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()
@inosik
Copy link
Contributor

inosik commented Feb 17, 2016

Same here. 2.49.5 is the last working version.

2.49.5...2.49.6

@forki
Copy link
Member

forki commented Feb 17, 2016

Can you please show the dependencies file? @mexx can you try to debug it?
I'm away from pc for 2 weeks, but I might be able to push a release if
someone sends a fix.
On Feb 17, 2016 7:42 AM, "Ilja Nosik" notifications@github.com wrote:

Same here. 2.49.5 is the last working version.

2.49.5...2.49.6
2.49.5...2.49.6


Reply to this email directly or view it on GitHub
#1476 (comment).

@inosik
Copy link
Contributor

inosik commented Feb 17, 2016

Create this paket.dependencies:

source pakets
nuget A

Run paket install. The paket.lock gets created. Then change paket.dependencies like this:

source pakets
nuget A

group G2
source pakets
nuget A

Run paket install again. Paket fails now.

This call triggers the failure. It was introduced between 2.49.5 and 2.49.6.

@baronfel
Copy link
Contributor

I've got a fix for this, thanks to @inosik finding the item in question. The set of transitive dependencies for a non-existent package should be empty set, otherwise use the existing logic. I was also having the error locally and this resolved it. Basically amounts to doing a Map.TryFind instead of Map.Find. Writing a test now to cover this case and then I'll submit a PR.

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

No branches or pull requests

4 participants