Fork me on GitHub
Yehonathan Sharvit10:02:19

Have u done something special in lumo to support macro implicit loading?

Yehonathan Sharvit10:02:49

@moxaj created a simple example that works fine in lumo but not in klipse

Yehonathan Sharvit11:02:04

I thought it was part of cljs 1.9.293

Yehonathan Sharvit11:02:20

Klipse is on 1.9.456 and yet it doesn鈥檛 work 馃槥


@viebel: I don't recall having done anything special for that to work

Yehonathan Sharvit15:02:58

Any idea what could make it not working in klipse?

Yehonathan Sharvit15:02:16

any special flag sent to the compiler?

Yehonathan Sharvit15:02:26

any trick around update current namespace?


@viebel: "not working" is simply not enough information for me to understand what's going wrong

Yehonathan Sharvit15:02:55

Here are the full details

Yehonathan Sharvit15:02:25

(ns klipse-test.a
  #?(:cljs (:require-macros [klipse-test.a])))

(defmacro x [sym]
  `(def ~sym 10))

Yehonathan Sharvit15:02:58

(ns klipse-test.b
  (:require [klipse-test.a :refer [x]]))

(x asdf)

Yehonathan Sharvit15:02:09

In lumo, it works fine

Yehonathan Sharvit15:02:23

(x asdf) calls the macro from klipse_test.a$macros

Yehonathan Sharvit15:02:01

but in klipse: (x asdf) calls the macro from klipse_test.a

Yehonathan Sharvit15:02:57


Yehonathan Sharvit15:02:17

while in lumo:

(function (){
klipse_test.b.asdf = (10);

Yehonathan Sharvit15:02:31

Is that enough information @anmonteiro ?

Yehonathan Sharvit15:02:04

for some reason, klipse doesn鈥檛 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


@viebel maybe you've cached some stuff and you should flush those


klipse is using 1.9.456


Just evaluate *clojurescript-version*

Yehonathan Sharvit16:02:31

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

Yehonathan Sharvit16:02:38

And it鈥檚 not the case!!!


not necessarily, this is very similar to what i've seen with lumo 1.0 (which used an earlier cljs)


(I mean the infinite loop)


it loaded the "macro" with the hidden args instead of the real macro

Yehonathan Sharvit16:02:09

what version of cljs was used by lumo 1.0?

Yehonathan Sharvit16:02:39

@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!topic/clojurescript/96RnUYnhq8E

Yehonathan Sharvit16:02:30

So why it doesn鈥檛 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

Yehonathan Sharvit16:02:10

What鈥檚 the official name of the 2nd thing?


I don't think it has been officially baptized

Yehonathan Sharvit16:02:27

I meant to ask: what is the commit that solves it?

Yehonathan Sharvit16:02:15

I鈥檓 talking about the 鈥淔urthermore鈥 part of

Yehonathan Sharvit16:02:35

>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*.


In lumo, should I use (.-argv js/process) to get the command line args?


Another question: I want to use cache with -K but the directory stays empty


I call it like this: lumo -K script.cljs /tmp/names/current