[Glass] Error when loading from github (failed only on gemstone)

Mariano Martinez Peck via Glass glass at lists.gemtalksystems.com
Fri Dec 15 13:17:49 PST 2017


With the usage of git, its likely that within our project, aside from the
CODE repository subdirectory, we also store other none code stuff. And with
Metacello/Monticello we must download a zipball of the whole project, and
not only the "code subdirectory", which might be too big. In fact, even the
code subdirectory much be too big like in this case I am having.

With that in mind, I don't like having to unzip everything all together in
memory. In `downloadZipArchive:to:` you can see:

  zipfile containingDirectory
    readOnlyFileNamed: zipfile localName
    do: [ :fileStream | stream := RWBinaryOrTextStream on: *fileStream
contents* ].

Where `*fileStream contents*` brings everything into the image.

So.... my question is ... in the same way that this methods does a
`performOnServer:` with `curl`


downloadBasicFile: url to: outputFileName includeHTTPHeader:
includeHTTPHeader username: username pass: pass
  "download from <url> into <outputFileName>"

  | errorFileName args |
  "Make a unique name for the error log and ensure that we can write the
files"
  errorFileName := self downloadErrorFileNameFor: outputFileName.
  (ServerFileDirectory on: outputFileName) forceNewFileNamed:
outputFileName.
  (ServerFileDirectory on: errorFileName) forceNewFileNamed: errorFileName.
  args := username ifNotNil: [ ' -u ' , username , ':' , pass ] ifNil: [ ''
].
  includeHTTPHeader
    ifTrue: [ args := args , ' -i ' ].
*  System*
*    performOnServer:*
*      '/usr/bin/curl' , args , ' -L ' , url , ' > ' , outputFileName , '
2> '*
*        , errorFileName.*
  ^ errorFileName


Can't we adapt the previous method to do a `performOnServer:` to do a
`unzip` ?






On Thu, Dec 14, 2017 at 11:13 AM, Mariano Martinez Peck <
marianopeck at gmail.com> wrote:

> I forgot to say that the zip is quite big (70MB) as we have a bunch of
> autogenerated code and filetree is a bit verbose..
> I would also like to add that that was on GemStone 3.4 on CentOS 7.
>
> On GemStone 3.3.3 on OSX it also failed but it failed LATER (trying to
> signal an out of memory when trying to get the `fileStream contents`). See
> attachment.
>
> Thanks,
>
>
>
> On Thu, Dec 14, 2017 at 9:43 AM, Mariano Martinez Peck <
> marianopeck at gmail.com> wrote:
>
>> Hi Dale,
>>
>> I am trying to load HighchartsSt as a dependency with Metacello. This
>> worked perfectly on Pharo but when I try on GemStone I am getting an error.
>> The way to reproduce it for me is as simple as this:
>>
>> MetacelloGemStonePlatform new downloadZipArchive: '
>> https://github.com/ba-st/HighchartsSt/zipball/highchart6-import' to:
>> '/tmp/github-3574-bastHighchartsSthighchart6import.zip'
>>
>> And this yields me the attached error.
>>
>> I don't think Github is giving me broken zips. Furthermore, if I do a
>> `wget` then `unzip` it does work correct.  I am trying to check if this
>> fails in older GemStone than 3.4 but I am failing to start my old stones
>> too grrrrr...
>>
>> Thanks in advance,
>>
>> --
>> Mariano
>> http://marianopeck.wordpress.com
>>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>



-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20171215/d995beff/attachment.html>


More information about the Glass mailing list