This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-06
Channels
- # announcements (2)
- # babashka (22)
- # beginners (93)
- # calva (12)
- # cider (65)
- # clj-kondo (15)
- # cljdoc (5)
- # cljs-dev (4)
- # cljsrn (4)
- # clojure (65)
- # clojure-europe (2)
- # clojure-italy (1)
- # clojure-nl (1)
- # clojure-norway (1)
- # clojure-spec (40)
- # clojure-uk (7)
- # clojurescript (12)
- # conjure (1)
- # cursive (2)
- # data-science (13)
- # datomic (1)
- # dirac (12)
- # emacs (3)
- # figwheel-main (19)
- # ghostwheel (5)
- # helix (6)
- # kaocha (1)
- # leiningen (6)
- # news-and-articles (2)
- # off-topic (17)
- # pathom (5)
- # re-frame (59)
- # reitit (17)
- # restql (1)
- # shadow-cljs (31)
- # spacemacs (5)
- # spire (3)
- # sql (35)
[nREPL] Starting server via "c:/Program Files/nodejs/npx.cmd" shadow-cljs -d nrepl:0.4.5 -d cider/piggieback:0.3.10 -d refactor-nrepl:2.5.0 -d cider/cider-nrepl:0.19.0-SNAPSHOT server...
error in process sentinel: nrepl-server-sentinel: Could not start nREPL server: shadow-cljs - config: c:\Users\my\project\path\shadow-cljs.edn
shadow-cljs - starting via "clojure"
=============================================================================
WARNING: The configured :dependencies in shadow-cljs.edn were ignored!
When using :deps they must be configured in deps.edn
==============================================================================
clojure : Couldn't find 'java'. Please set JAVA_HOME.
At line:1 char:1
+ clojure -Sdeps `{:aliases` `{:shadow-cljs-inject` `{:extra-deps` `{nr ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-Clojure
Trying to cider-jack-in-cljs on Windows from Spacemacs.
clojure CLI is installed and working when run directly from PowerShell. Also, $env:JAVA_HOME is correctly set. Any ideas or debugging tips?I see lots of ancient versions. You’re six versions back on cider and a major version back on piggieback and 3 major versions back on nrepl
But also I’m seeing issues with deps.edn and shadow-cljs.edn fighting over who is in control
@robert.mather.rmm Can you start shadow-cljs watch app?
My experience with shadow-cljs is that is much better start the process in the terminal and connect to it from cider without C-c M-C
Maybe remove your deps as well.
@neo2551 Thanks, that's working much better. I'm used to Cursive, where I can stash one-off sexpers I want to eval inside a (comment ...) and send the "top-level" (not including the comment block) form to the REPL with a single command. Is there something similar in CIDER?
I'm talking about nothing more than having the cursor/point somewhere within the form I want to eval, not highlighting it, or being right at the end or something. Being able to eval either the topmost containing form, or the immediately containing form would be nice.
i'm also a fan of
(setq cider-invert-insert-eval-p t)
(setq cider-switch-to-repl-on-insert nil)
i like being able to choose to eval things without leaving a trace, and optionally, to send forms to the repl so see the input and output in the repl buffer
Here's a fun one, what if I want to eval a form in the ns of the current buffer, but without switching the REPL ns. Let's say I want to stay in the 'user' ns because I have some utilities there, and want to eval something without polluting the 'user' ns
I usually go to the end of the sexp and eval it with C-x C-e
Maybe this is something specific to Shadow-CLJS interaction, but I can't eval forms containing functions defined in the buffer. I get undeclared-var warnings that make it look like it's trying to eval under the 'cljs.user' ns even though the REPL buffer shows the correct ns.
@robert.mather.rmm which version do you use?
do you use deps.edn? then only the version included there matters. the npm version is less relevant.
Cider inline sends along the current namespace and it should be evaled there. Insert into repl will not silently adjust the repl like cursive does
Ok. What I'm experiencing though: 1. Start 'shadow watch <build>' from CLI 2. Connect to nREPL from Cider with 'shadow-select' type 3. C-c C-k to load buffer (still see 'cljs.user', not file/buffer ns in REPL buffer) 4. C-c C-c doesn't work due to "Use of undeclared Var" from Shadow 5. C-c M-n n to set the REPL ns to match the buffer (seems to work, the REPL buffer changes to match the file ns) 6. C-c C-c still doesn't work with the same error
So even though the Cider REPL buffer shows the correct ns in the prompt, the warnings coming back from Shadow show everything ns-qualified with 'cljs.user'
i did diverge a bit from your steps. i'm not using deps.edn, and i did shadow-cljs -d cider/cider-nrepl:0.25.1 server
and then issued the watch from the repl
are you opposed to upgrading? i think we might be diagnosing a bug from over two years ago
I'm using Spacemacs (new to Emacs), just followed their Clojure layer instructions. I'm surprised it's that far back by default.
but once you're up to date i'll work with you until you've got a happy repl experience
Ok, I'll try that. Thanks
@thheller @dpsutton Downgrading Shadow helped. Now I can get to a usable REPL, but there's still some disconnect in the state of the systems. For example, before explicitly loading the buffer (C-c C-k), I'm able to eval a pure function with C-c C-c and get the right result inline, but Shadow still warns "undeclared var". After loading, the warnings go away and things work cleanly.
It's as though different systems are relying on different sources to determine the runtime state.
ok. i can recreate in 2.10.4 when running with deps. no idea why this is different but at least i can reproduce now
(-->
id "14"
op "eval"
session "1fee8a75-f0c8-4546-8195-edba9b2588b0"
time-stamp "2020-06-06 18:11:35.918714000"
code "(defn ^:dev/after-load start []
(r/render [app]
..."
column 1
file "/Users/dan/projects/clojure/shadow/src/app/main.cljs"
line 11
nrepl.middleware.print/print "cider.nrepl.pprint/pr"
nrepl.middleware.print/quota 1048576
nrepl.middleware.print/stream? nil
ns #("app.main" 0 8 (fontified t help-echo cider--help-echo cider-locals nil cider-block-dynamic-font-lock t face font-lock-type-face))
)
that seems like a valid nrepl message.