[CLJS-581] Advanced compiler renames console.groupCollapsed. Created: 30/Aug/13 Updated: 19/Nov/13 Resolved: 19/Nov/13
In the lein-cljsbuild simple sample app, I enabled advanced compilation and changed the example.hello namespace to the following:
Then ran lein cljsbuild once, loaded the project in my browser (google chrome) and in the browser call example.hello.greet("me")
This results in an error, but not the one we expect. Instead we get TypeError: Object #<Console> has no method 'wb'.
This is because the log-exceptions function was compiled to the following. Notice how console.groupCollapsed has been renamed to console.wb.
I did a little more digging, and found this recent commit in the google closure history. It adds an extern to the list of default externs for groupCollapsed. It's pretty new (Jun 7) so presumably the clojurescript compiler is still using an older version.
I think all that needs to be done is to update the version of closure used?
As a workaround, add the two lines below to your externs file.
|Comment by David Nolen [ 30/Aug/13 7:13 PM ]|
We could probably track Google Closure more closely, but we don't as this usually requires a considerable amount of testing to make sure that things don't break. We also need to make our own release of Google Closure since we depend on third party libraries. Stuart Sierra is more or less in charge of this process. We'll probably do another bump again soon but there's no rush as this particular issue is easily worked around.
|Comment by David Nolen [ 19/Nov/13 9:22 PM ]|
this can be worked around by supplying an externs file.