Fork me on GitHub
#cljs-dev
<
2018-02-07
>
martinklepsch10:02:19

Are goog-defines supported for simple and/or whitespace? I remember they weren’t with the initial impl

thheller11:02:46

@martinklepsch IIRC they didn't work properly in :none but always worked for everything else

martinklepsch11:02:56

@thheller After a bit more discussion elsewhere I think they should work for none, simple + advanced but never work for whitespace

thheller11:02:27

that seems like a bug then. definitely no reason they shouldn't work in whitespace mode

martinklepsch11:02:12

@thheller AFAIK whitespace == no closure at all. I believe thats the reason why it’s not supported

thheller12:02:53

:none is no closure at all. all other modes are piped through closure

martinklepsch12:02:35

@rauh looks like it 😄

martinklepsch12:02:41

It’s been a while though 🙂 I have vague memory of discussing with @dnolen that not supporting whitespace was fine/ok for some reason.

thheller12:02:04

from the ticket I gather that CLOSURE_UNCOMPILED_DEFINES is used. :whitespace is a compiled mode so CLOSURE_DEFINES should be used?

thheller12:02:26

hmm looks like they are only emitted for :none and :whitespace is setting them via the closure compiler api

thheller12:02:58

so maybe Closure doesn't support them for :whitespace and instead expects CLOSURE_DEFINES in JS?

thheller12:02:17

shadow-cljs always uses CLOSURE_DEFINES which seems to be more reliable