klipse

Yehonathan Sharvit 2017-01-30T04:19:28.000486Z

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 Sharvit 2017-01-30T04:20:09.000488Z

I wonder what are u doing differently :thinking_face:

Yehonathan Sharvit 2017-01-30T04:20:57.000489Z

Klipse loads clojure.spec from the analysis cache.

moxaj 2017-01-30T10:58:00.000490Z

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

Yehonathan Sharvit 2017-01-30T11:00:28.000492Z

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

Yehonathan Sharvit 2017-01-30T11:00:45.000493Z

@moxaj ?

Yehonathan Sharvit 2017-01-30T11:01:21.000494Z

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

moxaj 2017-01-30T11:01:48.000495Z

where exactly is klipse_settings? can't find it

Yehonathan Sharvit 2017-01-30T11:02:22.000496Z

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

Yehonathan Sharvit 2017-01-30T11:04:54.000498Z

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

moxaj 2017-01-30T11:05:05.000499Z

alright, sec

Yehonathan Sharvit 2017-01-30T11:16:35.000501Z

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

moxaj 2017-01-30T11:16:42.000502Z

cool, thanks!

moxaj 2017-01-30T11:17:34.000503Z

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

moxaj 2017-01-30T11:18:16.000504Z

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

Yehonathan Sharvit 2017-01-30T15:47:46.000505Z

@moxaj I’m running your code snippets

Yehonathan Sharvit 2017-01-30T15:48:24.000506Z

and I’m getting a different error than yours:

Yehonathan Sharvit 2017-01-30T15:48:30.000507Z

#error {:message "Could not eval mikron.util.math in file <https://raw.githubusercontent.com/moxaj/mikron/master/src/cljc/mikron/util/math.cljc>", :data {:tag :cljs/analysis-error}, :cause #error {:message "Can't redefine a constant at line 61 <https://raw.githubusercontent.com/moxaj/mikron/master/src/cljc/mikron/util/math.cljc>", :data {:file "<https://raw.githubusercontent.com/moxaj/mikron/master/src/cljc/mikron/util/math.cljc>", :line 61, :column 1, :tag :cljs/analysis-error}}}

moxaj 2017-01-30T15:48:56.000508Z

@viebel funny, i'm just investigating that error

moxaj 2017-01-30T15:49:05.000509Z

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

Yehonathan Sharvit 2017-01-30T15:49:20.000510Z

what do u mean?

moxaj 2017-01-30T15:49:49.000511Z

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

moxaj 2017-01-30T15:50:02.000512Z

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

moxaj 2017-01-30T15:50:55.000513Z

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

Yehonathan Sharvit 2017-01-30T15:51:06.000514Z

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

Yehonathan Sharvit 2017-01-30T15:51:46.000515Z

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

moxaj 2017-01-30T15:51:52.000516Z

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

Yehonathan Sharvit 2017-01-30T15:52:02.000517Z

it uses self-host cljs compiler

Yehonathan Sharvit 2017-01-30T15:52:46.000518Z

And it always becomes tricky when your library contains macro definitions

moxaj 2017-01-30T15:53:22.000520Z

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

moxaj 2017-01-30T15:53:28.000521Z

but i'll take a look at the klipse repl

Yehonathan Sharvit 2017-01-30T15:53:44.000522Z

No parallel in self-host 🙂

Yehonathan Sharvit 2017-01-30T15:54:03.000523Z

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

Yehonathan Sharvit 2017-01-30T15:54:54.000525Z

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

Yehonathan Sharvit 2017-01-30T15:55:23.000529Z

I’d appreciate if you enrich this wiki page 😎

moxaj 2017-01-30T15:56:03.000530Z

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

Yehonathan Sharvit 2017-01-30T15:56:26.000531Z

👍

moxaj 2017-01-30T15:56:39.000532Z

also, thanks for taking the time to investigate this

Yehonathan Sharvit 2017-01-30T15:58:33.000534Z

NP

Yehonathan Sharvit 2017-01-30T15:58:42.000535Z

Your mikron looks very nice

Yehonathan Sharvit 2017-01-30T15:58:59.000536Z

I’m looking forward your interactive doc

Yehonathan Sharvit 2017-01-30T15:59:11.000537Z

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

moxaj 2017-01-30T16:03:08.000538Z

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

moxaj 2017-01-30T16:04:06.000539Z

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

moxaj 2017-01-30T16:05:12.000540Z

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

Yehonathan Sharvit 2017-01-30T16:05:47.000541Z

you never encountered this bug in regular cljs?

moxaj 2017-01-30T16:06:28.000542Z

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

moxaj 2017-01-30T16:06:47.000543Z

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

Yehonathan Sharvit 2017-01-30T16:07:14.000544Z

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

Yehonathan Sharvit 2017-01-30T16:07:28.000545Z

?

moxaj 2017-01-30T16:09:55.000546Z

may be the case

moxaj 2017-01-30T16:10:05.000547Z

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

Yehonathan Sharvit 2017-01-30T16:10:52.000548Z

I could try to update clojure.spec version

Yehonathan Sharvit 2017-01-30T16:11:13.000549Z

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

moxaj 2017-01-30T16:11:23.000550Z

alright

Yehonathan Sharvit 2017-01-30T16:11:48.000551Z

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

Yehonathan Sharvit 2017-01-30T16:12:37.000552Z

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

Yehonathan Sharvit 2017-01-30T16:12:39.000553Z

by setting

Yehonathan Sharvit 2017-01-30T16:13:30.000554Z

clojure_cached_macro_ns_regexp clojure_cached_ns_regexp in the klipse_settings

Yehonathan Sharvit 2017-01-30T16:13:47.000556Z

https://github.com/viebel/klipse#page-level-configuration

moxaj 2017-01-30T16:27:54.000559Z

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

moxaj 2017-01-30T16:28:44.000560Z

this is still in the browser client, btw

Yehonathan Sharvit 2017-01-30T19:55:49.000561Z

@moxaj I just deployed klipse version 6.6.1

Yehonathan Sharvit 2017-01-30T19:56:05.000562Z

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

Yehonathan Sharvit 2017-01-30T19:56:31.000563Z

You can check the klipse version in the browser console

Yehonathan Sharvit 2017-01-30T19:56:38.000564Z

you might need to clear your cache

moxaj 2017-01-30T19:57:05.000565Z

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

Yehonathan Sharvit 2017-01-30T19:58:53.000566Z

Good luck

Yehonathan Sharvit 2017-01-30T19:59:02.000567Z

Don’t surrender 😎

moxaj 2017-01-30T19:59:09.000568Z

state of the art println debugging

Yehonathan Sharvit 2017-01-30T19:59:27.000569Z

Yeah I’ve come thru this also...

Yehonathan Sharvit 2017-01-30T19:59:30.000570Z

Not fun