Thats weird @moxaj Klipse works fine with clojure.spec Take a look at http://blog.klipse.tech/clojure/2016/10/10/defn-args.html
I wonder what are u doing differently :thinking_face:
Klipse loads clojure.spec from the analysis cache.
@viebel hmm... for some reason, it tries to load spec from my domain
Can you copy/paste the klipse_settings from the source of the page?
@moxaj ?
and also the source of the dom element that does the require
where exactly is klipse_settings? can't find it
it should be somewhere at the end of the <body>
Thx @moxaj. Actually it will be more helpful if you share the whole html file
alright, sec
Thx @moxaj. I will look at it a bit later...
cool, thanks!
also, from the console log I see that it tries to evaluate my initial expression before loading all my sources
WARNING: Use of undeclared Var cljs.user/schema at line 1
, followed by a bunch of GET
requests
@moxaj I’m running your code snippets
and I’m getting a different error than yours:
#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}}}
@viebel funny, i'm just investigating that error
it seems to be a bug in the compiler, related to :parallel-build
what do u mean?
the compiler, for some reason, compiles math.cljc
twice
and the second time, when it encounters a var marked with ^:const
, it fails
but I haven't seen that error in this case, my investigation in completely separate from this issue
Do u know that when klipse compiles the code it doesn’t look at the compiler options?
And BTW, it will be easier for you to debug this issue using the klipse repl
I do not know anything about klipse's internals 🙂 how does it compile then?
it uses self-host cljs compiler
And it always becomes tricky when your library contains macro definitions
maybe the self hosted compiler uses the parallel functionality by default? no idea
but i'll take a look at the klipse repl
No parallel in self-host 🙂
I’ve prepared a snippet with your code and the external-libs
And there is a 1st draft of a guide for making a lib self-host compatible
https://github.com/viebel/klipse/wiki/How-to-make-a-clojure-library-self-host-compatible
I’d appreciate if you enrich this wiki page 😎
well, afaik, my code is self-host compatible, with regards to macros, but i'll double check
👍
also, thanks for taking the time to investigate this
NP
Your mikron
looks very nice
I’m looking forward your interactive doc
And also a bog post with interactive code snippets...
thanks! But the interactive doc will be relatively simple, don't expect rocket science 🙂
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
i'm completely puzzled now, either i'm doing something very wrong, or multiple bugs come crashing down on me
you never encountered this bug in regular cljs?
I think I did in the past few days, but it went away
I believe it was related to clojure.spec/keys*
maybe the problem is because klipse doesn’t use the latest clojure.spec version
?
may be the case
http://dev.clojure.org/jira/browse/CLJS-1653 may also be related, which was fixed in december
I could try to update clojure.spec version
But it won’t be until a couple of hours (I’m not home)
alright
Meanwhile you can try to take clojure.spec from gihub using external-libs
And to tell klipse not to look for clojure.spec in its cache folder
by setting
clojure_cached_macro_ns_regexp
clojure_cached_ns_regexp
in the klipse_settings
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
this is still in the browser client, btw
@moxaj I just deployed klipse version 6.6.1
with an updated cljs version 1.9.456 (including cljs.spec)
You can check the klipse version in the browser console
you might need to clear your cache
alright, I'll take a look soon! still figuring out that constant related error
Good luck
Don’t surrender 😎
state of the art println debugging
Yeah I’ve come thru this also...
Not fun