Fork me on GitHub
#klipse
<
2017-02-17
>
Yehonathan Sharvit07:02:24

Very very interesting @moxaj

Yehonathan Sharvit07:02:36

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

moxaj11:02:36

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

moxaj11:02:45

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

Yehonathan Sharvit12:02:32

I have switched to paredit recently

Yehonathan Sharvit12:02:47

Where do u see misaligned parens?

moxaj12:02:59

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

Yehonathan Sharvit12:02:32

maybe the indentation is not perfect?

moxaj12:02:03

oh yes, I meant the indentation

moxaj12:02:09

the code compiles of course

Yehonathan Sharvit12:02:16

yeah. Now it makes sense

Yehonathan Sharvit12:02:33

Feel free to fix the identation...

moxaj12:02:50

these are my debug messages inserted into the compiler

moxaj12:02:32

the first one is desugared into the second

Yehonathan Sharvit12:02:48

so it should work?

Yehonathan Sharvit12:02:56

but it doesnt :thinking_face:

moxaj12:02:03

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

moxaj12:02:15

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

Yehonathan Sharvit12:02:20

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

moxaj12:02:56

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

moxaj12:02:04

for now i'll see what the desugar fn does

moxaj12:02:14

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

Yehonathan Sharvit12:02:23

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

Yehonathan Sharvit12:02:29

try to ask on #lumo

Yehonathan Sharvit12:02:03

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

moxaj12:02:31

I believe this is tied to klipse

Yehonathan Sharvit12:02:48

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

moxaj13:02:31

it seems that desugaring is actually correct

Yehonathan Sharvit13:02:29

I feel that you are very close...

moxaj13:02:31

I feel like I keep hitting dead ends 😞

moxaj13:02:37

but I may have another lead! 😄

moxaj13:02:54

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

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

moxaj13:02:41

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

moxaj13:02:06

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

moxaj13:02:56

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

moxaj18:02:22

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