This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-10-24
Channels
- # aws (2)
- # babashka (27)
- # beginners (97)
- # calva (1)
- # cherry (12)
- # cider (6)
- # clara (12)
- # clj-kondo (24)
- # clj-on-windows (4)
- # cljfx (14)
- # clojure (54)
- # clojure-australia (3)
- # clojure-europe (26)
- # clojure-nl (1)
- # clojure-norway (4)
- # clojure-uk (9)
- # clojurescript (65)
- # conjure (5)
- # cursive (7)
- # datomic (18)
- # emacs (6)
- # helix (2)
- # honeysql (1)
- # jobs (1)
- # joyride (15)
- # kaocha (2)
- # lsp (10)
- # malli (5)
- # nbb (12)
- # observability (5)
- # off-topic (5)
- # reitit (2)
- # releases (4)
- # ring (1)
- # sci (17)
- # shadow-cljs (34)
- # testing (29)
- # tools-deps (45)
- # vim (7)
- # xtdb (6)
For a static site, there's a script to transform the root hiccup file to a public/index.html file. The asset
function is used to synchronously copy and generate a file name hash for uses like (asset "/img/logo.svg')
. The client-side app though is built with shadow, and was thinking of creating a similar asset
macro that uses Java to do the same thing. While it would work, it does mean duplicating the logic between JS and Java. In theory, could make it a bit better creating a single cljc file with some conditionals but not sure if that's feasible
$ npx nbb
Downloading dependencies...
Extracting dependencies...
Done.
Welcome to nbb v1.0.136!
user=> (require '[camel-snake-kebab.core :as csk])
"#error {:message \"Could not resolve symbol: defconversion\", :data {:type :sci/error, :line 49, :column 1, :message \"Could not resolve symbol: defconversion\", :sci.impl/callstack #object[cljs.core.Volatile {:val ({:line 49, :column 1, :ns #object[Oq camel-snake-kebab.core], :file \"/home/ray/qqq/.nbb/.cache/e4754d38932a5ba3dcbfe8a138680e6ec55900db/nbb-deps/camel_snake_kebab/core.cljc\"})}], :file \"/home/ray/qqq/.nbb/.cache/e4754d38932a5ba3dcbfe8a138680e6ec55900db/nbb-deps/camel_snake_kebab/core.cljc\", :phase \"analysis\"}, :cause #error {:message \"Could not resolve symbol: defconversion\", :data {:type :sci/error, :line nil, :column nil, :file \"/home/ray/qqq/.nbb/.cache/e4754d38932a5ba3dcbfe8a138680e6ec55900db/nbb-deps/camel_snake_kebab/core.cljc\", :phase \"analysis\"}}}"
user=>
it claims compatibility with bb
on the README but I guess there is more to do for nbb
? What can I advise the project?
@raymcdermott The issue is the loading of the macro: https://github.com/clj-commons/camel-snake-kebab/blob/ac08444c94aca4cba25d86f3b3faf36596809380/src/camel_snake_kebab/core.cljc#L6 Perhaps nbb should just load the .clj macro namespace there
oh it's .cljc, hmm, yeah, something to look into. can you make an issue perhaps? Can look later this week hopefully
#nbb: scripting for Clojure on Node.js
1.0.139
ā¢ https://github.com/babashka/nbb/issues/268: Fix :require-macros
(compatibility with https://github.com/clj-commons/camel-snake-kebab)
ā¢ https://github.com/babashka/nbb/issues/264: make load-file
auto-await
cc @raymcdermott
What is the idiomatic way to execute some logic when a clojure.test/is
assertion fails? For example, if https://github.com/babashka/nbb/blob/main/examples/playwright/example.cljs#L38 were a failing assertion, I would want to execute "test failed" logic e.g. taking a screenshot of the .page
at that time
Playwright throws exceptions when one of its commands fail, so those exceptions can be caught through a single catch
handler. Is there a catch
-equivalent for failed assertions?