-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Sorry for the non-descriptive issue title. Not sure how to narrow it down. It affects at least the 20180402 and 20180319 releases.
shadow-cljs is a build tool for ClojureScript + JS that among other things enables using npm packages directly (via ClojureScript). To achieve this it uses the Closure Compiler extensively but does use not the the built-in rewriting for CommonJS/ES6. It instead bundles the code a bit differently and processes the code with SIMPLE_OPTIMIZATIONS by default.
A user reported a build issue when trying to use the the graphql package where I cannot figure out the cause. No compiler error or so occurs, only a runtime issue. The code seems to fail an instanceof check that does not fail when using WHITESPACE_ONLY. The generated exception message is misleading so disregard that.
I was not able to narrow down the issue at all. I created 3 different builds and made them available online since that allows stepping through the code with the Chrome debugger.
All code is available here: https://github.com/thheller/issue-248
The two failing builds are
simple is using source maps. pseudo is simple but without source maps, instead it is pretty printed and using pseudo names.
And the working whitespace-only build
https://code.thheller.com/issue-248/whitespace/
Everything on the shadow-cljs side is identical so the only part that is different is what Closure generated.
I totally accept if this is out of scope and I honestly do not understand what half the graphql code is doing but I though I'd raise this here. Maybe someone has a clue what might be going on.