This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-06-20
Channels
- # ai (4)
- # aleph (1)
- # babashka (127)
- # beginners (89)
- # calva (44)
- # cider (22)
- # clerk (74)
- # clj-commons (5)
- # clj-kondo (3)
- # cljs-dev (51)
- # clojure (117)
- # clojure-europe (22)
- # clojure-nl (2)
- # clojure-norway (100)
- # clojure-uk (2)
- # clojurescript (64)
- # data-science (26)
- # datalevin (3)
- # datascript (2)
- # emacs (10)
- # events (5)
- # figwheel-main (12)
- # helix (2)
- # honeysql (15)
- # hoplon (3)
- # jobs-discuss (32)
- # malli (3)
- # polylith (3)
- # re-frame (2)
- # reitit (15)
- # releases (2)
- # sci (14)
- # shadow-cljs (14)
- # specter (2)
- # tools-build (7)
- # xtdb (16)
Hi all, I just cloned clerk-demo, started it per the instructions in the README, and I’m getting an error screen. Any ideas on what’s going wrong?
I’m pretty confused as to why this is happening (and why I hadn’t seen this before). https://github.com/nextjournal/clerk/blob/4f41d6782ee453970e13a03b8257e6134820c33c/src/nextjournal/clerk/webserver.clj#L257 where the exception occurs. It works if I comment out the future
call. It also fails with an empty (future)
call. Anyone else have an idea on things I could try?
can also repro it with just the clerk
repo and it seems to be related to running with -M
:
this fails:
mk@mkstudio ~/d/clerk (main)> clj -M:nextjournal/clerk nextjournal.clerk/serve! --browse
Clerk webserver started on ...
this works:
mk@mkstudio ~/d/clerk (main)> clj -X:nextjournal/clerk nextjournal.clerk/serve! :browse true
Clerk webserver started on ...
Clerk evaluated 'file:/Users/mk/dev/clerk/src/nextjournal/clerk/home.clj' in 2144.897625ms.
@jkrasnay you can use clj -X:nextjournal/clerk nextjournal.clerk/serve! :watch-paths '["notebooks"]' :port 7777 :browse true
as an alternative startup command that works until we figure out why the -M
invocation from the readme is broken.
@borkdude do you maybe have an idea? We get this error regarding agents when we start via -M
(and babashka cli) but it works with -X
.
@U5H74UNSF So just run clj -M:nextjournal/clerk nextjournal.clerk/serve! --browse
on clerk and then I should see an error?
What I'm seeing is:
clj -M:nextjournal/clerk nextjournal.clerk/serve! --browse
Clerk webserver started on ...
> Unhandled java.util.concurrent.RejectedExecutionException > Task java.util.concurrent.FutureTask@78d3d660[Not completed, task = clojure.core$binding_conveyor_fn$fn__5823@6a9a4b8c] rejected from java.util.concurrent.ThreadPoolExecutor@2f6867d1[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]
storage.clerk.garden/nextjournal/clerk-assets@3Y9hSHm7RtAcnVHB3dfLn3raLZM1/viewer.js?immutable=true:1 Failed to load resource: the server responded with a status of 404 ()
'nextjournal.clerk.home:425 Uncaught ReferenceError: nextjournal is not defined
at 'nextjournal.clerk.home:425:609
maybe I'm misunderstanding btw. if you --browse, what is the normal behavior, should the JVM exit?
ok. I think if you would install clerk as a -T it would probably give the same problem
right, this is the shit with CLI functions, you can't always re-use them as composable functions
did anything change recently regarding this? Wondering why we never ran into it until now
I'd expect so, but I'm trying:
clj -T nextjournal.clerk/serve! :browse true
and it doesn't exitthe other thing also didn’t exit, maybe because it starts daemon threads in the meantime?
aha:
* **1.10.3.933 on July 28, 2021**
* **TDEPS-198 - on -X, don't use System/exit or shutdown-agents (but don't let agent threads block exit)**
* 1.10.3.929 on July 21, 2021
* 1.10.3.912 on July 15, 2021
* On -X success, exit with (shutdown-agents) instead of System/exit
which I'm now trying to implement. But using a local/root dep changes the deps.edn so I can't just launch it
Updated https://github.com/nextjournal/clerk/pull/520: the only change is upgrading babashka.cli
@jkrasnay fixed thanks to @borkdude now, see https://github.com/nextjournal/clerk-demo/commit/161ccde33e275676246ce1f51fb9c55c3cc8e5d6
~/ws/clerk-demo [main]
λ java -version
openjdk version "11.0.15" 2022-04-19
OpenJDK Runtime Environment Temurin-11.0.15+10 (build 11.0.15+10)
OpenJDK 64-Bit Server VM Temurin-11.0.15+10 (build 11.0.15+10, mixed mode)
~/ws/clerk-demo [main]
λ clojure -version
Clojure CLI version 1.11.1.1273
I’m pretty confused as to why this is happening (and why I hadn’t seen this before). https://github.com/nextjournal/clerk/blob/4f41d6782ee453970e13a03b8257e6134820c33c/src/nextjournal/clerk/webserver.clj#L257 where the exception occurs. It works if I comment out the future
call. It also fails with an empty (future)
call. Anyone else have an idea on things I could try?
@jkrasnay you can use clj -X:nextjournal/clerk nextjournal.clerk/serve! :watch-paths '["notebooks"]' :port 7777 :browse true
as an alternative startup command that works until we figure out why the -M
invocation from the readme is broken.