This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-11-02
Channels
- # announcements (2)
- # babashka (10)
- # beginners (61)
- # calva (17)
- # cider (27)
- # clj-kondo (14)
- # clojure (230)
- # clojure-austin (4)
- # clojure-europe (17)
- # clojure-france (6)
- # clojure-hungary (3)
- # clojure-norway (30)
- # clojure-sweden (9)
- # clojure-uk (2)
- # clojurescript (58)
- # conjure (11)
- # core-async (7)
- # cursive (74)
- # datalog (2)
- # datomic (15)
- # events (8)
- # figwheel-main (5)
- # fulcro (2)
- # graalvm (23)
- # graphql (2)
- # helix (17)
- # humbleui (2)
- # jobs (2)
- # kaocha (6)
- # lsp (19)
- # malli (7)
- # nbb (51)
- # off-topic (33)
- # pathom (26)
- # pedestal (2)
- # polylith (1)
- # portal (4)
- # re-frame (17)
- # react (3)
- # reitit (5)
- # releases (2)
- # remote-jobs (2)
- # shadow-cljs (18)
- # sql (65)
- # tools-deps (8)
- # xtdb (28)
I'm assuming these instructions are out of date? https://github.com/babashka/nbb/tree/main/examples/metosin-malli and that :git/url
is the correct approach?
@U04V15CAJ. https://github.com/babashka/nbb/pull/271. That took longer than expected. Didn't work with :mvn/version
of metosin/malli
. Thought may it required git/url
so spent some time until I found deps-info-infer
to make sure I was on the latest and instructions were easy and up to date, didn't work either. Then noticed borkdude/malli
. Still didn't work. Finally noticed that there is a regression in 1.0.140 of nbb
. Rant over. 😅
@U03B2SRNYTY Why didn't :mvn/version
work? It should nowadays with nbb.edn
The error is
npx nbb example.cljs main !2 ?2 INT ✘ 13:49:30
Downloading dependencies...
Extracting dependencies...
Done.
----- Error --------------------------------------
Message: Maximum call stack size exceeded
Location: /Users/dmg46664/projects/nbb/examples/metosin-malli/.nbb/.cache/e8c9d0550fbae91f6ce4d0b0519a4237ad4f512d/nbb-deps/malli/core.cljc:1905:79
----- Context ------------------------------------
1901: (-regex-op? [_] true)
1902: (-regex-validator [this] (re-validator properties (-vmap (fn [[k _ s]] [k (-regex-validator s)]) (-children this))))
1903: (-regex-explainer [this path]
1904: (re-explainer properties (-vmap (fn [[k _ s]] [k (-regex-explainer s (conj path k))]) (-children this))))
1905: (-regex-parser [this] (re-parser properties (-vmap (fn [[k _ s]] [k (-regex-parser s)]) (-children this))))
^--- Maximum call stack size exceeded
1906: (-regex-unparser [this] (re-unparser properties (-vmap (fn [[k _ s]] [k (-regex-unparser s)]) (-children this))))
1907: (-regex-transformer [this transformer method options]
1908: (re-transformer properties (-vmap (fn [[k _ s]] [k (-regex-transformer s transformer method options)]) (-children this))))
1909: (-regex-min-max [this] (re-min-max properties (-children this))))))))
1910:
----- Stack trace --------------------------------
malli.core/-regex-parser - /Users/dmg46664/projects/nbb/examples/metosin-malli/.nbb/.cache/e8c9d0550fbae91f6ce4d0b0519a4237ad4f512d/nbb-deps/malli/core.cljc:80:1
malli.core - /Users/dmg46664/projects/nbb/examples/metosin-malli/.nbb/.cache/e8c9d0550fbae91f6ce4d0b0519a4237ad4f512d/nbb-deps/malli/core.cljc:1905:79
clojure.core/into - <built-in>
malli.impl.util/-vmap - /Users/dmg46664/projects/nbb/examples/metosin-malli/.nbb/.cache/e8c9d0550fbae91f6ce4d0b0519a4237ad4f512d/nbb-deps/malli/impl/util.cljc:22:11
malli.impl.util/-vmap - /Users/dmg46664/projects/nbb/examples/metosin-malli/.nbb/.cache/e8c9d0550fbae91f6ce4d0b0519a4237ad4f512d/nbb-deps/malli/impl/util.cljc:20:1
...
malli.core/parse - /Users/dmg46664/projects/nbb/examples/metosin-malli/.nbb/.cache/e8c9d0550fbae91f6ce4d0b0519a4237ad4f512d/nbb-deps/malli/core.cljc:2103:4
malli.core/parse - /Users/dmg46664/projects/nbb/examples/metosin-malli/.nbb/.cache/e8c9d0550fbae91f6ce4d0b0519a4237ad4f512d/nbb-deps/malli/core.cljc:2099:1
example - /Users/dmg46664/projects/nbb/examples/metosin-malli/example.cljs:5:2
clojure.core/prn - <built-in>
example - /Users/dmg46664/projects/nbb/examples/metosin-malli/example.cljs:4:1
It might have...
re mvn, I actually stopped testing when I got it working. Didn't know the reason for borkdude/malli
ok, didn't know
So the instruction can be simplified then to the mvn version.
... and I figured out deps-info
along the way 😆
I'll change that.
installing #C03KCV7TM6F would be a better suggestion, since that uses that lower level library: neil dep add metosin/malli --latest-sha true
but I think it should just be an nbb.edn with the mvn/version anyway, so we can leave this out
Pushed the correction.
Curious re your experiments...
ah no my bad, I was on a ^...
version so it was still using 1.0.140 - the version before that worked. I'll dig deeper
neil
has a --dry-run
it seems. Assuming it didn't was why I passed it over. Cheers.
... and why is it called neil? :thinking_face:
It's explained in this blog post: https://blog.michielborkent.nl/new-clojure-project-quickstart.html
I found the commit that introduced the stackoverflow for malli: https://github.com/babashka/sci/commit/edefeda9e6038ab8eb918377dd09ec96f9c73219 Now I still need to found out why
Check out prev version. overlay code difference. revert one chunk at a time and run until it breaks? (I meant or doesn't break)
I found the offending bit:
'type (copy-var type #_sci.impl.types/type-impl clojure-core-ns {:name 'type})
The change to type
causes the stackoverflowThis part in type-impl
causes a loop somehow:
(when (#?(:clj instance?
:cljs implements?) sci.impl.types.IReified x)
:sci.impl.protocols/reified)
I still don't understand why thoughWell done 🙌 sounded gnarly. Will do, might take a little while.
@U04V15CAJ I was just thinking, this wasn't caught because the version of nbb is hard coded in the examples. Can Neil update the examples to the last published version of nbb?
I guess a lot of deps could be updated, but you don't want it to break based on other projects.
Just thinking out loud 😅
oh wait, nbb version is in package.json - neil doesn't support this, but npm does: npm install nbb@latest
but it's better to add a test with the development version of nbb since the version in development isn't on npm yet
I guess one could npm install the build version.