Clojurians
#cljs-dev
<
2017-05-07
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

mikethompson11:05:57

A couple of days ago, there was the suggestion that ^boolean js/goog.DEBUG didn't work any more as a means to remove (DCE) dev-only code. I undertook to check, which I have now done. As a result: https://dev.clojure.org/jira/browse/CLJS-2023

mikethompson11:05:51

(Sigh. I wish i could edit my issue to clean up my silly spelling errors which, strangely, only become visible to me once I click Create. Moving on)

thheller12:05:24

@mikethompson added a quick comment identifying the actual bad commit. don't have time for more currently.

mikethompson12:05:18

@thheller Thanks! We're going through and changing all js/goog.DEBUG to goog.DEBUG ... so we'll soon be free of the issue. But I'm sure others will get burned because it triggers DCE failures silently.

rauh16:05:11

Just submitted https://dev.clojure.org/jira/browse/CLJ-2162 . I think that'd also be a candidate for cljs, since then the truthy calls can be avoided. A quick github search shows that (condp = ...) is very common.

vikeri16:05:41

The issue is not that the circular dependency is not supported, it’s that the compiler won’t tell me that I have a circular dependency as it normally does but it will just freeze up instead. The expected behaviour would be to throw an error saying that I have a circular dependency (like it does without parallel compilation) but instead it just freezes without giving me a hint what the issue is.

danielcompton21:05:13

@mikethompson you need to ask Alex Miller for more JIRA permissions to edit your issues

alexmiller23:05:11

@mikethompson I gave you edit rights in jira

mikethompson23:05:00

@alexmiller Luxury! Thanks. Fixed.

darwin23:05:00

@mikethompson I think “^boolean goog.DEBUG” should be “^boolean goog/DEBUG”

mikethompson23:05:52

Oh, interesting. I've not seen that before. Does that mean we should change these kinds of docs: https://clojurescript.org/reference/compiler-options#closure-defines It contains references to goog.DEBUG

darwin23:05:34

I don’t understand it fully but there is some translation, “goog. x.y.z” false will be defined as goog.x.y.z=false in js

darwin23:05:06

so you reference it in cljs via goog/x.y.z

mikethompson23:05:50

Makes sense. @dnolen is darwin's suggestion here officially-the-right-thing-to-do?