-
Notifications
You must be signed in to change notification settings - Fork 183
grunt (really uglify) fails on sha512 #75
Comments
I noticed you have your own uglify. I know infinite recursion was an issue in the upstream uglify so maybe that needs to be ported to yours? |
Unfortunately I can't reproduce this bug with my node v0.10.25. Just updated my uglify version with the upstram. Try it now. Note, maybe you'll have to manually reinstall local uglify-js package with |
I am using node v0.12.2 (via homebrew on the Mac). If I am on master and I change the package.json file: rm -rf node_modules grunt --with sha512 Running "sources" task Running "uglify:release" (uglify) task
Aborted due to warnings. |
I updated uglify-js and grunt-contrib-uglify to the latest (also bumped grunt and grunt-cli but I don't think those matter). That seems to work. Compression in uglify takes a long time (minutes for the above command). Disabling compression speeds it up grunt considerably. Is compression really necessary? The file is only 74KB with compression and 75KB without compression in the sha512 only case. |
Disabling compression with the old uglify works as well. You can leave compression enabled if you update the uglify and the grunt-contrib-uglify modules. |
About compression, @mishoo didn't approved the pull request #373 yet, so vanilla uglify-js breaks asm.js code (though it's still valid js code it doesn't pass asm.js verification and its performance dramatically degrades at least in Firefox). And that's why the compression takes so a long time. You're right, when compression is turned off, vanilla uglify-js works fine. But it worth being turned on. With the latest patched uglify-js compressed asmcrypto.js results in 128KB vs 296KB uncompressed one. That's why I have to maintain my own uglify-js untill @mishoo lets the patch in. You shouldn't change |
Damn, it still fails. https://travis-ci.org/vibornoff/asmcrypto.js/builds/57720786 |
Trying another way with bab07e1 |
Seems it work now https://travis-ci.org/vibornoff/asmcrypto.js/builds/60597335 |
I'm not sure why you closed this as your code does not work on the latest node (0.12.2). |
grunt --with=sha512
Running "sources" task
Building modules: sha512
Running "uglify:release" (uglify) task
[RangeError: Maximum call stack size exceeded]
Aborted due to warnings.
I tried increasing the stack trace but no luck. It keeps eating up memory an not completing.
node --stack-size=10000000 ./node_modules/.bin/grunt sha512
Warning: Task "sha512" not found. Use --force to continue.
Aborted due to warnings.
kmt-work:asmcrypto.js kmtarplee$ node --stack-size=10000000 ./node_modules/.bin/grunt --with=sha512
Running "sources" task
Building modules: sha512
Running "uglify:release" (uglify) task
^C
The text was updated successfully, but these errors were encountered: