Fork me on GitHub
#cider
<
2023-10-09
>
practicalli-johnny10:10:41

When evaluating ClojureScript code in the source code buffer, the inline results are not being displayed. This seems only to affect clojurescript-mode, as inline evaluation results are displaying in clojure-mode. I am using cider jack-in to start a Clojure CLI repl, using the following .dir-locals.el file

((clojurescript-mode . ((cider-preferred-build-tool          . clojure-cli)
                        (cider-clojure-cli-aliases           . ":figwheel/env")
                        (cider-default-cljs-repl             . figwheel-main)
                        (cider-figwheel-main-default-options . "dev")
                        (cider-repl-display-help-banner      . nil))))
Are there any configuration changes that could make this happen? I'm fairly sure this happen recently, I'll try earlier package versions to see if I can tell when it started occurring. I am using CIDER 1.8.0-snapshot (package: 20231009.804) with Emacs 30 (native compilation, built from source on Linux)

vemv10:10:59

I could eye this in a bit Do the *nrepl-messages* logs say anything interesting? (remember there's one for cljs specifically)

practicalli-johnny10:10:39

I think the problem is the cljs repl is not starting. Using sesman-browse its only showing the clj repl I believe. If that is so, then its no wonder eval is not working :)

1: practicalli/practicalli.github.io:localhost:43611
      linked-to: proj(~/projects/practicalli/practicalli.github.io/)  
        objects: *cider-repl %s(clj)*  
I'll try a few different ways to start the REPL...

vemv10:10:25

if it helps, I published https://github.com/reducecombine/fig-main yesterday for another problem (now fixed) It's npm install and then cider-jack-in-cljs

practicalli-johnny10:10:53

Sorry, I think this was user error, as I have it working now. I think I was selecting jack-in-clj and not jack-in-cljs so that would explain why there was a clj repl and not a cljs repl facepalm Someone else was reporting in the #C09C8GRLY channel of the same issue, so I jumped to conclusions a bit too quickly... I do wish to figure out how to run a ClojureScript REPL on the command line with an appropriate nrepl connection and connect to that repl from Cider. I can run figwheel, but need to also figure out the library and config for nrepl too (which I should be able to do from the cider command in theory 🙂

vemv11:10:06

I don't have fresh Fig knowledge in my head... However shadow-cljs excels at running an nrepl server - it even has built-in logic/config for cider-nrepl and refactor-nrepl

vemv11:10:22

I had the impression that fig-main isn't good at re-connecting either? i.e. with shadow I can quit localhost from Chrome, open it again and the repl will re-connect flawlessly.

practicalli-johnny11:10:58

I havent had any issues using figwheel-main (once I use the right jack-in commands) or any need to reconnect as projects are relatively simple (for the front end) One day I will find the time to read through the excellent shadow-cljs user guide (although currently have no reason to use javascript in my ClojureScript projects, so figwheel-main has kept things simple even though it has the option to bundle js packages - but no perceived value as yet to my projects). So using jack-in is just fine for ClojureScript projects I use. Its more curiosity on how to run from a terminal as that is how I start all the Clojure projects I work on.

👍 1