This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-01-31
Channels
- # architecture (5)
- # beginners (35)
- # boot (150)
- # cider (1)
- # clara (7)
- # cljs-dev (131)
- # cljsrn (10)
- # clojure (76)
- # clojure-austin (3)
- # clojure-berlin (1)
- # clojure-brasil (1)
- # clojure-chicago (2)
- # clojure-dusseldorf (1)
- # clojure-italy (30)
- # clojure-nl (2)
- # clojure-russia (40)
- # clojure-serbia (2)
- # clojure-spec (25)
- # clojure-uk (13)
- # clojured (2)
- # clojurescript (106)
- # core-async (29)
- # datascript (65)
- # datomic (38)
- # emacs (8)
- # funcool (8)
- # hoplon (6)
- # jobs (3)
- # klipse (93)
- # luminus (16)
- # lumo (4)
- # off-topic (2)
- # om (11)
- # onyx (13)
- # pedestal (4)
- # protorepl (3)
- # re-frame (40)
- # reagent (31)
- # ring (6)
- # ring-swagger (4)
- # slack-help (5)
- # spacemacs (13)
- # untangled (17)
- # vim (2)
I’ve deployed a fix to clojure.spec just now
Please make sure you get klipse version 6.6.2
Freezes forever?
Nothing printed in the console?
Try to add verbose=1 url param
Can u send me the url for your code in klipse repl?
this is my url: http://app.klipse.tech/?external-libs=[https://raw.githubusercontent.com/moxaj/mikron/master/src/cljc]&verbose=1
If you press ctr-s you will get a url that contains your source code
(the error you got is ok. No clojure. Spec but cljs.spec The compiler tries clojure.spec and then cljs.spec)
I think it is also on the console
And also you can do ctrl-r
There is an infinite loop
Loading mikron.compile-util macros namespace
Any idea why?
I think that this is the problem
(ns mikron.compile-util
"Compile time utility functions."
#?(:cljs (:require-macros [mikron.compile-util])))
In self-host cljs, reader conditionals always branch to :cljs
because when you require-macros
in regular cljs, it will branch to :clj
You’re right
What I meant is a bit different
1. (require mikron.compile-util) => loads the code with :cljs branch
2. in the :cljs branch there is a (:require-macros [mikron.compile-util])
3. (:require-macros [mikron.compile-util]) => loads the code with :clj branch in regular clojure and :cljs branch in self-host
makes sense?
because require-macros in regular cljs takes the :clj branch
You’re welcome to add it
I think that the simples solution is to use a namespace with a slighly different name for the macros
something like mikron.compile-util.macros
and put it in a .clj
file with no reader conditionals
This is the trick that is done in cljs.spec
and cljs.core.async
I think
And also this might help: https://github.com/cgrand/macrovich
(Actually there is a word about it in the wiki page: https://github.com/viebel/klipse/wiki/How-to-make-a-clojure-library-self-host-compatible#reader-conditionals
But I agree with you that should be more emphasized
Feel free to edit the wiki page to make it 100% clear
I would even say explicitely that it will cause an infinite loop
what do u mean?
if I remove the self-`require-macros` and use require-macros
explicitly in the dependent namespaces, it would work
that sounds like a good idea
I already have a few separate -macro
namespaces, but that's only for the case when I'd like to use a macro in the same namespace (which I cannot do)
@viebel let me ask, does klipse use lumo
< 1.1
or clojurescript < 1.9.456
for the compilation?
klipse uses lumo 1.1.0
for generating the analysis cache
at least this is how it is supposed to be
but maybe a couple of namespaces have not been properly recompiled
when I upgraded lumo
Why are u asking this question?
so now i'll load my project in lumo, and if it works, then you are probably using outdated deps
I cannot wait...
But I have to go to sleep now
Feel free to write all your discoveries in this channel
I’ll read them - with pleasure - when I wake up
Not at all @moxaj
I’m really happy that you don’t give up on the way to make your (cool) lib self-host compatible
When you’ll be done you will be very happy