reveal

lassemaatta 2022-02-02T07:19:49.373039Z

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.

lassemaatta 2022-02-02T07:19:55.341439Z

[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

lassemaatta 2022-02-02T07:21:09.430039Z

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

lassemaatta 2022-02-02T07:22:06.191339Z

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

vlaaad 2022-02-02T07:38:23.321529Z

It looks you don’t have reveal on the classpath

vlaaad 2022-02-02T07:39:25.101279Z

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

vlaaad 2022-02-02T07:41:37.906589Z

wait no, the error come from cljfx…

vlaaad 2022-02-02T07:42:01.556439Z

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

vlaaad 2022-02-02T07:42:46.420369Z

have you changed jdk version recently btw?

lassemaatta 2022-02-02T07:49:47.747769Z

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

lassemaatta 2022-02-02T07:50:18.949689Z

lassemaatta 2022-02-02T07:51:19.886369Z

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

lassemaatta 2022-02-02T07:55:43.648709Z

vlaaad 2022-02-02T08:17:21.308559Z

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…

vlaaad 2022-02-02T08:22:14.159569Z

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

vlaaad 2022-02-02T08:22:33.408649Z

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?

lassemaatta 2022-02-02T08:27:20.970859Z

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

lassemaatta 2022-02-02T08:27:51.070619Z

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

lassemaatta 2022-02-02T08:28:58.911799Z

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

vlaaad 2022-02-02T08:51:08.114609Z

hmm strange

vlaaad 2022-02-02T08:51:56.362069Z

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

lassemaatta 2022-02-02T09:00:15.874059Z

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