klipse

Yehonathan Sharvit 2017-02-17T07:23:24.000960Z

Very very interesting @moxaj

Yehonathan Sharvit 2017-02-17T07:23:36.000961Z

Could you open an issue on klipse with a link to your repo?

moxaj 2017-02-17T11:46:51.000962Z

@viebel done!

moxaj 2017-02-17T11:49:36.000963Z

the first link in the issue references two functions in the analyzer namespaces, i'll try to debug those in the meantime

Yehonathan Sharvit 2017-02-17T11:49:44.000964Z

cool 😎

moxaj 2017-02-17T11:51:45.000966Z

on a separate note, you really should give parinfer a try ^^ I see some misaligned parens in the klipse sources

Yehonathan Sharvit 2017-02-17T12:26:32.000967Z

I have switched to paredit recently

Yehonathan Sharvit 2017-02-17T12:26:47.000968Z

Where do u see misaligned parens?

moxaj 2017-02-17T12:28:59.000969Z

in klipse.lang.clojure for example. not sure where exactly, but the parinfer plugins warns me

Yehonathan Sharvit 2017-02-17T12:29:32.000970Z

maybe the indentation is not perfect?

moxaj 2017-02-17T12:30:03.000971Z

oh yes, I meant the indentation

moxaj 2017-02-17T12:30:09.000972Z

the code compiles of course

Yehonathan Sharvit 2017-02-17T12:30:16.000973Z

yeah. Now it makes sense

Yehonathan Sharvit 2017-02-17T12:30:33.000974Z

Feel free to fix the identation...

moxaj 2017-02-17T12:38:35.000975Z

hmmm

moxaj 2017-02-17T12:38:50.000977Z

these are my debug messages inserted into the compiler

moxaj 2017-02-17T12:39:32.000978Z

the first one is desugared into the second

Yehonathan Sharvit 2017-02-17T12:39:48.000979Z

so it should work?

Yehonathan Sharvit 2017-02-17T12:39:56.000980Z

but it doesnt :thinking_face:

moxaj 2017-02-17T12:40:03.000981Z

it seems wrong to me, but i'm not really familiar with this

moxaj 2017-02-17T12:40:15.000982Z

i'd guess the :refer [x] should be in the require-macros form

Yehonathan Sharvit 2017-02-17T12:40:23.000983Z

oh yes

Yehonathan Sharvit 2017-02-17T12:40:26.000984Z

you are right

Yehonathan Sharvit 2017-02-17T12:41:20.000985Z

how could it be that in klipse it is done the wrong way?

moxaj 2017-02-17T12:41:56.000986Z

I have no idea ^^. Went through the relevant namespace, but it's a tad too complicated for me

moxaj 2017-02-17T12:42:04.000987Z

for now i'll see what the desugar fn does

moxaj 2017-02-17T12:44:14.000988Z

unfortunately lumo I believe uses its own bundled cljs sources, so it won't see my patched compiler

Yehonathan Sharvit 2017-02-17T12:45:23.000989Z

there might be a way to make lumo use your own compiled

Yehonathan Sharvit 2017-02-17T12:45:29.000990Z

try to ask on #lumo

Yehonathan Sharvit 2017-02-17T12:46:03.000991Z

Also, if you have a standalone repro where desugar doens’t do what it should do, you could ask on #cljs-dev

moxaj 2017-02-17T12:46:31.000992Z

I believe this is tied to klipse

Yehonathan Sharvit 2017-02-17T12:46:48.000993Z

Another thing, try to deactivate all the with-redefs inside klipse

Yehonathan Sharvit 2017-02-17T12:46:55.000994Z

around eval-str

moxaj 2017-02-17T12:47:01.000995Z

alright

moxaj 2017-02-17T13:06:31.000996Z

it seems that desugaring is actually correct

Yehonathan Sharvit 2017-02-17T13:13:29.000998Z

I feel that you are very close...

moxaj 2017-02-17T13:37:31.000999Z

I feel like I keep hitting dead ends 😞

moxaj 2017-02-17T13:38:37.001Z

but I may have another lead! πŸ˜„

moxaj 2017-02-17T13:39:54.001001Z

The following throws an error when evaluated in klipse and lumo as well:

(ns klipse-test.a
  #?(:cljs (:require-macros [klipse-test.a])))

moxaj 2017-02-17T13:40:41.001002Z

so, with lumo, it works if the sources are in actual files it loads with *load-fn*

moxaj 2017-02-17T13:41:06.001003Z

but entered into the repl, it fails, which may or may not be expected

moxaj 2017-02-17T13:42:56.001004Z

the reason why Snippet 1 (in my repo) compiles into correct js is because the sources are loaded via *load-fn*

moxaj 2017-02-17T18:29:22.001006Z

@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?