Fork me on GitHub
#shadow-cljs
<
2019-06-03
>
lxsameer14:06:34

hey folks, beside environment variables, I'm looking for a solution to set a value for both clj and cljs per build basis. Any suggestion ?

thheller18:06:58

@lxsameer what kind of value do you mean?

lxsameer18:06:48

a string , currently I'm using env variables , but i was wondering if there is a better way through shadowcljs

thheller18:06:32

I meant what do you want to do with it?

thheller18:06:43

why do you need it accessible in CLJ?

thheller18:06:47

in a macro?

lxsameer18:06:36

yupe, based on that value i load a different edn file and feed some part of it to cljs

thheller19:06:00

there is no clean way to do this. why do you need to load it at compile time?

thheller19:06:43

I mean there are a couple of ways to do this. just none of them are "clean"

thheller19:06:00

so if you can avoid it at all you should 😛

lxsameer19:06:25

thanks man 😉

Piotr Roterski22:06:08

Hey, clojurians! 👋 Anyone had luck with getting shadow-cljs to work with kee-frame in luminus generated app? An app generated with lein new luminus demo-app +kee-frame +shadow-cljs when running lein shadow watch app throws:

------ ERROR -------------------------------------------------------------------
 File: jar:file:/Users/pk/.m2/repository/thheller/shadow-cljs/2.8.37/shadow-cljs-2.8.37.jar!/shadow/cljs/devtools/client/hud.cljs:1:1
--------------------------------------------------------------------------------

   1 | (ns shadow.cljs.devtools.client.hud
-------^------------------------------------------------------------------------
Invalid :refer, var cljs.core.async/go does not exist
--------------------------------------------------------------------------------
   2 |   (:require
   3 |     [shadow.dom :as dom]
   4 |     [shadow.xhr :as xhr]
   5 |     [shadow.animate :as anim]
--------------------------------------------------------------------------------
the error happens deep inside shadow-cljs lib. I'm new to clojure so I'm not sure how to approach this - do I have any chance of debugging this or should I just try different lib/versions?

thheller06:06:33

this is caused by having an old core.async version on the classpath

thheller07:06:01

make sure its [org.clojure/core.async "0.4.490"] or higher

Piotr Roterski00:06:09

That was it! I added core.async to kee-frame exclusions and as a separate dep in project.clj:

[kee-frame "0.3.3" :exclusions [metosin/reitit-core org.clojure/core.async]]
[org.clojure/core.async "0.4.490"]
and it worked! Thank you!!

lilactown23:06:11

@pt.roterski I'm guessing it's pulling in an old version of ClojureScript. verifying...

Piotr Roterski23:06:56

Thanks for reply! It's [org.clojure/clojurescript "1.10.520" :scope "provided"] in generated project.clj which, according to https://clojurescript.org/ , is the current version.

Nolan23:06:15

Has anyone run into issues running browser targets on ie10 and below? Runs great elsewhere. The console shows:

shadow-cljs - failed to load 15
shadow-cljs - failed to load 20
SCRIPT5009: 'Set' is undefined
SCRIPT5009: '<primary ns>' is undefined
Can’t be sure if this is specific to Shadow or not and haven’t done much digging quite yet, but curious if anyone has seen this.

Nolan23:06:59

Would also be interested in ideas around where to begin debugging the failed to load <#> console warnings

Nolan23:06:00

ie11 seems great. this is output from [email protected]