Repository navigation
Closed
Description
It's getting a bit old. So far I have successfully converted zero projects to paket. =s
mono tools/paket.exe convert-from-nuget -v
Paket version 0.11.10.0
Paket failed with:
Object reference not set to an instance of an object
StackTrace:
at [email protected] (System.Xml.XmlNode node) [0x00000] in <filename unknown>:0
at Microsoft.FSharp.Core.OptionModule.Map[XmlNode,Auth] (Microsoft.FSharp.Core.FSharpFunc`2 mapping, Microsoft.FSharp.Core.FSharpOption`1 option) [0x00000] in <filename unknown>:0
at [email protected] (IEnumerable`1& next) [0x00000] in <filename unknown>:0
at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1[Paket.PackageSources+PackageSource].MoveNextImpl () [0x00000] in <filename unknown>:0
at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1[Paket.PackageSources+PackageSource].System-Collections-IEnumerator-MoveNext () [0x00000] in <filename unknown>:0
at Microsoft.FSharp.Collections.SeqModule.ToList[PackageSource] (IEnumerable`1 source) [0x00000] in <filename unknown>:0
at Paket.NuGetConvert.applyConfig (Paket.NugetConfig config, System.Xml.XmlDocument doc) [0x00000] in <filename unknown>:0
at [email protected] (Paket.NugetConfig config, System.Xml.XmlDocument doc) [0x00000] in <filename unknown>:0
at Microsoft.FSharp.Collections.ListModule.loop@151-20[XmlDocument,NugetConfig] (Microsoft.FSharp.Core.FSharpFunc`3 f, Paket.NugetConfig s, Microsoft.FSharp.Collections.FSharpList`1 xs) [0x00000] in <filename unknown>:0
at Microsoft.FSharp.Collections.ListModule.Fold[XmlDocument,NugetConfig] (Microsoft.FSharp.Core.FSharpFunc`2 folder, Paket.NugetConfig state, Microsoft.FSharp.Collections.FSharpList`1 list) [0x00000] in <filename unknown>:0
at Paket.NuGetConvert.readNugetConfig () [0x00000] in <filename unknown>:0
at Paket.NuGetConvert.ConvertFromNuget (Boolean force, Boolean installAfter, Boolean initAutoRestore) [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
mono --version
Mono JIT compiler version 3.10.0 ((detached/e204655 Mon Oct 13 08:50:28 EDT 2014)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: normal
SIGSEGV: altstack
Notification: kqueue
Architecture: x86
Disabled: none
Misc: softdebug
LLVM: yes(3.4svn-mono-(detached/e656cac)
GC: sgen
Metadata
Metadata
Assignees
Labels
No labels
Activity
forki commentedon Nov 1, 2014
let me check.
forki commentedon Nov 1, 2014
convert worked for me. Without any problems. Let me send you a pull request to suave
will still try to reproduce your error.
haf commentedon Nov 1, 2014
Funny. I'm on a OS X 10.9.5 mac if that helps.
forki commentedon Nov 1, 2014
SuaveIO/suave#136
haf commentedon Nov 1, 2014
Great. I've merged it to master now.
Do you want me to give you any more data on the null reference exception?
forki commentedon Nov 1, 2014
yes. please.
I tried to reproduce, but no luck.
I assume the error is at
https://github.com/fsprojects/Paket/blob/master/src/Paket.Core/NugetConvert.fs#L25
2014-11-01 15:55 GMT+01:00 Henrik Feldt [email protected]:
forki commentedon Nov 1, 2014
ok. seems the error is with a nuget.config - probably one which exists on your machine and not on mine - somehwere in Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "nuget"
haf commentedon Nov 1, 2014
Yes, I've found it...
The problem is that you loop over each key of the add-elements in
packageSources, but for some keys you can't assume you have a credential. E.g. for the keyhttps://www.nuget.org/api/v2/there's no corresponding element in thepackageSourceCredentialselement.haf commentedon Nov 1, 2014
On this line you assume SelectNodes doesn't return null.
forki commentedon Nov 1, 2014
thanks. will rewrite that part.
Don't fail with NullReferenceException when analyzing nuget.config - …
forki commentedon Nov 1, 2014
ok this is now super verbose but hopefully safer. @theimowski could you please review my changes? Thx
haf commentedon Nov 1, 2014
Now it fails with:
Because I have a nuget source that's authorized.
haf commentedon Nov 1, 2014
ok, now I've spent too much time on this again :p. See you in a month.
forki commentedon Nov 1, 2014
Can you send me your nuget config? With modified password of course. Will
make it a unittest
On Nov 1, 2014 4:39 PM, "Henrik Feldt" [email protected] wrote:
haf commentedon Nov 1, 2014
Done
theimowski commentedon Nov 1, 2014
my guess would be this line - nuget supports also encrypted passwords
theimowski commentedon Nov 1, 2014
... which convert-nuget does not, my bad I didn't handle that.
Add failing test for #319
Don't fail with NullReferenceException when analyzing nuget.config - …
forki commentedon Nov 1, 2014
@haf thanks. I used it as a first sample. should work in 0.11.11
I'm now starting to cleanup and add couple of new test cases.