This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-04-12
Channels
- # announcements (76)
- # babashka (10)
- # beginners (39)
- # biff (2)
- # calva (51)
- # chlorine-clover (8)
- # cider (6)
- # clj-kondo (15)
- # clj-on-windows (13)
- # cljdoc (26)
- # cljs-dev (8)
- # clojure (196)
- # clojure-austin (17)
- # clojure-europe (36)
- # clojure-nl (4)
- # clojure-spec (8)
- # clojure-uk (2)
- # clojurescript (18)
- # community-development (4)
- # conjure (1)
- # core-typed (38)
- # cursive (5)
- # datalevin (17)
- # datomic (25)
- # docker (1)
- # events (2)
- # interop (2)
- # jobs (4)
- # kaocha (28)
- # lsp (22)
- # nyc (1)
- # off-topic (10)
- # pedestal (1)
- # portal (22)
- # re-frame (22)
- # react (10)
- # shadow-cljs (19)
- # spacemacs (7)
- # tools-deps (11)
- # vim (14)
- # xtdb (7)
A new release of Kaocha, featuring bug fixes for gc-profiling
and --watch
: https://github.com/lambdaisland/kaocha/releases/tag/v1.65.1029
I’m trying to get kaocha-cljs2 up and running, but after adding the dependency and :preloads
to my build config, figwheel fails with this message:
No such namespace: platform, could not locate platform.cljs, platform.cljc, or JavaScript source providing "platform" in file resources/public/js/dev/lambdaisland/funnel_client.cljs
3 [cognitect.transit :as transit]
4 [goog.object :as gobj]
5 [lambdaisland.funnel-client.random-id :as random-id]
6 [lambdaisland.funnel-client.websocket :as websocket]
7 [lambdaisland.glogi :as log]
8 [platform :as platform])
^---
Can you try after doing an npm install platform
or maybe "platform" :as platform
I'm just guessing here, not too sure about it
Well, the dependency is in the kaocha source somwhere (funnel client from the looks of it) so I can’t change the require. But I’ll try npm installing it
shadow automatically picks up npm modules, I'm not sure how it will work with figwheel though
Ok, so npm install platform
gave me a new error. Then I did npm install stacktrace-js
, and now figwheel compiles successfully. Those should probably be mentioned in the installation docs?
@U9MKYDN4Q did you find this repo? it contains a complete working example of kaocha-cljs2 https://github.com/plexus/cljs-test-example
these are the npm packages we install, agreed that this should be documented: https://github.com/plexus/cljs-test-example/blob/main/shadow-browser-kaocha-cljs2/package.json
Doc PRs would be super welcome, we never had the chance to properly polish this stuff up. I recently started this example repo so at a minimum people can look at a fully working example and copy bits over.
note that funnel-client has a deps.cljs
which mentions platform
, so depending on your cljs build tooling that should get pulled in automatically
You're in unexplored territory then. Adding : install-deps true
to your cljs config may help
Adding that installed the deps for me, but I still have runtime errors when I run the build.
I looked at the example repo. I see all the examples use shadow-cljs. I don’t know anything about shadow, so translating to my setup will involve rabbit holing into shadow which is a little out of scope right now 😅
yeah, there's a lot of details to be figured out when trying to get it to run with a specific tool. So far we've focused on shadow-cljs because kaocha-cljs2 was created with shadow in mind, the approach for kaocha-cljs does not work for shadow. If you have a fairly vanilla clojure compiler setup than kaocha-cljs might be a better fit, it's still supported, we use it on several projects as well.
The plan is to expand that repo with more examples, there's a lot of permutations of tool x runtime, I'll see if I can get a figwheel example going next