Very very interesting @moxaj
Could you open an issue on klipse with a link to your repo?
@viebel done!
the first link in the issue references two functions in the analyzer namespaces, i'll try to debug those in the meantime
cool π
on a separate note, you really should give parinfer a try ^^ I see some misaligned parens in the klipse sources
I have switched to paredit recently
Where do u see misaligned parens?
in klipse.lang.clojure
for example. not sure where exactly, but the parinfer plugins warns me
maybe the indentation is not perfect?
oh yes, I meant the indentation
the code compiles of course
yeah. Now it makes sense
Feel free to fix the identation...
hmmm
these are my debug messages inserted into the compiler
the first one is desugared into the second
so it should work?
but it doesnt :thinking_face:
it seems wrong to me, but i'm not really familiar with this
i'd guess the :refer [x]
should be in the require-macros
form
oh yes
you are right
how could it be that in klipse it is done the wrong way?
I have no idea ^^. Went through the relevant namespace, but it's a tad too complicated for me
for now i'll see what the desugar fn does
unfortunately lumo I believe uses its own bundled cljs sources, so it won't see my patched compiler
there might be a way to make lumo use your own compiled
try to ask on #lumo
Also, if you have a standalone repro where desugar doensβt do what it should do, you could ask on #cljs-dev
I believe this is tied to klipse
Another thing, try to deactivate all the with-redefs
inside klipse
around eval-str
alright
it seems that desugaring is actually correct
I feel that you are very close...
I feel like I keep hitting dead ends π
but I may have another lead! π
The following throws an error when evaluated in klipse and lumo as well:
(ns klipse-test.a
#?(:cljs (:require-macros [klipse-test.a])))
so, with lumo, it works if the sources are in actual files it loads with *load-fn*
but entered into the repl, it fails, which may or may not be expected
the reason why Snippet 1 (in my repo) compiles into correct js is because the sources are loaded via *load-fn*
@viebel I believe this may be it. A question to confirm a hunch: does klipse evaluate the current contents of the editor by breaking it into separate top level forms, and evaluating each one sequentially?