Fork me on GitHub
#klipse
<
2017-01-30
>
Yehonathan Sharvit04:01:28

Thats weird @moxaj Klipse works fine with clojure.spec Take a look at http://blog.klipse.tech/clojure/2016/10/10/defn-args.html

Yehonathan Sharvit04:01:09

I wonder what are u doing differently :thinking_face:

Yehonathan Sharvit04:01:57

Klipse loads clojure.spec from the analysis cache.

moxaj10:01:00

@viebel hmm... for some reason, it tries to load spec from my domain

Yehonathan Sharvit11:01:28

Can you copy/paste the klipse_settings from the source of the page?

Yehonathan Sharvit11:01:21

and also the source of the dom element that does the require

moxaj11:01:48

where exactly is klipse_settings? can't find it

Yehonathan Sharvit11:01:22

it should be somewhere at the end of the <body>

Yehonathan Sharvit11:01:54

Thx @moxaj. Actually it will be more helpful if you share the whole html file

moxaj11:01:05

alright, sec

Yehonathan Sharvit11:01:35

Thx @moxaj. I will look at it a bit later...

moxaj11:01:42

cool, thanks!

moxaj11:01:34

also, from the console log I see that it tries to evaluate my initial expression before loading all my sources

moxaj11:01:16

WARNING: Use of undeclared Var cljs.user/schema at line 1 , followed by a bunch of GET requests

Yehonathan Sharvit15:01:46

@moxaj I’m running your code snippets

Yehonathan Sharvit15:01:24

and I’m getting a different error than yours:

Yehonathan Sharvit15:01:30

#error {:message "Could not eval mikron.util.math in file ", :data {:tag :cljs/analysis-error}, :cause #error {:message "Can't redefine a constant at line 61 ", :data {:file "", :line 61, :column 1, :tag :cljs/analysis-error}}}

moxaj15:01:56

@viebel funny, i'm just investigating that error

moxaj15:01:05

it seems to be a bug in the compiler, related to :parallel-build

moxaj15:01:49

the compiler, for some reason, compiles math.cljc twice

moxaj15:01:02

and the second time, when it encounters a var marked with ^:const, it fails

moxaj15:01:55

but I haven't seen that error in this case, my investigation in completely separate from this issue

Yehonathan Sharvit15:01:06

Do u know that when klipse compiles the code it doesn’t look at the compiler options?

Yehonathan Sharvit15:01:46

And BTW, it will be easier for you to debug this issue using the klipse repl

moxaj15:01:52

I do not know anything about klipse's internals 🙂 how does it compile then?

Yehonathan Sharvit15:01:02

it uses self-host cljs compiler

Yehonathan Sharvit15:01:46

And it always becomes tricky when your library contains macro definitions

moxaj15:01:22

maybe the self hosted compiler uses the parallel functionality by default? no idea

moxaj15:01:28

but i'll take a look at the klipse repl

Yehonathan Sharvit15:01:44

No parallel in self-host 🙂

Yehonathan Sharvit15:01:03

I’ve prepared a snippet with your code and the external-libs

Yehonathan Sharvit15:01:54

And there is a 1st draft of a guide for making a lib self-host compatible

Yehonathan Sharvit15:01:23

I’d appreciate if you enrich this wiki page 😎

moxaj15:01:03

well, afaik, my code is self-host compatible, with regards to macros, but i'll double check

moxaj15:01:39

also, thanks for taking the time to investigate this

Yehonathan Sharvit15:01:42

Your mikron looks very nice

Yehonathan Sharvit15:01:59

I’m looking forward your interactive doc

Yehonathan Sharvit15:01:11

And also a bog post with interactive code snippets...

moxaj16:01:08

thanks! But the interactive doc will be relatively simple, don't expect rocket science 🙂

moxaj16:01:06

on a separate note, i'm seeing another error now: No method in multimethod 'cljs.analyzer/parse' for dispatch value: &, probably related to http://dev.clojure.org/jira/browse/CLJS-1889

moxaj16:01:12

i'm completely puzzled now, either i'm doing something very wrong, or multiple bugs come crashing down on me

Yehonathan Sharvit16:01:47

you never encountered this bug in regular cljs?

moxaj16:01:28

I think I did in the past few days, but it went away

moxaj16:01:47

I believe it was related to clojure.spec/keys*

Yehonathan Sharvit16:01:14

maybe the problem is because klipse doesn’t use the latest clojure.spec version

moxaj16:01:55

may be the case

moxaj16:01:05

http://dev.clojure.org/jira/browse/CLJS-1653 may also be related, which was fixed in december

Yehonathan Sharvit16:01:52

I could try to update clojure.spec version

Yehonathan Sharvit16:01:13

But it won’t be until a couple of hours (I’m not home)

Yehonathan Sharvit16:01:48

Meanwhile you can try to take clojure.spec from gihub using external-libs

Yehonathan Sharvit16:01:37

And to tell klipse not to look for clojure.spec in its cache folder

Yehonathan Sharvit16:01:30

clojure_cached_macro_ns_regexp clojure_cached_ns_regexp in the klipse_settings

moxaj16:01:54

now i'm seeing yet another error: "Invalid :refer, macro mikron.buffer-macros/with-delta does not exist in file ...". I guess one problem is cascading into all these others

moxaj16:01:44

this is still in the browser client, btw

Yehonathan Sharvit19:01:49

@moxaj I just deployed klipse version 6.6.1

Yehonathan Sharvit19:01:05

with an updated cljs version 1.9.456 (including cljs.spec)

Yehonathan Sharvit19:01:31

You can check the klipse version in the browser console

Yehonathan Sharvit19:01:38

you might need to clear your cache

moxaj19:01:05

alright, I'll take a look soon! still figuring out that constant related error

Yehonathan Sharvit19:01:02

Don’t surrender 😎

moxaj19:01:09

state of the art println debugging

Yehonathan Sharvit19:01:27

Yeah I’ve come thru this also...