This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-10-27
Channels
- # announcements (10)
- # beginners (95)
- # biff (2)
- # calva (33)
- # cherry (1)
- # clj-kondo (16)
- # clojure (96)
- # clojure-australia (1)
- # clojure-china (1)
- # clojure-europe (42)
- # clojure-filipino (1)
- # clojure-france (2)
- # clojure-hk (1)
- # clojure-indonesia (1)
- # clojure-japan (1)
- # clojure-korea (1)
- # clojure-my (1)
- # clojure-nl (1)
- # clojure-norway (24)
- # clojure-sg (11)
- # clojure-taiwan (1)
- # clojure-uk (1)
- # clojurescript (21)
- # cursive (22)
- # data-science (3)
- # events (7)
- # fulcro (3)
- # graalvm (4)
- # gratitude (6)
- # helix (11)
- # honeysql (7)
- # hoplon (1)
- # introduce-yourself (1)
- # jobs (2)
- # jobs-discuss (16)
- # lsp (15)
- # malli (14)
- # nbb (73)
- # practicalli (3)
- # reagent (8)
- # reitit (5)
- # releases (1)
- # ring (5)
- # rum (3)
- # sci (17)
- # scittle (7)
- # shadow-cljs (22)
- # tools-deps (26)
- # xtdb (9)
Did anybody manage to make sente (https://github.com/ptaoussanis/sente) run on nbb? I tried to add it to nbb.edn, but I'm getting "Message: Could not find namespace: taoensso.sente"
I created an nbb.edn with
{:deps {com.taoensso/sente {:mvn/version "1.17.0"}}
in it.
and what program have you tried to load sente? what invocation of nbb? which nbb version?
Oh thanks for asking, I just noticed that I still had 0.6.something globally! Apparently that was before nbb.edn support. Now it starts downloading the deps and fails with: ... Extracting dependencies... Done. ----- Error -------------------------------------- Message: Could not resolve symbol: sci.impl.records/pop Phase: analysis Could not resolve symbol: sci.impl.records/pop
I was just eyeballing http://socket.io when I thought about using sente instead.
Thanks 🙂
I have a repro:
$ npx nbb -e "(deftype RingBuffer [head tail] Object (pop [_]))"
----- Error --------------------------------------
Message: Could not resolve symbol: sci.impl.records/pop
Phase: analysis
Could not resolve symbol: sci.impl.records/pop
This code is a bit unexpected, but it's coming from core.asyncwhich won't work in nbb anyway, so I recommend going with http://socket.io for now
Ah, okay. Thanks for looking into it so quickly! 🙂
created an issue for it here: https://github.com/babashka/sci/issues/825
Command failed: bb --config .nbb/.cache/e4754d38932a5ba3dcbfe8a138680e6ec55900db/deps.edn uberjar .nbb/.cache/e4754d38932a5ba3dcbfe8a138680e6ec55900db/nbb-deps.jar
/bin/sh: bb: command not found
@raymcdermott nbb uses bb to fetch and unpack deps
or rather, it should only do that. it has always used bb
to implement this functionality
@raymcdermott What is probably a better idea: build the stuff in ubuntu or so image, then copy the extra .nbb directory into the aws/nodejs image
FROM scratch
ADD x86_64/0ee8b806ca44bee5a42222fb47b16dadc2bb0dde923e3ff961470a962ed7c2f6.tar.xz /
ADD x86_64/19706c75fe373a1651ae22a9af06bf3274c0190f46e2fa6b106a231bad8de6b0.tar.xz /
ADD x86_64/7a57b3bce00897c83ba301363e8f370e1655f988a17199ee04023dcd37f59676.tar.xz /
ADD x86_64/a3fc3f66d5a4f8467b57b5c39cd29b5835ca16ba4a227811cbf77ea06465fdc0.tar.xz /
ADD x86_64/d0f9563470ad687f4b3d0d7a464d8a1a8a360d8eda0a21a50873d21b58c1da69.tar.xz /
ADD x86_64/fa13b472ae60f71418c7d4421b0c194d8a82bb6c8808b021d8bbff254f936dd7.tar.xz /
my earlier suggestion was: Do the deps stuff in an ubuntu image, then copy the files to the aws container. E.g. like here: https://github.com/babashka/babashka/blob/9de689c62360c964b0b476302eaae5c0ede9e772/Dockerfile.alpine#L28
@raymcdermott maybe just using node:19
or node:19-slim
is just better than all of this dancing. bit fatter images but more peace of mind
the aws one is waaay to minimal, less than alpine. quite a thing to install anything let alone bb
yeah can use node:19 as a builder stage
It’s all to allow nbb.edn so I might just drop the dependency. I’ll try with your suggested image as a final attempt.
@raymcdermott if it's just one dependency, you could also just git clone that dependency and add the directory of that dependency to the nbb classpath
@raymcdermott or add {:paths ["../foobar/dep/src"]}
in nbb.edn (should probably also work, without bb)
@raymcdermott This could also be interesting: https://github.com/babashka/nbb/tree/main/doc/bundle
Downloading dependencies...
Clojure tools not yet in expected location: /root/.deps.clj/1.11.1.1165/ClojureTools/clojure-tools-1.11.1.1165.jar
Downloading to /root/.deps.clj/1.11.1.1165/ClojureTools
Successfully installed clojure tools!
Downloading: org/clojure/clojure/1.11.1/clojure-1.11.1.pom from central
Downloading: camel-snake-kebab/camel-snake-kebab/0.4.3/camel-snake-kebab-0.4.3.pom from clojars
Downloading: org/clojure/spec.alpha/0.3.218/spec.alpha-0.3.218.pom from central
Downloading: org/clojure/core.specs.alpha/0.2.62/core.specs.alpha-0.2.62.pom from central
Downloading: org/clojure/pom.contrib/1.1.0/pom.contrib-1.1.0.pom from central
Downloading: org/clojure/clojure/1.11.1/clojure-1.11.1.jar from central
Downloading: org/clojure/core.specs.alpha/0.2.62/core.specs.alpha-0.2.62.jar from central
Downloading: org/clojure/spec.alpha/0.3.218/spec.alpha-0.3.218.jar from central
Downloading: camel-snake-kebab/camel-snake-kebab/0.4.3/camel-snake-kebab-0.4.3.jar from clojars
Extracting dependencies...
Done.
----- Error --------------------------------------
Message: Could not resolve symbol: data-definition
Phase: analysis
Could not resolve symbol: data-definition