Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make repl fails to start a REPL with Leiningen 2.11.x #848

Closed
metayan opened this issue Feb 8, 2024 · 10 comments
Closed

make repl fails to start a REPL with Leiningen 2.11.x #848

metayan opened this issue Feb 8, 2024 · 10 comments

Comments

@metayan
Copy link

metayan commented Feb 8, 2024

Expected behavior

REPL should appear

Actual behavior

Error: Could not find or load main class clojure.main
Caused by: java.lang.ClassNotFoundException: clojure.main
make: *** [Makefile:171: lein-repl] Error 1

Steps to reproduce the problem

make repl

Environment & Version information

cider-nrepl version

Current master
v0.45.0
v0.44.0

Java version

openjdk version "19.0.1" 2022-10-18
OpenJDK Runtime Environment Homebrew (build 19.0.1)
OpenJDK 64-Bit Server VM Homebrew (build 19.0.1, mixed mode, sharing)
openjdk version "17.0.10" 2024-01-16
OpenJDK Runtime Environment (build 17.0.10+7-Debian-1deb12u1)
OpenJDK 64-Bit Server VM (build 17.0.10+7-Debian-1deb12u1, mixed mode, sharing)

Operating system

macOS 10.15.7
Linux Devuan Daedalus

Leiningen & Clojure versions

Leiningen 2.11.1 on Java 19.0.1 OpenJDK 64-Bit Server VM
Clojure CLI version 1.11.1.1435

@vemv
Copy link
Member

vemv commented Feb 8, 2024

Hi!

Thank you for using CIDER (and presumably, enrich-classpath?).

There's not enough information in this issue for it to be actionable. Plese attach stacktraces if any. The issue should also be reproducible in a project that we can clone.

Feel free to reopen the issue as you gather that info.

@vemv vemv closed this as completed Feb 8, 2024
@metayan
Copy link
Author

metayan commented Feb 8, 2024

There's not enough information in this issue for it to be actionable. Plese attach stacktraces if any. The issue should also be reproducible in a project that we can clone.

Probably a misunderstanding.
I'm running make repl in the cider-nrepl project directory - as is described in the README:

cider-nrepl/README.md

Lines 72 to 73 in 9aea519

# Fire up a repl and nrepl server you can cider-connect to:
make repl

I'm actually trying to investigate an issue in cider.

@vemv
Copy link
Member

vemv commented Feb 9, 2024

Sorry about the misunderstanding - I thought this issue had been created in https://github.com/clojure-emacs/cider

Either way, make repl works for me.

But lein repl should work as well. Features related to enrich-classpath won't be present, however, most times one doesn't need to debug that.

@metayan
Copy link
Author

metayan commented Feb 9, 2024

make repl works for me.

Can you please reveal which version of Clojure/Lein/Java it works on?

But lein repl should work as well.

lein repl reports roughly the same here:

Composite profiles containing maps are strongly recommended against. 
Support will be removed in future versions of Leiningen due to subtle 
unexpected behavior. Move the map from the composite profile to its own 
top-level named profile to avoid issues.
 [:test
  {:repl-options
   {:nrepl-middleware
    [cider.nrepl/wrap-apropos cider.nrepl/wrap-classpath cider.nrepl/wrap-complete
     cider.nrepl/wrap-content-type cider.nrepl/wrap-debug cider.nrepl/wrap-enlighten
     cider.nrepl/wrap-format cider.nrepl/wrap-info cider.nrepl/wrap-inspect
     cider.nrepl/wrap-macroexpand cider.nrepl/wrap-ns cider.nrepl/wrap-out
     cider.nrepl/wrap-profile cider.nrepl/wrap-refresh cider.nrepl/wrap-resource
     cider.nrepl/wrap-slurp cider.nrepl/wrap-spec cider.nrepl/wrap-stacktrace
     cider.nrepl/wrap-test cider.nrepl/wrap-trace cider.nrepl/wrap-tracker
     cider.nrepl/wrap-undef cider.nrepl/wrap-version cider.nrepl/wrap-xref]}}]
Error: Could not find or load main class clojure.main
Caused by: java.lang.ClassNotFoundException: clojure.main

Any idea what could be the cause?

@vemv
Copy link
Member

vemv commented Feb 9, 2024

The Clojure version is managed by Leiningen

$ java -version
java version "21.0.1" 2023-10-17 LTS
$ lein version
Leiningen 2.9.10

Perhaps try a git clean -fdx? (commit any changes beforehand for them not to be lost)

I also heard that the most recent Lein broke some plugins https://codeberg.org/leiningen/leiningen/pulls/39 - don't know if we're affected

Hope it helps!

@metayan
Copy link
Author

metayan commented Feb 9, 2024

Thanks. Had a clean repo already.
lein repl works with Leiningen 2.9.10 and 2.10.0
Fails with 2.11.0 and 2.11.1

@metayan metayan changed the title make repl fails to start a REPL make repl fails to start a REPL with Leiningen 2.11.x Feb 9, 2024
@metayan
Copy link
Author

metayan commented Feb 9, 2024

This issue should probably be reopened with the new title, but it doesn't seem like I can do that.

@vemv
Copy link
Member

vemv commented Feb 9, 2024

Happy we got it!

@vemv
Copy link
Member

vemv commented Feb 9, 2024

This issue should probably be reopened with the new title, but it doesn't seem like I can do that.

There's the open PR in Lein. There's nothing we can do about it but wait. Feel free to ping them

@metayan
Copy link
Author

metayan commented Feb 9, 2024

Ah, alright.
Thanks for clarifying.

@vemv vemv mentioned this issue Feb 25, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants