This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-02-01
Channels
- # aleph (71)
- # aws (1)
- # bangalore-clj (4)
- # beginners (36)
- # boot (153)
- # cider (23)
- # clara (9)
- # cljs-dev (67)
- # cljsjs (2)
- # cljsrn (22)
- # clojure (348)
- # clojure-argentina (4)
- # clojure-austin (12)
- # clojure-berlin (9)
- # clojure-dusseldorf (6)
- # clojure-france (4)
- # clojure-italy (4)
- # clojure-russia (358)
- # clojure-spain (2)
- # clojure-spec (28)
- # clojure-uk (109)
- # clojurescript (130)
- # core-typed (1)
- # cursive (35)
- # datascript (6)
- # datomic (18)
- # emacs (12)
- # hoplon (4)
- # klipse (64)
- # lein-figwheel (13)
- # leiningen (3)
- # luminus (4)
- # lumo (51)
- # mount (22)
- # off-topic (83)
- # om (22)
- # om-next (8)
- # onyx (3)
- # pedestal (8)
- # perun (6)
- # portland-or (2)
- # re-frame (50)
- # ring (8)
- # ring-swagger (5)
- # untangled (10)
- # yada (9)
Have u done something special in lumo to support macro implicit loading?
@moxaj created a simple example that works fine in lumo but not in klipse
I thought it was part of cljs 1.9.293
Klipse is on 1.9.456 and yet it doesn’t work 😞
@viebel: I don't recall having done anything special for that to work
hmmmm....
Any idea what could make it not working in klipse?
any special flag sent to the compiler?
any trick around update current namespace?
@viebel: "not working" is simply not enough information for me to understand what's going wrong
Here are the full details
(ns klipse-test.a
#?(:cljs (:require-macros [klipse-test.a])))
(defmacro x [sym]
`(def ~sym 10))
(ns klipse-test.b
(:require [klipse-test.a :refer [x]]))
(x asdf)
In lumo, it works fine
(x asdf)
calls the macro from klipse_test.a$macros
but in klipse: (x asdf)
calls the macro from klipse_test.a
goog.provide("klipse_test.b");
klipse_test.a.x.call(null,klipse_test.b.asdf);
while in lumo:
goog.provide("klipse_test.b");
(function (){
klipse_test.b.asdf = (10);
Is that enough information @anmonteiro ?
for some reason, klipse doesn’t understand that x
is a macro!
@viebel I still strongly suspect that klipse, somehow, is using an outdated cljs. Could you double double check it? ^^
Right. Can't say I know what's going wrong
klipse is using 1.9.456
Just evaluate *clojurescript-version*
This is really weird - because if klipse was for some reason an old cljs version (cached somewhere!!??!) then there would be an infinite loop of loading the macro namespace
And it’s not the case!!!
not necessarily, this is very similar to what i've seen with lumo 1.0 (which used an earlier cljs)
what version of cljs was used by lumo 1.0?
@anmonteiro implicit macro loading is a feature of 1.9.293 or 1.9.456?
I believe it's an earlier feature which was fixed for self-hosted in 1.9.293, see https://groups.google.com/forum/#!topic/clojurescript/96RnUYnhq8E
I think it is this commit https://github.com/clojure/clojurescript/commit/04751f337620279b0228856e4d224ae3d41abe72
So why it doesn’t work in lumo 1.0 ?
You're talking about 2 different thigs
Implicit macro loading has been around before 1.9.293
What 1.9.293 brought to self-hosted was the possibility of compiling the macro loop pattern
And that should work in Lumo 1.0.0
What’s the official name of the 2nd thing?
I don't think it has been officially baptized
I meant to ask: what is the commit that solves it?
I’m talking about the “Furthermore” part of
>Implicit macro loading: If a namespace is required or used, and that namespace itself requires or uses macros from its own namespace, then the macros will be implicitly required or used using the same specifications. *Furthermore, in this case, macro vars may be included in a :refer or :only spec*.