Fork me on GitHub
#cljs-dev
<
2017-04-24
>
dnolen13:04:47

@jfntn sounds like a useful enhancement - there’s no particular reason that info isn’t there

dnolen13:04:58

@mhuebert glad to hear it!

dnolen15:04:09

@thheller nothing other then some assurance it won’t break anything 🙂

thheller15:04:50

I'll see if I can come up with a decent test

anmonteiro20:04:43

@dnolen right now defmacro returns true even when :def-emits-var is true. This is because set! is the last statement we invoke (see https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/core.cljc#L3125)

anmonteiro20:04:17

shouldn’t we return the result of defn for REPLs that want to show the var?

dnolen20:04:30

fine by me, this isn’t a thing anyone should have any expectations about

dnolen20:04:36

also bootstrap only anyhow

anmonteiro21:04:49

definitely not something that I would have encountered had I not been working on Lumo

anmonteiro21:04:57

just wanted to check if a patch would be welcome

oahner23:04:34

So I dug a bit into the externs inference code; as far as I can tell, the bits that make *warn-on-infer* work correctly with :externs being set are only enabled through code paths that hit closure/build, so calling the analyzer API directly will only work with the gclosure builtin externs

oahner23:04:04

is that by design?

oahner23:04:58

as it stands, cljs.closure/build, cljs.build.api/build and cljs.build.api/watch are the only functions that call cljs.closure/add-externs-sources, and they all do it in their 2-arity methods before calling their 3-arity counterparts and only if *compiler* is nil

oahner23:04:04

Since all of these code paths eventually hit cljs.closure/build's 3-arity function, I would think that's where the call to add-externs-sources should be, if we don't care for analyzer to work with *warn-on-infer*