Fork me on GitHub

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

Yehonathan Sharvit11:10:29

Thank you @anmonteiro @mfikes @dnolen for helping me refining namespace loading strategy in KLIPSE. I mentioned you in this article


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

Yehonathan Sharvit14: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


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


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


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


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

cljs.user=> (set! *print-meta* 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:


@mfikes so this probably needs to be tweaked in the CLJS branch if the symbol has the :macro metadata?


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


does it make your bootstrapped tests pass?


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


(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...


@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


what’s your position on this?