This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-05-08
Channels
- # announcements (14)
- # babashka (16)
- # beginners (15)
- # biff (15)
- # calva (48)
- # clj-kondo (42)
- # cljdoc (25)
- # clojure (18)
- # clojure-europe (75)
- # clojure-nl (1)
- # clojure-norway (19)
- # clojure-romania (1)
- # clojure-uk (10)
- # conjure (18)
- # core-typed (4)
- # cursive (16)
- # emacs (8)
- # fulcro (27)
- # graalvm (17)
- # honeysql (14)
- # hyperfiddle (9)
- # lsp (24)
- # missionary (5)
- # music (1)
- # nrepl (20)
- # off-topic (14)
- # re-frame (9)
- # reagent (34)
- # reitit (2)
- # releases (1)
- # shadow-cljs (19)
- # sql (16)
- # squint (9)
- # testing (2)
- # tools-build (10)
Is there a way to deal with eval-compile-warnings
when using the Shadow CLJS inspector? I am dealing with a case where a value is produced, but a warning is emitted due to external libraries causing warnings from the CLJS compiler.
From the browser console, I see
Uncaught Error: No matching clause: eval-compile-warnings
<anonymous> inspect.cljs:615
zB impl.cljs:306
IB grove.cljs:109
...
The function corresponds to inspect-eval-result!
it should be sufficient to (require 'helix.core) in any cljs namespace to trigger the compile warning
Any ideas why is my shadow nrepl not working? Details in the thread.
I start my build:
(:require
[shadow.cljs.devtools.api :as shadow-api]
[shadow.cljs.devtools.server :as shadow-server]
(shadow-server/start! {:cache-root ".shadow-cljs"
:http {:port 2345}
:nrepl {:port 2346
:middleware '[cider.nrepl/cider-middleware]}})
(shadow-api/watch {:build-id :my-app-build,
:target :browser,
:output-dir "build/frontend/my-app-build/js",
:modules
{:main
{:init-fn my-app-ns/main}}})
I get
shadow-cljs - server version: 2.28.3 running at
shadow-cljs - nREPL server started on port 2346
[:my-app-build] Configuring build.
[:my-app-build] Compiling ...
[:my-app-build] Build completed. (153 files, 60 compiled, 0 warnings, 5.08s)
:watching
I try to connect to nrepl via cider, the connection was refused. I checked out the ports
user> (-> (sh "netstat" "-tunlp") :out print)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.11:40169 0.0.0.0:* LISTEN -
tcp 0 0 :::1234 :::* LISTEN 1/java
tcp 0 0 ::ffff:127.0.0.1:42307 :::* LISTEN 1/java
tcp 0 0 :::2345 :::* LISTEN 1/java
tcp 0 0 ::ffff:127.0.0.1:2346 :::* LISTEN 1/java
tcp 0 0 ::ffff:127.0.0.1:46231 :::* LISTEN 1/java
udp 0 0 127.0.0.11:32960 0.0.0.0:* -
Shadow should be listening to port 2346. I can do (shadow-api/repl :my-app-build)
and it does work but since I am opening a repl inside a repl I don't get a nice REPL experience and I would like to connect to port 2346 so I get the usual repl experience. I checked out what shadow-api/repl
does under the hood and it seems like it doesn't use nrepl (`shadow-api/*nrepl-init*` is nil) and instead uses the runtime.are you still running inside a container? nrepl by default binds to localhost, which is probably not exposed in the container?
Yes, it's still in a container. The 2346 is exposed and I tried connecting to it from outside via cider and tried to do wget localhost:2346
to get some response but my attempts were rejected
I can't really help you with docker setups, way to many configuration options that I'm not familiar with
default is 127.0.0.1
, no idea why your above is listing 127.0.0.11
. maybe just failed to bind properly at all
I think it might be some docker thing, it's not bound to 1/java
0.0.0.0 host worked, thanks. It doesn't seem to be cljs repl but that's something I should check out in the docs before bothering you
it always starts CLJ. (shadow/repl :my-app-build)
will switch it to CLJS for that build
Aha, that's it. Thank you for the help.
I remember checking out cider preset, in essence it runs shadow/repl before display the repl screen