Re: [ClojureScript] INTERNAL COMPILER ERROR starting with Cljs >= 1.8.51
Hi Peter I've had good luck in the past doing a git bisect on ClojureScript to track down exactly which commit introduced the bug. That might help in this case? For those who haven't used git bisect, you give it a good commit and a bad commit. git will then do a binary search through the commits where you mark each one as good or bad and it will eventually tell you where the bug was introduced. If you can give it a shell command which passes or fails the test, then it can do this process automatically. On Wed, 19 Oct 2016 at 5:07 AM, Thomas Hellerwrote: > Just guessing but > > > com.google.javascript.jscomp.VarCheck$RedeclarationCheckHandler.onRedeclaration(VarCheck.java:380) > > This looks like you maybe have another extern somewhere that tries to > declare the coordorigin property. Might be on Object.prototype.coordorigin > as this would conflict with Element as well. Do you have many other (not > default) externs active? > > Did you check "lein deps :tree" for any conflicts that may mix up the > closure compiler deps? > > /thomas > > On Tuesday, October 18, 2016 at 5:15:18 PM UTC+2, Peter Taoussanis wrote: > > Hi David, thanks a lot for the quick reply! > > > > Tried sampling a few newer + older versions of > `com.google.javascript/closure-compiler` against ClojureScript 1.9.75 > without much luck: > > > > v20160713 - No matching ctor found for class > com.google.javascript.jscomp.ES6ModuleLoader > > v20160619 - No matching ctor found for class > com.google.javascript.jscomp.ES6ModuleLoader > > v20160517 - No matching ctor found for class > com.google.javascript.jscomp.ES6ModuleLoader > > v20160315 - INTERNAL COMPILER ERROR [1] > > v20160208 - INTERNAL COMPILER ERROR > > v20151216 - java.lang.ClassCastException: sun.nio.cs.UTF_8 cannot be > cast to java.lang.String [2] > > v20151015 - java.lang.ClassCastException: sun.nio.cs.UTF_8 cannot be > cast to java.lang.String > > v20150920 - java.lang.ClassCastException: sun.nio.cs.UTF_8 cannot be > cast to java.lang.String > > v20150729 - java.lang.ClassCastException: sun.nio.cs.UTF_8 cannot be > cast to java.lang.String > > > > [1]: Default for Cljs 1.9.75 > > [2]: Default for Cljs 1.8.40 > > > > That is: newer versions seem to fail with "No matching ctor found for > class com.google.javascript.jscomp.ES6ModuleLoader" and older versions with > "No matching ctor found for class > com.google.javascript.jscomp.ES6ModuleLoader". > > > > For these tests, I'm just using the following Lein config: > > > > [com.google.javascript/closure-compiler ] > > [org.clojure/clojurescript "1.9.75" :exclusions > [com.google.javascript/closure-compiler]] > > > > Should I perhaps be doing this some other way? > > > > (No urgency on this btw, happy to keep using Cljs v1.8.40 for now) > > -- > Note that posts from new members are moderated - please be patient with > your first post. > --- > You received this message because you are subscribed to the Google Groups > "ClojureScript" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojurescript+unsubscr...@googlegroups.com. > To post to this group, send email to clojurescript@googlegroups.com. > Visit this group at https://groups.google.com/group/clojurescript. > -- Daniel -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at https://groups.google.com/group/clojurescript.
Re: [ClojureScript] INTERNAL COMPILER ERROR starting with Cljs >= 1.8.51
Just guessing but com.google.javascript.jscomp.VarCheck$RedeclarationCheckHandler.onRedeclaration(VarCheck.java:380) This looks like you maybe have another extern somewhere that tries to declare the coordorigin property. Might be on Object.prototype.coordorigin as this would conflict with Element as well. Do you have many other (not default) externs active? Did you check "lein deps :tree" for any conflicts that may mix up the closure compiler deps? /thomas On Tuesday, October 18, 2016 at 5:15:18 PM UTC+2, Peter Taoussanis wrote: > Hi David, thanks a lot for the quick reply! > > Tried sampling a few newer + older versions of > `com.google.javascript/closure-compiler` against ClojureScript 1.9.75 without > much luck: > > v20160713 - No matching ctor found for class > com.google.javascript.jscomp.ES6ModuleLoader > v20160619 - No matching ctor found for class > com.google.javascript.jscomp.ES6ModuleLoader > v20160517 - No matching ctor found for class > com.google.javascript.jscomp.ES6ModuleLoader > v20160315 - INTERNAL COMPILER ERROR [1] > v20160208 - INTERNAL COMPILER ERROR > v20151216 - java.lang.ClassCastException: sun.nio.cs.UTF_8 cannot be cast to > java.lang.String [2] > v20151015 - java.lang.ClassCastException: sun.nio.cs.UTF_8 cannot be cast to > java.lang.String > v20150920 - java.lang.ClassCastException: sun.nio.cs.UTF_8 cannot be cast to > java.lang.String > v20150729 - java.lang.ClassCastException: sun.nio.cs.UTF_8 cannot be cast to > java.lang.String > > [1]: Default for Cljs 1.9.75 > [2]: Default for Cljs 1.8.40 > > That is: newer versions seem to fail with "No matching ctor found for class > com.google.javascript.jscomp.ES6ModuleLoader" and older versions with "No > matching ctor found for class com.google.javascript.jscomp.ES6ModuleLoader". > > For these tests, I'm just using the following Lein config: > > [com.google.javascript/closure-compiler ] > [org.clojure/clojurescript "1.9.75" :exclusions > [com.google.javascript/closure-compiler]] > > Should I perhaps be doing this some other way? > > (No urgency on this btw, happy to keep using Cljs v1.8.40 for now) -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at https://groups.google.com/group/clojurescript.
Re: [ClojureScript] INTERNAL COMPILER ERROR starting with Cljs >= 1.8.51
Hi David, thanks a lot for the quick reply! Tried sampling a few newer + older versions of `com.google.javascript/closure-compiler` against ClojureScript 1.9.75 without much luck: v20160713 - No matching ctor found for class com.google.javascript.jscomp.ES6ModuleLoader v20160619 - No matching ctor found for class com.google.javascript.jscomp.ES6ModuleLoader v20160517 - No matching ctor found for class com.google.javascript.jscomp.ES6ModuleLoader v20160315 - INTERNAL COMPILER ERROR [1] v20160208 - INTERNAL COMPILER ERROR v20151216 - java.lang.ClassCastException: sun.nio.cs.UTF_8 cannot be cast to java.lang.String [2] v20151015 - java.lang.ClassCastException: sun.nio.cs.UTF_8 cannot be cast to java.lang.String v20150920 - java.lang.ClassCastException: sun.nio.cs.UTF_8 cannot be cast to java.lang.String v20150729 - java.lang.ClassCastException: sun.nio.cs.UTF_8 cannot be cast to java.lang.String [1]: Default for Cljs 1.9.75 [2]: Default for Cljs 1.8.40 That is: newer versions seem to fail with "No matching ctor found for class com.google.javascript.jscomp.ES6ModuleLoader" and older versions with "No matching ctor found for class com.google.javascript.jscomp.ES6ModuleLoader". For these tests, I'm just using the following Lein config: [com.google.javascript/closure-compiler ] [org.clojure/clojurescript "1.9.75" :exclusions [com.google.javascript/closure-compiler]] Should I perhaps be doing this some other way? (No urgency on this btw, happy to keep using Cljs v1.8.40 for now) -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at https://groups.google.com/group/clojurescript.
Re: [ClojureScript] When to use dynamic vars in ClojureScript?
2016-10-18 8:42 GMT+02:00 Daniel Compton: > > I'd really think twice before requiring your users to insert matching > pairs of mutation in their code. It goes against the grain of clojure and > is error-prone. > > Why can’t on-jsload (is that figwheel's?) just run the update within a > (binding [*warn-on-overwrite* false] ...)? > > The (simplified) structure of the Figwheel reload code is > > (do > (before-jsload) > (figwheel-reloads-code) > (on-jsload)) > > I would prefer to use binding, but Figwheel doesn’t run it’s reload within > the scope of my before-jsload function, so binding and with-redefs wouldn’t > work here. I’m not in love with the matching mutations, but I’m not sure if > there’s a better option? A PR to Figwheel is always possible, but this is a > fairly niche requirement, so I’m hesitant to add more configuration to it. > Maybe you can get rid of load-time side-effects, such that a reload won't trigger warnings, but only the main function, called by on-jsload, would? Even though, this is out of scope for re-frame and figwheel alone, some more thoughts: Setting up the environment of your program doesn't seem like such a niche thing to me. Other use cases include reader tags, various (pretty-)print variables, ... The tricky part is finding an approach that works across: a) cljs classic (where the macro environment is clj) b) cljs self-hosted c) repls / dynamic loaders, like figwheel -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at https://groups.google.com/group/clojurescript.
Re: [ClojureScript] INTERNAL COMPILER ERROR starting with Cljs >= 1.8.51
JHust looks like a Google Closure problem. We occasionally bump Google Closure and they occasionally introduce bugs. You might want to try more slightly older or slightly more recent versions of Google Closure. HTH, David On Tue, Oct 18, 2016 at 8:53 AM, Peter Taoussaniswrote: > Hi there! > > Would anyone possibly know where to start debugging this? > > I have a large codebase that compiles fine with ClojureScript <= 1.8.40. > > Starting from ClojureScript 1.8.51 (that is 1.8.51, 1.9.14, 1.9.76) I see: > > java.lang.RuntimeException: INTERNAL COMPILER ERROR. > Please report this problem. > > null > Node(NAME Element): externs.zip//browser/ie_vml.js:29:0 > Element.prototype.coordorigin; > Parent(GETPROP): externs.zip//browser/ie_vml.js:29:0 > Element.prototype.coordorigin; > > at com.google.javascript.jscomp.VarCheck$ > RedeclarationCheckHandler.onRedeclaration(VarCheck.java:380) > at com.google.javascript.jscomp.Es6SyntacticScopeCreator. > declareVar(Es6SyntacticScopeCreator.java:262) > at com.google.javascript.jscomp.Es6SyntacticScopeCreator. > declareLHS(Es6SyntacticScopeCreator.java:138) > at com.google.javascript.jscomp.Es6SyntacticScopeCreator.scanVars( > Es6SyntacticScopeCreator.java:165) > at com.google.javascript.jscomp.Es6SyntacticScopeCreator.scanVars( > Es6SyntacticScopeCreator.java:233) > at com.google.javascript.jscomp.Es6SyntacticScopeCreator.scanVars( > Es6SyntacticScopeCreator.java:233) > at com.google.javascript.jscomp.Es6SyntacticScopeCreator.scanRoot( > Es6SyntacticScopeCreator.java:120) > at com.google.javascript.jscomp.Es6SyntacticScopeCreator. > createScope(Es6SyntacticScopeCreator.java:65) > at com.google.javascript.jscomp.NodeTraversal.getScope( > NodeTraversal.java:787) > at com.google.javascript.jscomp.VarCheck$ > NameRefInExternsCheck.visit(VarCheck.java:287) > at com.google.javascript.jscomp.NodeTraversal.traverseBranch( > NodeTraversal.java:623) > at com.google.javascript.jscomp.NodeTraversal.traverseBranch( > NodeTraversal.java:617) > at com.google.javascript.jscomp.NodeTraversal.traverseBranch( > NodeTraversal.java:617) > at com.google.javascript.jscomp.NodeTraversal.traverseBranch( > NodeTraversal.java:617) > at com.google.javascript.jscomp.NodeTraversal.traverseBranch( > NodeTraversal.java:617) > at com.google.javascript.jscomp.NodeTraversal.traverseBranch( > NodeTraversal.java:617) > at com.google.javascript.jscomp.NodeTraversal.traverse( > NodeTraversal.java:297) > at com.google.javascript.jscomp.VarCheck.process(VarCheck. > java:138) > at com.google.javascript.jscomp.PhaseOptimizer$NamedPass. > process(PhaseOptimizer.java:285) > at com.google.javascript.jscomp.PhaseOptimizer.process( > PhaseOptimizer.java:217) > at com.google.javascript.jscomp.Compiler.check(Compiler.java:777) > at com.google.javascript.jscomp.Compiler.compileInternal( > Compiler.java:693) > at com.google.javascript.jscomp.Compiler.access$000(Compiler. > java:83) > at com.google.javascript.jscomp.Compiler$2.call(Compiler.java:651) > at com.google.javascript.jscomp.Compiler$2.call(Compiler.java:648) > at com.google.javascript.jscomp.CompilerExecutor$2.call( > CompilerExecutor.java:93) > at java.util.concurrent.FutureTask.run(FutureTask.java:266) > at java.util.concurrent.ThreadPoolExecutor.runWorker( > ThreadPoolExecutor.java:1142) > at java.util.concurrent.ThreadPoolExecutor$Worker.run( > ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.NullPointerException > ... 30 more > Subprocess failed > > > Any pointers would be welcome, thanks! > > Cheers :-) > > -- > Note that posts from new members are moderated - please be patient with > your first post. > --- > You received this message because you are subscribed to the Google Groups > "ClojureScript" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojurescript+unsubscr...@googlegroups.com. > To post to this group, send email to clojurescript@googlegroups.com. > Visit this group at https://groups.google.com/group/clojurescript. > -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at https://groups.google.com/group/clojurescript.
[ClojureScript] INTERNAL COMPILER ERROR starting with Cljs >= 1.8.51
Hi there! Would anyone possibly know where to start debugging this? I have a large codebase that compiles fine with ClojureScript <= 1.8.40. Starting from ClojureScript 1.8.51 (that is 1.8.51, 1.9.14, 1.9.76) I see: java.lang.RuntimeException: INTERNAL COMPILER ERROR. Please report this problem. null Node(NAME Element): externs.zip//browser/ie_vml.js:29:0 Element.prototype.coordorigin; Parent(GETPROP): externs.zip//browser/ie_vml.js:29:0 Element.prototype.coordorigin; at com.google.javascript.jscomp.VarCheck$RedeclarationCheckHandler.onRedeclaration(VarCheck.java:380) at com.google.javascript.jscomp.Es6SyntacticScopeCreator.declareVar(Es6SyntacticScopeCreator.java:262) at com.google.javascript.jscomp.Es6SyntacticScopeCreator.declareLHS(Es6SyntacticScopeCreator.java:138) at com.google.javascript.jscomp.Es6SyntacticScopeCreator.scanVars(Es6SyntacticScopeCreator.java:165) at com.google.javascript.jscomp.Es6SyntacticScopeCreator.scanVars(Es6SyntacticScopeCreator.java:233) at com.google.javascript.jscomp.Es6SyntacticScopeCreator.scanVars(Es6SyntacticScopeCreator.java:233) at com.google.javascript.jscomp.Es6SyntacticScopeCreator.scanRoot(Es6SyntacticScopeCreator.java:120) at com.google.javascript.jscomp.Es6SyntacticScopeCreator.createScope(Es6SyntacticScopeCreator.java:65) at com.google.javascript.jscomp.NodeTraversal.getScope(NodeTraversal.java:787) at com.google.javascript.jscomp.VarCheck$NameRefInExternsCheck.visit(VarCheck.java:287) at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:623) at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:617) at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:617) at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:617) at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:617) at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:617) at com.google.javascript.jscomp.NodeTraversal.traverse(NodeTraversal.java:297) at com.google.javascript.jscomp.VarCheck.process(VarCheck.java:138) at com.google.javascript.jscomp.PhaseOptimizer$NamedPass.process(PhaseOptimizer.java:285) at com.google.javascript.jscomp.PhaseOptimizer.process(PhaseOptimizer.java:217) at com.google.javascript.jscomp.Compiler.check(Compiler.java:777) at com.google.javascript.jscomp.Compiler.compileInternal(Compiler.java:693) at com.google.javascript.jscomp.Compiler.access$000(Compiler.java:83) at com.google.javascript.jscomp.Compiler$2.call(Compiler.java:651) at com.google.javascript.jscomp.Compiler$2.call(Compiler.java:648) at com.google.javascript.jscomp.CompilerExecutor$2.call(CompilerExecutor.java:93) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NullPointerException ... 30 more Subprocess failed Any pointers would be welcome, thanks! Cheers :-) -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at https://groups.google.com/group/clojurescript.
Re: [ClojureScript] When to use dynamic vars in ClojureScript?
> I'd really think twice before requiring your users to insert matching pairs of mutation in their code. It goes against the grain of clojure and is error-prone. > Why can’t on-jsload (is that figwheel's?) just run the update within a (binding [*warn-on-overwrite* false] ...)? The (simplified) structure of the Figwheel reload code is (do (before-jsload) (figwheel-reloads-code) (on-jsload)) I would prefer to use binding, but Figwheel doesn’t run it’s reload within the scope of my before-jsload function, so binding and with-redefs wouldn’t work here. I’m not in love with the matching mutations, but I’m not sure if there’s a better option? A PR to Figwheel is always possible, but this is a fairly niche requirement, so I’m hesitant to add more configuration to it. On Tue, Oct 18, 2016 at 11:15 AM Herwig Hochleitnerwrote: > In clojure, set! can only be used on dynamic vars, that are currently > bound. > Apparently, clojurescript allows set! on root-bound vars, but I wouldn't > rely on that. > Your use case with matching set! pairs really has the semantics of just > calling def. > A much safer way to temporarily alter the root binding of a var (though > still prone to concurrency bugs), is with-redefs. > > I'd really think twice before requiring your users to insert matching > pairs of mutation in their code. It goes against the grain of clojure and > is error-prone. > Why can't on-jsload (is that figwheel's?) just run the update within a > (binding [*warn-on-overwrite* false] ...)? > > -- > Note that posts from new members are moderated - please be patient with > your first post. > --- > You received this message because you are subscribed to the Google Groups > "ClojureScript" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojurescript+unsubscr...@googlegroups.com. > To post to this group, send email to clojurescript@googlegroups.com. > Visit this group at https://groups.google.com/group/clojurescript. > -- Daniel -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at https://groups.google.com/group/clojurescript.