Fork me on GitHub
#reveal
<
2022-02-02
>
lassemaatta07:02:49

anyone else having sudden issues with running reveal under cider? Everything has been working great for a long time but now I'm getting errors starting a repl.

lassemaatta07:02:55

[nREPL] Starting server via /usr/bin/lein update-in :dependencies conj \[nrepl/nrepl\ \"0.9.0\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.28.1\"\] -- repl :headless :host localhost
error in process sentinel: nrepl-server-sentinel: Could not start nREPL server: Error loading vlaaad.reveal.nrepl: Syntax error compiling at (cljfx/api.clj:72:1).
Syntax error compiling var at (/tmp/form-init16555324282214698075.clj:1:15800).
Unable to resolve var: vlaaad.reveal.nrepl/middleware in this context

lassemaatta07:02:09

this does not happen when starting a repl directly with lein repl so I guess this is caused by some interaction between cider and reveal

lassemaatta07:02:06

I was originally running reveal 1.3.226 but updating to 1.3.265 did not fix this

vlaaad07:02:23

It looks you don’t have reveal on the classpath

vlaaad07:02:25

my guess is lein repl activates some leiningen profile that includes reveal, and lein update in ... -- repl ... does not

vlaaad07:02:37

wait no, the error come from cljfx…

vlaaad07:02:01

can you share full stack trace from /tmp/form-init16555324282214698075.clj?

vlaaad07:02:46

have you changed jdk version recently btw?

lassemaatta07:02:47

I don't think I've changed my jdk, using 17.0.1

lassemaatta07:02:19

for some reason the /tmp/form-init<number>.clj file doesn't exist

vlaaad08:02:21

Hmm, I created this ~/.lein/profiles.clj:

{:user {:dependencies [[vlaaad/reveal "1.3.265"]
                       [nrepl "0.9.0"]
                       [cider/piggieback "0.5.3"]
                       [cider/cider-nrepl "0.28.0"]]
        :repl-options {:nrepl-middleware [vlaaad.reveal.nrepl/middleware]}}}
And a new lein project with lein new app , with the following project.clj :
(defproject app "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url ""
  :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
            :url ""}
  :dependencies [[org.clojure/clojure "1.10.3"]]
  :repl-options {:init-ns app.core})
Running both lein repl and lein update-in :dependencies conj \[nrepl/nrepl\ \"0.9.0\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.28.1\"\] -- repl :headless :host localhost successfully starts an nrepl server with Reveal window…

vlaaad08:02:14

Can you describe how do you launch lein? is it from some IDE? Is it inside a container?

vlaaad08:02:33

also can you check lein update-in :dependencies conj \[nrepl/nrepl\ \"0.9.0\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.28.1\"\] -- repl :headless :host localhost from the command line?

lassemaatta08:02:20

the above command seems to work, I get nREPL server started on port 42759 on host localhost - and the reveal window opens

lassemaatta08:02:51

also, starting a repl with just lein repl from a local command prompt works

lassemaatta08:02:58

but cider-jack-in-clj from cider under emacs causes the issue

vlaaad08:02:08

hmm strange

vlaaad08:02:56

maybe this is some sort of headless emacs that does not provide it’s child processes access to display?

lassemaatta09:02:15

I don't think so, but on the other hand I'm not an emacs/cider expert. I think I'll raise this issue on #cider and see if the people there have any ideas. Thanks for your help in any case 🙂

👍 1