Fork me on GitHub
#lumo
<
2018-04-06
>
richiardiandrea00:04:50

has anybody found that installing lumo on CI fails with:

npm install -g lumo-cljs --unsafe-perm
/bin/bash --noprofile --norc /opt/vsts/work/_temp/f61d6d50-8a9a-464b-b529-5b4562787990.sh
/usr/local/bin/lumo -> /usr/local/lib/node_modules/lumo-cljs/bin/lumo.js
> [email protected] install /usr/local/lib/node_modules/lumo-cljs
> node scripts/npm_install.js || nodejs scripts/npm_install.js
/usr/local/lib/node_modules/lumo-cljs/node_modules/jszip/lib/zipEntries.js:176
                throw new Error("Corrupted zip : can't find end of central directory");
                ^
Error: Corrupted zip : can't find end of central directory
    at ZipEntries.readEndOfCentral (/usr/local/lib/node_modules/lumo-cljs/node_modules/jszip/lib/zipEntries.js:176:23)
    at ZipEntries.load (/usr/local/lib/node_modules/lumo-cljs/node_modules/jszip/lib/zipEntries.js:274:14)
    at new ZipEntries (/usr/local/lib/node_modules/lumo-cljs/node_modules/jszip/lib/zipEntries.js:22:14)
    at JSZip.module.exports [as load] (/usr/local/lib/node_modules/lumo-cljs/node_modules/jszip/lib/load.js:19:18)
    at Request.<anonymous> (/usr/local/lib/node_modules/lumo-cljs/scripts/npm_install.js:65:28)
    at emitOne (events.js:121:20)
    at Request.emit (events.js:211:7)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/lumo-cljs/node_modules/request/request.js:1091:12)
    at Object.onceWrapper (events.js:313:30)
    at emitNone (events.js:111:20)
?

richiardiandrea19:04:49

@anmonteiro any hint on the above? our CI is failing 50% of the times

richiardiandrea19:04:57

it looks like there is a fix with the new JSZip

anmonteiro19:04:38

@richiardiandrea you can’t upgrade JSZip to the latest version

anmonteiro19:04:54

definitely not v3 at least

anmonteiro19:04:00

they removed the sync methods

anmonteiro19:04:06

we’re not using the async API

richiardiandrea19:04:00

let me fetch the release that includes the fix

richiardiandrea19:04:25

uhm weird, it says it should be included in 2.6.1 already

anmonteiro19:04:47

then it might not be the same bug

richiardiandrea19:04:05

well it says it happens for large files...that is why I thought about it, lumo now is 66MB...maybe we should drop it only in npm_install? find something more reliable?

richiardiandrea20:04:23

in there you are actually using the async api only, I guess the sync one is used inside the repl?

anmonteiro20:04:39

if you find a better Zip library let me know

anmonteiro20:04:51

I wasn’t able to get one a couple years ago when doing Lumo at first

richiardiandrea20:04:11

I will try to find it 😉

richiardiandrea20:04:31

seems pretty low level tdough

anmonteiro20:04:41

we use zlib for gzip already

anmonteiro20:04:00

AFAIK it doesn’t support zip archives

richiardiandrea20:04:07

do we need to have a zip there? can it be a tar?

anmonteiro20:04:24

sorry I don’t follow

anmonteiro20:04:36

we use JSZip to unzip .jar archives in Lumo

richiardiandrea20:04:47

yep no that's fine sorry

richiardiandrea20:04:57

npm_install.js is what is failing

richiardiandrea20:04:20

so I assume it is using JSZip because the CIs build zip files only?

richiardiandrea20:04:17

so that gzip contains jars

richiardiandrea20:04:00

mmmm, no I have just downloaded it 😄

richiardiandrea20:04:38

@anmonteiro https://github.com/anmonteiro/lumo/pull/383 will try it on Windows as well as Mac, we have many folks using lumo here 😄

anmonteiro20:04:21

@richiardiandrea looks like that will just fail

anmonteiro20:04:32

you didn’t add the dependency under packages/lumo/package.json

richiardiandrea20:04:09

Oh sorry will do

anmonteiro20:04:20

@richiardiandrea can you revert the yarn.lock changes please

👍 4
anmonteiro20:04:34

did you test the script?

anmonteiro20:04:39

i.e. with npm install .

richiardiandrea20:04:23

looks good:

~/tmp/lumo-asrasr$ ll node_modules/lumo/bin/lumo 
-rwxr-xr-x 1 arichiardi arichiardi 65472307 Apr  6 13:47 node_modules/lumo/bin/lumo*

richiardiandrea20:04:30

I asked a colleague to try on win and mac

richiardiandrea21:04:23

looks like we can install on Mac, windows has some problem from the bash emulator

richiardiandrea21:04:32

seems unrelated to the change

richiardiandrea21:04:10

we are trying on a normal terminal

richiardiandrea22:04:55

seems like a Windows weirdness when npm installing \some\folder so I would say all good