Clojurians
#cljs-dev
<
2016-10-16
>

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

mfikes00:10:11

The functions at the bottom of that file are just helpers that won’t work under :advanced (scroll back to line 10514)

viebel11:10:29

Thank you @anmonteiro @mfikes @dnolen for helping me refining namespace loading strategy in KLIPSE. I mentioned you in this article http://blog.klipse.tech/klipse/2016/10/16/klipse-is-fast.html

dnolen14:10:12

@viebel all the stuff around find-ns should work as long as :advanced optimizations is something you’re OK with dropping

viebel14:10:24

Yeah I tried it: I called it in my load-fn in order to detect what namespaces are already loaded in KLIPSE - but it has side effects and it corrupted ns loading

dnolen15:10:30

@viebel no idea what you’re running into - but find-ns isn’t specifically intended for this use case

dnolen15:10:54

you can also probably use the compiler environment to figure this stuff out

dnolen15:10:46

for stuff that you precompiled you do need to dump the analysis and make sure you load it

mfikes19:10:32

I think this is why :fn-var gets inadvertently set to true for macros in bootstrapped:

cljs.user=> (set! *print-meta* true)
true
cljs.user=> (macroexpand '(defmacro foo []))
(do (cljs.core$macros/defn ^{:macro true} foo ([&form &env])) (set! (. foo -cljs$lang$macro) true))
(In short, defn is used and it is presumably setting :fn-var.) Context: This trips up this test: https://github.com/clojure/clojurescript/blob/a4c627d7f4905db7366896f8db59c4ef72bb478e/src/main/cljs/cljs/test.cljc#L23

anmonteiro19:10:21

@mfikes so this probably needs to be tweaked in the CLJS branch if the symbol has the :macro metadata? https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/analyzer.cljc#L1265

mfikes19:10:06

Yes, replacing true with (not (:macro sym-meta)) does the trick.

anmonteiro19:10:30

does it make your bootstrapped tests pass?

mfikes19:10:08

Yes. Planck's tests pass with the change. And also the compiler's script/test-self-parity and script/test pass.

mfikes20:10:54

(Other minor things are breaking in Planck, but they could be unrelated and simply defects in Planck.) But, I think something similar to (not (:macro sym-meta)) or even changing value of the fn-var? local might be onto the right track...

anmonteiro21:10:48

@dnolen it would be really great if we had the ClojureScript tests running in a CI. I think @rohit started working on that and got it to the point where tests were passing

anmonteiro21:10:52

what’s your position on this?