nrepl

richiardiandrea 2024-08-20T16:54:04.138059Z

Hi all, I have just bumped cider to v1.13.1 - has anybody seen this error on jack-in? > error in process sentinel: Could not start nREPL server: Downloading: cider/cider-nrepl/0.45.0/cider-nrepl-0.45.0.pom from clojars > Downloading: cider/orchard/0.22.0/orchard-0.22.0.pom from clojars > Downloading: mx/cider/logjam/0.2.0/logjam-0.2.0.pom from clojars > Downloading: cider/orchard/0.22.0/orchard-0.22.0.jar from clojars > Downloading: mx/cider/logjam/0.2.0/logjam-0.2.0.jar from clojars > Downloading: cider/cider-nrepl/0.45.0/cider-nrepl-0.45.0.jar from clojars > Execution error (IllegalArgumentException) at orchard.misc/require-and-resolve (misc.clj:161). > No such namespace: orchard.java.parser-utils

vemv 2024-08-20T16:58:42.462139Z

Maybe you're on linux and don't have a full JDK?

richiardiandrea 2024-08-20T16:59:24.936209Z

uhm I have > openjdk version "21.0.4" 2024-07-16 LTS > OpenJDK Runtime Environment Temurin-21.0.4+7 (build 21.0.4+7-LTS) > OpenJDK 64-Bit Server VM Temurin-21.0.4+7 (build 21.0.4+7-LTS, mixed mode, sharing)

richiardiandrea 2024-08-20T16:59:37.651449Z

the above seems like a namespace missing though

richiardiandrea 2024-08-20T17:00:44.038259Z

should I try another JDK (zulu) ?

vemv 2024-08-20T17:02:38.735259Z

the namespace can fail to load if the jdk isn't full i.e. it doesn't have its sources available

vemv 2024-08-20T17:02:49.020569Z

cider docs indicate how to install them for different linux distros

richiardiandrea 2024-08-20T17:03:12.016299Z

ok let me try that

richiardiandrea 2024-08-20T17:04:24.354369Z

I was on 1.15.1 and it did not seem to break

richiardiandrea 2024-08-20T17:07:23.140889Z

I also tried (setq cider-enrich-classpath nil) and it still happens

vemv 2024-08-20T17:09:55.899129Z

but do you have a full JDK?

richiardiandrea 2024-08-20T17:10:03.572639Z

still checking

richiardiandrea 2024-08-20T17:21:07.136799Z

seems like I do not have sources / docs

richiardiandrea 2024-08-20T17:23:35.451759Z

my configuration comes from either devbox or asdf (global project by project) and I don't think they can include sources/docs Is there a way to disable that check and avoid the failure?

oyakushev 2024-08-20T17:30:59.019179Z

I assume this is all the output you get? There is no full exception available somewhere in the *`nrepl-server*` buffer?

richiardiandrea 2024-08-20T17:31:09.383049Z

let me see

richiardiandrea 2024-08-20T17:34:27.149549Z

I can send a .edn file - but do you want me to open an issue in github instead?

richiardiandrea 2024-08-20T17:34:41.085389Z

(it is against cider I guess?)

oyakushev 2024-08-20T17:35:03.816919Z

Send in the file and let's see what the best place for the issue is:)

👍 1
richiardiandrea 2024-08-20T17:35:49.534729Z

richiardiandrea 2024-08-20T17:36:50.236339Z

by the way I had this problem with the temurin-jre-21.0.4+7.0.LTS but unfortunately sometimes you don't have control over what gets installed (as mentioned above)

👍 1
vemv 2024-08-20T17:37:06.355799Z

> my configuration comes from either devbox or asdf (global project by project) and I don't think they can include sources/docs In many years we've never heard of someone unable to have a full JDK. I don't know those two tools in detail, I hear asdf is flexible by design. In general, everything is just software, hackable. If you can give it a good try, it would be the simplest fix and also an enhacement in our user manual.

oyakushev 2024-08-20T17:38:16.727599Z

but unfortunately sometimes you don't have control over what gets installed (as mentioned above)Agreed, this shouldn't be a hard requirement for the whole CIDER. It never was.

richiardiandrea 2024-08-20T17:39:11.883089Z

sounds good - the devbox.json config is embedded in the repo and probably I can convince the team to change stuff

oyakushev 2024-08-20T17:39:43.547989Z

I think you can file it against Orchard. I'll get the JRE and try to reproduce it

🙏 1
richiardiandrea 2024-08-20T17:39:48.897679Z

it's a "dev" conf so not being able to use cider is probably a no go and the embedded conf will likely be changed

oyakushev 2024-08-20T17:41:01.248349Z

But I would also advise you to get the JDK if possible

oyakushev 2024-08-20T17:46:29.623219Z

@vemv It's not about the sources; JRE doesn't have a jdk.javadoc.doclet.Doclet class (and probably other classes)

👍 1
vemv 2024-08-20T18:07:04.230599Z

It's the same thing IME, a non-full (prod-oriented) JDK misses that stuff

oyakushev 2024-08-20T18:11:30.525249Z

This can be one of the warnings that CIDER displays on connect ("you are using JRE, switch to JDK for reliable experience")

vemv 2024-08-20T18:15:07.972139Z

That defers something that has to be done anyway. It's reasonable to force people to do something that takes a few minutes to accomplish, else we're back at debugging other people's machines/environments (we've never had an issue with this policy, that I remember)

oyakushev 2024-08-20T18:18:59.056079Z

> takes a few minutes to accomplish Not necessarily. In any case, the end result for the user should not be a random unrelated exception.

vemv 2024-08-20T18:19:44.652969Z

I'd welcome such a PR, but not sure about the current one

vemv 2024-08-20T18:21:22.091539Z

tldr, degraded modes increase the support burden, our support budget is already pretty scarce so it's a known-good approach to fail-fast (we already do for other conditions anyway)

richiardiandrea 2024-08-20T18:21:43.903629Z

Agree with Alexander here but also thinking it might be low prio as there is clear direction given in the readme

richiardiandrea 2024-08-20T18:23:46.722729Z

Will open an issue shortly - thank you both for the support

oyakushev 2024-08-20T18:26:19.937239Z

@richiardiandrea I've opened one here already https://github.com/clojure-emacs/orchard/pull/288

👍 1
oyakushev 2024-08-20T18:26:36.634649Z

But it looks like some other things need fixing too