reveal 2022-02-02

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.

[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

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

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

It looks you don’t have reveal on the classpath

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

wait no, the error come from cljfx…

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

have you changed jdk version recently btw?

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

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

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…

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

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?

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

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

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

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

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