This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-10-13
Channels
- # announcements (1)
- # babashka (30)
- # beginners (43)
- # biff (24)
- # calva (72)
- # cider (12)
- # clj-commons (24)
- # clj-on-windows (10)
- # cljsrn (23)
- # clojure (123)
- # clojure-bay-area (6)
- # clojure-europe (43)
- # clojure-losangeles (2)
- # clojure-nl (2)
- # clojure-uk (9)
- # clojurescript (125)
- # core-async (9)
- # cursive (2)
- # data-science (3)
- # datomic (30)
- # devops (1)
- # emacs (13)
- # events (5)
- # fulcro (15)
- # graalvm (3)
- # gratitude (1)
- # humbleui (11)
- # lsp (5)
- # nbb (24)
- # off-topic (11)
- # pedestal (5)
- # releases (1)
- # remote-jobs (1)
- # sci (15)
- # scittle (16)
- # shadow-cljs (15)
- # sql (11)
- # tools-deps (9)
- # xtdb (5)
Upgrading shadow makes my advanced #C029PTWD3HR build fail: https://app.circleci.com/pipelines/github/babashka/nbb/927/workflows/6eea853f-8a23-42ef-a52f-1a7674332379/jobs/833 Are there any known issues around this?
It seems to fail around here:
test/nbb/main_test.cljs
3: ["module" :refer [createRequire]]
31:(reset! nbb/ctx {:require (createRequire (path/resolve "script.cljs"))})
@U05224H0W 2.19.9 is the first version that stopped working for me https://github.com/thheller/shadow-cljs/blob/master/CHANGELOG.md#2199---2022-08-14
Running this should be sufficient: https://github.com/babashka/nbb/blob/f876bef6bb8170cdf7b8ce47a1f861c0308abf53/bb.edn#L87
bb ci:test
I wanted to get a clojurescript library that is set up to work with legacy figwheel and cljsjs to work with shadow-cljs but am running into an issue since the requires in the library are assuming the use of cljsjs:
(ns aerial.hanami.core
(:require
[cljs.core.async
:as async
:refer (<! >! put! chan)
:refer-macros [go go-loop]]
[clojure.string :as cljstr]
[com.rpl.specter :as sp]
[aerial.hanasu.client :as cli]
[aerial.hanasu.common :as com]
[aerial.hanami.md2hiccup :as m2h]
[aerial.hanami.common :as hc]
[aerial.hanami.templates :as ht]
;; Vega & Vega-Lite
[cljsjs.vega]
[cljsjs.vega-lite]
[cljsjs.vega-embed]
[cljsjs.vega-tooltip] .....
I was wondering is there some recommended way to have the library require the code from the npm dependency instead if it is present? So the last few requires would change to:
[vega]
[vega-lite]
[vega-embed]
[vega-tooltip]
I tried changing everything over to use cljsjs, because I presumed that cljsjs dependencies still work with shadow-cljs:
https://github.com/jointprob/hanami-shadow-cljs/commit/ddf3bfe3aa99992ea8305f8a3d8100c2d89a74c0
But now get an error about react-dom being missing thought it is included as as cljsjs dependency:
[:hanami] Build failure:
The required namespace "react-dom" is not available, it was required by "reagent/dom.cljs".If I fetch the dependencies using both cljsjs and npm: https://github.com/jointprob/hanami-shadow-cljs/commit/c85482079cb596d803531773295f0f04fb7d8244 Then I get the error: react-dom.development.js:22840 Uncaught ReferenceError: vegaLite is not defined Which is getting called from here: https://github.com/jsa-aerial/hanami/blob/master/src/cljs/aerial/hanami/core.cljs#L379
the migration path is described here https://shadow-cljs.github.io/docs/UsersGuide.html#cljsjs