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 can't unpack our nuget packages (since 0.39) #761

Closed
devboy opened this issue Apr 9, 2015 · 19 comments
Closed

Paket can't unpack our nuget packages (since 0.39) #761

devboy opened this issue Apr 9, 2015 · 19 comments

Comments

@devboy
Copy link
Contributor

devboy commented Apr 9, 2015

We are using a private nuget host and since nuget.exe has been removed, paket seems to be unable to unpack our nuget archives. (at least on mono/osx)

Paket failed with:
    Argument is out of range.
StackTrace:
    at System.DateTime.op_Subtraction (DateTime d, TimeSpan t) [0x00000] in <filename unknown>:0
  at System.DateTimeOffset.get_UtcDateTime () [0x00000] in <filename unknown>:0
  at System.DateTimeOffset..ctor (DateTime dateTime) [0x00000] in <filename unknown>:0
  at System.DateTimeOffset.op_Implicit (DateTime dateTime) [0x00000] in <filename unknown>:0
  at System.IO.Compression.ZipArchiveEntry.get_LastWriteTime () [0x00000] in <filename unknown>:0
  at System.IO.Compression.ZipFileExtensions.ExtractToFile (System.IO.Compression.ZipArchiveEntry source, System.String destinationFileName, Boolean overwrite) [0x00000] in <filename unknown>:0
  at System.IO.Compression.ZipFileExtensions.ExtractToDirectory (System.IO.Compression.ZipArchive source, System.String destinationDirectoryName) [0x00000] in <filename unknown>:0
  at System.IO.Compression.ZipFile.ExtractToDirectory (System.String sourceArchiveFileName, System.String destinationDirectoryName, System.Text.Encoding entryNameEncoding) [0x00000] in <filename unknown>:0
  at System.IO.Compression.ZipFile.ExtractToDirectory (System.String sourceArchiveFileName, System.String destinationDirectoryName) [0x00000] in <filename unknown>:0
  at Paket.NuGetV2+ExtractPackage@338.Invoke (Microsoft.FSharp.Core.Unit unitVar) [0x00000] in <filename unknown>:0
  at Microsoft.FSharp.Control.AsyncBuilderImpl+callA@803[System.String,Microsoft.FSharp.Core.Unit].Invoke (Microsoft.FSharp.Control.AsyncParams`1 args) [0x00000] in <filename unknown>:0
@devboy
Copy link
Contributor Author

devboy commented Apr 9, 2015

I just tested this on my Windows VM with 0.39.2 and everything works fine.
So it seems to be a mono incompatability.
I am running the latest MONO afaik (Mono JIT compiler version 3.12.1 ((detached/0849ec7 Fri Mar 20 19:07:48 EDT 2015))

@forki
Copy link
Member

forki commented Apr 9, 2015

this looks similar to #757

@devboy
Copy link
Contributor Author

devboy commented Apr 9, 2015

Looks exactly like it actually. We are using nuget pack.

@forki
Copy link
Member

forki commented Apr 9, 2015

/cc @haf
On Apr 9, 2015 17:00, "Dominic Graefen" notifications@github.com wrote:

Looks exactly like it actually. We are using nuget pack actually.


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

@devboy
Copy link
Contributor Author

devboy commented Apr 9, 2015

I could upgrade to paket pack for our internal libraries and pin paket to 0.38.x.
But that can't be the solution.

@devboy
Copy link
Contributor Author

devboy commented Apr 9, 2015

Also as this wasn't on nuget.org it is not related to some problems there.
When rolling back to 0.38.x it works fine.

@forki
Copy link
Member

forki commented Apr 9, 2015

I'd love to see a fix. Not really sure how.

@devboy
Copy link
Contributor Author

devboy commented Apr 9, 2015

A cross-platform version of the CLR would be one 😜

Is there an option/env var you can set to pin the version of paket in the bootstrapper?
Would like to avoid having to edit all build.cmd/sh(project-scaffold) files in our libraries which are now obviously all failing on travis.

@forki
Copy link
Member

forki commented Apr 9, 2015

yes IIRC paket.bootstrapper.exe 0.38 should work.

But wait maybe I have a workaround.

@devboy
Copy link
Contributor Author

devboy commented Apr 9, 2015

I know bootstrapper takes an argument. But there are quite a few places where i'd have to append, not too bad though.

But I'll wait a moment 👍

@forki
Copy link
Member

forki commented Apr 9, 2015

I can't really reproduce so we have to play a bit ping pong. sorry about that.

0.39.3 tries to overwrite the dates in the zipfiles.

@devboy
Copy link
Contributor Author

devboy commented Apr 9, 2015

StackOverflow 🚫

Unhandled Exception: System.StackOverflowException: The requested operation caused a stack overflow. at System.IO.Compression.ZipFile.Open (System.String archiveFileName, ZipArchiveMode mode) [0x00000] in <filename unknown>:0 at System.IO.Compression.ZipFile.Open (System.String archiveFileName, ZipArchiveMode mode) [0x00000] in <filename unknown>:0 at System.IO.Compression.ZipFile.Open (System.String archiveFileName, ZipArchiveMode mode) [0x00000] in <filename unknown>:0 at System.IO.Compression.ZipFile.Open (System.String archiveFileName, ZipArchiveMode mode) [0x00000] in <filename unknown>:0 at System.IO.Compression.ZipFile.Open (System.String archiveFileName, ZipArchiveMode mode) [0x00000] in <filename unknown>:0 at System.IO.Compression.ZipFile.Open (System.String archiveFileName, ZipArchiveMode mode) [0x00000] in <filename unknown>:0 at System.IO.Compression.ZipFile.Open (System.String archiveFileName, ZipArchiveMode mode) [0x00000] in <filename unknown>:0 at System.IO.Compression.ZipFile.Open (System.String archiveFileName, ZipArchiveMode mode) [0x00000] in <filename unknown>:0 at System.IO.Compression.ZipFile.Open (System.String archiveFileName, ZipArchiveMode mode) [0x00000] in <filename unknown>:0 at System.IO.Compression.ZipFile.Open (System.String archiveFileName, ZipArchiveMode mode) [0x00000] in <filename unknown>:0 at System.IO.Compression.ZipFile.Open (System.String archiveFileName, ZipArchiveMode mode) [0x00000] in <filename unknown>:0 at System.IO.Compression.ZipFile.Open (System.String archiveFileName, ZipArchiveMode mode) [0x00000] in <filename unknown>:0 at System.IO.Compression.ZipFile.Open (System.String archiveFileName, ZipArchiveMode mode) [0x00000] in <filename unknown>:0

You can also send me a build via email, so you won't have to create ping pong releases.

@forki
Copy link
Member

forki commented Apr 9, 2015

WTF!?
i seems the mono implementation is completly broken

@forki
Copy link
Member

forki commented Apr 9, 2015

@devboy
Copy link
Contributor Author

devboy commented Apr 9, 2015

Would it possible to apply the mentioned workaround: Using a file stream to create the archive.
?

@forki
Copy link
Member

forki commented Apr 9, 2015

ok. let's try it using the filestream workaround. 0.39.4 is out

@devboy
Copy link
Contributor Author

devboy commented Apr 9, 2015

Give me 10 mins.

@devboy
Copy link
Contributor Author

devboy commented Apr 9, 2015

Bingo!
Works fine(In my reproduction case)

Thanks a lot!!!

@forki
Copy link
Member

forki commented Apr 9, 2015

wtf

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

No branches or pull requests

3 participants