This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-01-16
Channels
- # babashka (48)
- # beginners (44)
- # biff (3)
- # calva (1)
- # cider (42)
- # clj-kondo (8)
- # clojure (93)
- # clojure-australia (2)
- # clojure-europe (3)
- # clojure-taiwan (1)
- # clojurescript (10)
- # conjure (4)
- # deps-new (5)
- # joker (9)
- # lsp (12)
- # membrane (16)
- # minecraft (12)
- # missionary (4)
- # mount (3)
- # off-topic (60)
- # reitit (9)
- # releases (13)
- # ring-swagger (1)
- # shadow-cljs (18)
- # sql (67)
- # tools-deps (2)
[BUG] I found I canโt complete library namespace after require
or import
with latest version CIDER CIDER 1.3.0-snapshot (package: 20220113.610)
. I tried to use old git source code commit version cider, still not working.
Sure. I originally message here to confirm whether itโs a bug. I will report bug on github.
I can't think of any recent changes in this area, but it's always possible there's some regression.
I have a program that relies on futures a lot. If I set a #break in a future will it still work?
see also https://github.com/clojure-emacs/cider-nrepl/issues/630#issuecomment-524857244
I've recently started to have problems with Cider and CLJS after updating to the latest Cider. After the application loads and it kicks off the nested Figwheel repl, the page loads, and is functioning (ie CLJS compiled), but just after it completes a "Exception updating the ns-cache" shows up in the repl output. Specifically it's triggering an NPE by way of cider.nrepl.inlined_deps.orchard.v0v9v0.orchard.cljs.analysis$all_ns
. The repl is still running but it throws the NPE about updating the ns-cache even if I try to execute (+ 1 2)
. I'm happy to submit a detailed bug report, but am not sure if it should be against Cider, cider.nrepl, or orchard? I've been using this setup daily for the past year without any issue like this, so it's certainly possible I changed a config somewhere, but seems highly suspect it's related to some change in the Cider update. Anyone else encountering something like this?
Here is a more detailed example of the output in the repl buffer: https://gist.github.com/dgtized/aa046d06c921d4cb9f7dc51ea2729459.
We changed that code very recently. Looks like something was nilable whereas we didn't expect so. We'll be fixing it within ~1 day Thanks much for the report ๐
You are welcome, thanks for taking a look so quickly!
I realise this might be somewhat hard but do you have it possible to jump to cider.nrepl.inlined_deps.orchard.v0v9v0.orchard.cljs.analysis
and add a println in line 12? https://github.com/clojure-emacs/orchard/blob/febf8169675af1b11a8c00cfe1155ed40db8be42/src/orchard/cljs/analysis.cljc#L12
In [ns-sym ns]
, ns-sym is clearly nil, however I'm curious about ns
Jump to mechanism is broken because of the error, but I guess could try to set that up as a local repo dependency temporarily? Though not quite sure what I would exclude as it's supposed to be an inline from the injected nrepl right? Sorry happy to try, but a little unsure how to start?
So I tried adding cider/orchard {:local/root "../../upstream/orchard/"}
to my deps.edn after placing it there and making println the change, however, I'm getting the following error: error in process sentinel: nrepl-server-sentinel: Could not start nREPL server: Error building classpath. Manifest type not detected when finding deps for cider/orchard in coordinate #:local{:root "/home/clgc/code/upstream/orchard"}
. Is it expecting a pom.xml file or something? I will double check on jvm alone, AFAIK that was working.
Confirmed that CIDER is working fine on a tiny project that is only using Clojure, no CLJS. So it looks like it's CLJS specific?
having a local checkout is pretty difficult, because we use "mranderson" to add prefixes to namespaces
... make install
installs Orchard to your ~/.m2 with the mranderson stuff if you're willing to give it a shot
but honestly it's no big deal, mostly I seek to gain understanding of what's going on, which is not crucial, I can just use some-> :)
mmm make install will not work, sorry for the noise. let's leave it at that, I'll add that some->
Gotcha, yea I was trying adding a manual deps.edn to orchard root but it didn't seem to override it correctly
Appreciate it might have it's own problems getting setup, but https://github.com/dgtized/shimmers is CLJS project I was having trouble with. Don't know if that helps for diagnosis at all, but if it helps.
no if you cider-jack-in-cljs
bin/repl I believe is working, will double check
bin/repl is working but it's just setting up the figwheel repl and not doing any of the cider/piggieback handshake which is where this is failing I think. I don't know if I explained that well before but the CLJS builds, it launches the page but then a second or so later the exception triggers, so I don't think it's happening until piggieback starts trying to talk to the page in the browser?
I can also trigger it by running /usr/local/bin/clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version "0.9.0"} cider/piggieback {:mvn/version "0.5.2"} refactor-nrepl/refactor-nrepl {:mvn/version "3.2.0"} cider/cider-nrepl {:mvn/version "0.28.0"}} :aliases {:cider/nrepl {:main-opts ["-m" "nrepl.cmdline" "--middleware" "[refactor-nrepl.middleware/wrap-refactor,cider.nrepl/cider-middleware,cider.piggieback/wrap-cljs-repl]"]}}}' -Mdev:cider/nrepl
from the commandline, and then connecting with cider-connect-cljs
. However it fails the same way after it compiles and kicks off figwheel to host the page. It brings up the prompt and then gives the NPE. So again I think that means it's only happening once it starts trying to talk with the browser repl.
Thank you so much, happy to provide any other information that might help.
(to clarify, "it starts trying to talk with the browser repl", the it is not figwheel/clojurescript, but Cider/orchard and associated tools)
alright! so unfortunately my cider.el setup is really old so cider-connect-cljs
won't work for me with a modern stack
Anyway here's the fix, should be released within a day https://github.com/clojure-emacs/orchard/pull/148
Cool, thank you so much!
In the meantime, should I just try rolling back orchard to the previous release or something? Or is it more in something that uses that?
(also can wait, just curious if there is a workaround)
gotcha, thanks. I tried overriding
(setq cider-required-middleware-version "0.27.4"
cider-injected-middleware-version "0.27.4")
But that doesn't seem to update the version requested at connection as it's still requesting 0.28.0. So I must not be modifying the right values to force the older cider-nrepl. Anyway thanks for all your help, I guess I will just wait for the fix.cider-injected-middleware-version should work. It doesn't, of course, if you will use cider-connect over a process you spawned yourself
oh right that makes sense, I will try that, thank you
Oh! I figured it out:
(setq cider-required-middleware-version "0.27.4"
cider-injected-middleware-version "0.27.4")
(cider-add-to-alist 'cider-jack-in-lein-plugins
"cider/cider-nrepl" cider-injected-middleware-version)
Just updating cider-injected-middleware-version is insufficient, because the add-to-alist update to 'cider-jack-in-lein-plugins is top level and only execute on initial require. I think it might make sense to force the add-to-alist calls to recompute just prior to running jack-in if they depend on a defcustom variable. Anyway I will submit an issue or see if I can dust off a PR to address itGot it! I think we introduced one of those defcustoms just a few months ago so yeah it's not impossible that it doesn't really work. PR welcome
Ooph, that's kinda gnarly in there, I documented it in https://github.com/clojure-emacs/cider/issues/3133, and will think on if there is a clean PR to address.
Thanks so much for your help again though!