lumo icon indicating copy to clipboard operation
lumo copied to clipboard

Can't require cljs.edn on lumo?

Open JulianBirch opened this issue 7 years ago • 5 comments

Apologies if this is in error, but I got the following bug report and I'm not sure what's causing it:

https://github.com/JulianBirch/cljs-ajax/issues/213

Steps to reproduce are:

deps.edn:

{:deps {cljs-ajax {:mvn/version "0.7.3"}}}

$ lumo -c $(clojure -Srepro -Spath) -e "(require '[ajax.core])"

and you end up with cljs.edn being not found. Works in regular clojurescript.

JulianBirch avatar Jul 22 '18 09:07 JulianBirch

@JulianBirch what is cljs.edn in this context? The ClojureScript compiler doesn't ship with that namespace

anmonteiro avatar Jul 22 '18 11:07 anmonteiro

Huh. It used to be the namespace for the EDN format. I wonder why it's being found normally...

JulianBirch avatar Jul 22 '18 13:07 JulianBirch

I'm not sure cljs.edn ever existed. There's cljs.reader. Unless there's some kind of weird transformation going on trying to convert clojure.edn to cljs.edn via automatic clojure.* -> cljs.* aliasing.

This last case would most likely mean that there's a namespace somewhere that is not compatible with self-host ClojureScript (maybe a macros namespace?).

anmonteiro avatar Jul 22 '18 13:07 anmonteiro

Okay, now I'm fairly perplexed, sorry, I should have gone over the code before but... the code doesn't even reference this namespace? https://github.com/JulianBirch/cljs-ajax/blob/master/src/ajax/edn.cljc

(As you can see, clojure.edn is referenced, but it's in a reader macro so shouldn't be a problem.)

Macros may be a problem somewhere.

JulianBirch avatar Jul 22 '18 18:07 JulianBirch

Is this still a problem?

There is clojure.edn and cljs.reader which offer the same set of feature. However the ClojureScript compiler usually tries to see if for a clojure.x there is a cljs.x.

I have not investigated further but if there is a problem it might be worth checking if you are able to reproduce with JVM ClojureScript

arichiardi avatar Nov 18 '18 23:11 arichiardi