Fork me on GitHub
#cljs-dev
<
2018-09-27
>
bhauman00:09:08

another thing is that live REPL switching makes more sense with a shared compiler env

lwhorton15:09:17

hey @mfikes i saw your comment on https://dev.clojure.org/jira/browse/CLJS-2922 . do you have a suspicion about what’s going on, or do you want me to generate a minimal case? (or at least try to)

mfikes15:09:01

I was speculating that something went amiss with munging when emitting the function as JavaScript. This could theoretically happen if, for example, it was in the middle of emitting the function (after the parameters to it had been emitted), and then, while the body was being emitted, another namespace got added to the compilation environment, thus changing the way the JavaScript symbols get munged. For vanilla ClojureScript this doesn't seem possible as all of the namespaces appear to be set up at the beginning of compilation. Having said that, there might be a possibility that shadow-cljs behaves differently.

thheller15:09:58

wait this issue is with shadow-cljs?

mfikes15:09:04

If it is possible to create a repro for vanilla ClojureScript, that would be ideal.

mfikes15:09:24

The issue came up when using shadow-cljs, but it has not been isolated to shadow-cljs.

mfikes15:09:46

Another useful bit of data, @lwhorton if you encounter it, would be a copy of the JavaScript that was written, prior to Closure processing.

thheller16:09:16

(btw yes shadow-cljs uses its own parallel-build compilation that shares nothing with the default impl)

mfikes16:09:54

Ahh, perhaps this ticket should move to shadow-cljs. Hrm.

mfikes16:09:51

Or, alternatively, of course, a minimal vanilla repro would work.

thheller16:09:53

yeah probably. although your scenario can't happen

thheller16:09:37

all CLJS compilation completes before Closure optimization begins. so first need to isolate is weird CLJS->JS happens or if its purely due to Closure

thheller16:09:39

don't see how though

lwhorton16:09:45

i’m not sure how to attempt to recreate a minimal case, particularly if it’s a parallel race condition. do i make 100+ files with the same fn and matching namespaces?

dnolen16:09:04

@lwhorton if this is a shadow-cljs thing, I think we should probably close this issue

lwhorton16:09:12

i think @thheller has a better idea of whether this is cljs or shadow, i have to defer to him

thheller16:09:43

fine by me. if I can reproduce this with pure CLJS we can always re-open

dnolen16:09:10

@lwhorton well if you’re using shadow and this is parallel-build I don’t see how it could be ClojureScript

dnolen16:09:22

but in for future reference don’t report shadow based bug reports

dnolen16:09:29

only things you can repro with ClojureScript

lwhorton16:09:08

my mistake, i didnt know shadow uses its own compilation step… thought it just defered to the cljs compiler

dnolen16:09:12

we no longer field stuff that isn’t just ClojureScript

dnolen16:09:19

no lein, no boot, no figwheel, no shadow

dnolen16:09:30

we don’t have time to look at the matrix of X tools

lwhorton16:09:17

please close this issue (dont think i have permission to do that even as reporter) https://dev.clojure.org/jira/browse/CLJS-2922