This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-05-29
Channels
- # announcements (6)
- # babashka-sci-dev (15)
- # beginners (46)
- # calva (1)
- # clj-kondo (1)
- # clojure-australia (2)
- # clojure-europe (10)
- # clojure-uk (4)
- # clojured (3)
- # clojurescript (16)
- # fulcro (6)
- # helix (1)
- # hyperfiddle (8)
- # instaparse (28)
- # joyride (33)
- # malli (17)
- # off-topic (13)
- # pedestal (3)
- # portal (5)
- # react (1)
- # sci (1)
- # sql (6)
- # vim (1)
NB: the evaluateCode()
function now has moved to repl.evaluateCode()
. (Though for now it is also available in its old place as well.) See updated API docs: https://calva.io/api/
I've added an example utility library for the Calva API here: https://github.com/BetterThanTomorrow/joyride/tree/master/examples/.joyride/scripts/z_joylib Including it as a text snippet here as well.
I need some help here, @borkdude ! 😃 https://github.com/BetterThanTomorrow/joyride/pull/72
@U0ETXRFEW I think i got it, commented on Github my solution 🙂
Yep, I think @U3Y18N0UC nailed it
I got the refer working, very similar to your solution, @U3Y18N0UC. Mixed and match a bit from nbb and the example.
@U0ETXRFEW I don't think you need apply
here:
(apply gobject/getValueByKeys exports path)
But you need to pass an array in that case. For this you can use:
(.split module-name ".")
Cool. I'll try it. Then we should fix that where I picked this apply up as well, probably. 😃
Your OCD should have triggered when you wrote this: https://github.com/BetterThanTomorrow/joyride/blob/0db51d7298ef68536dd7157424a3ec19c02053a9/src/joyride/repl_utils.cljs#L48 😃
I also fixed a potential overwrite when requires might refer to something named the same as the module/namespace.
Contrived:
["betterthantomorrow.calva" :as calva-ns :refer [v0]]
["betterthantomorrow.calva$v0" :as calva-js :refer [v0 repl ranges]]
@U0ETXRFEW So what is the problem with the above? Yes, you get refer conflicts, but that is expected?
["betterthantomorrow.calva$v0" :as calva-js :refer [v0 repl ranges]]
The v0
in refer here is unexpected, since you already went into the v0
property with $v0
You should probably write that as:
["betterthantomorrow.calva$v0" :as v0 :refer [repl ranges]]