Repository navigation
Closed
Description
mono tools/paket.exe simplify --verbose
Paket version 0.16.2.0
found: /Users/henrik.feldt/dev/haf/EventStore.Client.FSharp/paket.dependencies
Parsing /Users/henrik.feldt/dev/haf/EventStore.Client.FSharp/paket.dependencies
Paket failed with:
The given key was not present in the dictionary.
StackTrace:
at Microsoft.FSharp.Collections.MapTreeModule.find[NormalizedPackageName,FSharpSet`1] (IComparer`1 comparer, Paket.NormalizedPackageName k, Microsoft.FSharp.Collections.MapTree`2 m) [0x00000] in <filename unknown>:0
at Microsoft.FSharp.Collections.FSharpMap`2[Paket.Domain+NormalizedPackageName,Microsoft.FSharp.Collections.FSharpSet`1[Paket.Domain+PackageName]].get_Item (Paket.NormalizedPackageName key) [0x00000] in <filename unknown>:0
at [email protected] (Microsoft.FSharp.Collections.FSharpSet`1 set, Paket.PackageName directDep) [0x00000] in <filename unknown>:0
at Microsoft.FSharp.Collections.ListModule.loop@151-20[PackageName,FSharpSet`1] (Microsoft.FSharp.Core.FSharpFunc`3 f, Microsoft.FSharp.Collections.FSharpSet`1 s, Microsoft.FSharp.Collections.FSharpList`1 xs) [0x00000] in <filename unknown>:0
at Microsoft.FSharp.Collections.ListModule.Fold[PackageName,FSharpSet`1] (Microsoft.FSharp.Core.FSharpFunc`2 folder, Microsoft.FSharp.Collections.FSharpSet`1 state, Microsoft.FSharp.Collections.FSharpList`1 list) [0x00000] in <filename unknown>:0
at Paket.Simplifier+getSimplifiedDeps@40-1[Paket.Requirements+PackageRequirement].Invoke (Microsoft.FSharp.Collections.FSharpList`1 allDeps) [0x00000] in <filename unknown>:0
at Paket.Simplifier.Analyze (Microsoft.FSharp.Collections.FSharpList`1 allPackages, Paket.DependenciesFile depFile, Microsoft.FSharp.Collections.FSharpList`1 refFiles, Boolean interactive) [0x00000] in <filename unknown>:0
at Paket.Simplifier.Simplify (System.String dependenciesFileName, Boolean interactive) [0x00000] in <filename unknown>:0
at Paket.Dependencies.Simplify (Boolean interactive) [0x00000] in <filename unknown>:0
at [email protected] (Microsoft.FSharp.Core.Unit unitVar) [0x00000] in <filename unknown>:0
at <StartupCode$paket>.$Paket.Program.main@ () [0x00000] in <filename unknown>:0
When having
nuget NuGet.CommandLine
in paket.dependencies. Also, that nuget is never downloaded when running paket.exe restore.
Metadata
Metadata
Assignees
Labels
No labels
Activity
theimowski commentedon Nov 27, 2014
Could be related to #359. I'll have a look
theimowski commentedon Nov 27, 2014
cannot reproduce:
haf commentedon Nov 27, 2014
I think my description of the problem was not complete. It seems from the stack trace that Paket tries to look up indirect dependencies; and indeed this is something which wouldn't yield any results, as non of the projects in the src directory have dependencies on any nugets at this point.
So if you also a project which is paket enabled through convert-from-nuget, but which doesn't depend on any packages, you might trigger the same path?
theimowski commentedon Nov 27, 2014
Flow in
simplifylooks like this:So as long as there are no dependencies for a project,
simplifyshouldn't affect that project.Too bad the stacktrace you provided is not completed, ie I can't determine line numbers.
Could you share the project for repro?
haf commentedon Nov 27, 2014
I'll try
haf commentedon Nov 29, 2014
Here's a repro; I run:
haf commentedon Nov 29, 2014
Code here: https://github.com/haf/NLog.RabbitMQ/pull/20
theimowski commentedon Nov 29, 2014
Ok I can reproduce now.
It looks like the reason is that the lock file is out of date.
paket installdoesn't recreate lock file,paket updatedoes - if you run the latter, theNuGet.CommandLinewill get restored correctly, andsimplifywill not crash.@forki - should we generate warning when one tries to
paket install, but dependencies file is out of sync with the lock file?simplifyshould not crash in neither case, so I'll try to fix that issuehaf commentedon Nov 29, 2014
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
I think people would expect that the new package is added to the lock file.
Update i would expect to update all packages. How otherwise would I add a package without affecting the others?
On November 29, 2014 1:54:02 PM CET, Tomasz Heimowski [email protected] wrote:
Sent from my Android device with K-9 Mail. Please excuse my brevity.
-----BEGIN PGP SIGNATURE-----
Version: APG v1.1.1
iQI+BAEBCgAoBQJUecO/IRxIZW5yaWsgRmVsZHQgPGhlbnJpa0Bsb2dpYml0LnNl
PgAKCRB9FjoG5k92RaKzD/4nmSFMhsHFBA9ppRmotr3GYZIc7eJBrwbPkL/eKBHe
MPJFgcLAmes9lMCwz7hpet4ovbZajPAZdFHKH2iixp2LwCU++/vrJ8JrGlIvDwgK
5MASm1hdAKNy728QIeLe0P436t8iQu1QCmt8GtOw8DdMGkf+KwzM0V2VBmCC86sD
YHGwnPd638oI5tTXeR0bxN8t2i9KX0Mlpv8UpvVTiurw5/hPffXtrYFKB/IELmRF
gch1T2zehBiJLFhu5gjm9RQ5iAG5JYINKZkowtLvBAc56ng8BHejrRYROzjNtN7a
+GdJIIMssONK6lhSnwCnTNguIpf443VsFV7pFWvnvlcLtcrDR2925Z7DYZqUl6B3
wOj9jcKZsEWIAHeJBboSKeYjgyd5nzfEPY0aqXPbcFmaOwVSRtHufs+Z3orjP18d
9c+x97L2chEaBmpPteQPac0xEF3CSenQhGdhF/TdQAmoRERpAKV7/w4yQb6QWuZt
dwPjrc1+godzCOHay52iAyzseRUDRvEAU5B5Ha0fCl9urLscaYMAf7HSiQFFHAvO
PCxIJ0rO78s+wX6hq6dLmefDKFxndYGmFX9fgsrpijlb1dBNHtLGsFxBZF9kZ+gW
FO6I4s6t1g04ue8e4LXENM3Wc/BiwgHpgQLdulRJ0TGn9MA7xrFwzlH8TbB/rIem
wg==
=CsHf
-----END PGP SIGNATURE-----
theimowski commentedon Nov 29, 2014
You can update single package - this should not affect other packages
clear failure message for simplify, when lock file outdated - referen…
theimowski commentedon Nov 29, 2014
I sent a PR for the
simplifycommand - it will still crash in above case, but at least there should be a clear error messagehaf commentedon Nov 29, 2014
But then how do I update a single package so that it does affect other packages? E.g.:
(->): depends on
A -> C
B -> C
paket update Ais in my world:A'A''s new versionsA', update it, version-levelled against what B depends on.On (3) if B can't have the new version of C, update A to the highest possible version where B's dependencies can be met with semver and version levelling, otherwise give error message.
paket installis in my world: ensure paket.dependencies is in effect and update paket.lock if needed; see how 'bundler' does it, and consider that paket.lock, especially if you add support for different runtims/frameworks, will need to support locking down a package to the particular runtime that 'paket' was run on, meaning another call to 'paket install' will cause an addition to paket.lock.haf commentedon Nov 29, 2014
Deleted last comment.
haf commentedon Nov 29, 2014
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Thank you very much. =)
On November 29, 2014 2:33:59 PM CET, Tomasz Heimowski [email protected] wrote:
Sent from my Android device with K-9 Mail. Please excuse my brevity.
-----BEGIN PGP SIGNATURE-----
Version: APG v1.1.1
iQI+BAEBCgAoBQJUedCbIRxIZW5yaWsgRmVsZHQgPGhlbnJpa0Bsb2dpYml0LnNl
PgAKCRB9FjoG5k92RUqoD/4qxf5yrx4NzcS/KC7TnQlIehsCGsLNHBN7Rb8Wi219
jVWGMTLlV+e4ZOsv6u3JYxYEVIAFNU4C5cv4zdrALtZS5cVcApBt8jolEimMD76J
ORXfSicCQUSoWd30wgAc4tu+YOcZlmRrHZptqM7cyjrwga0WVnucxu3Krs1eRupw
MnZg4vEjLkBb7/ZDh5ijRP3hDuynFusK9frSHFU+f0nhdZkaA56tm4T7pHxF2Fan
p2DSdS9Ad3EUb+SF/ESPgI8BdqSYbQziznW+KrRGccr539neK0q9Si+q4lAx39Gy
nbT4rkTXNzHMzbT5NpSAe5B04LiQl73CcmqRh3DhRTJPFP+Bfg61KCfwaVWO6ECN
3KSZdFCTWJSjqAAWA63obl79//ZoD3HcwI0yE9XjnxfuyZcMfBYsfxsnjo2JC4ni
/OcpJCxmuVum4oEztfDvAxe2ifkEm0/qVqOV/mFCwm0DvPUbEl6j+s8dIO9nIzaC
Kyy15p3zYTxAHZg4O3kNCW20XSW4JwqtQP+nQcxgFkqrswopefqdNdmmtQt1ZyvS
Nlb/QTuXCea9tUpBsOmJQcyizQOLvsj6ePZjVJmgeY8fgTvxzutawGrC1ZxNcNJk
ll7ofV9Dh1yvxQPPNvgpHp2X9kat2Iw45c9JAHmq8ktHZtYQjQvkXuq3LqoxS1Lf
uA==
=PQbn
-----END PGP SIGNATURE-----
theimowski commentedon Nov 29, 2014
AFAIK such scenario is not supported (fully automated), however you could use the
updatecommand for single packaged in conjunction withoutdatedcommand.Re
paket installI think it's by design that it does not modify the lock file. @forki please correct me if I'm wrong hereforki commentedon Nov 29, 2014
Yes. We opted against this bundler behavior. I think @agross always wanted
to let it behave like bundler. I had some concerns.
On Nov 29, 2014 3:03 PM, "Tomasz Heimowski" [email protected]
wrote: