liquidz / vim-iced

Clojure Interactive Development Environment for Vim8/Neovim
https://liquidz.github.io/vim-iced/
MIT License
527 stars 35 forks source link

iced repl throws exception: Unable to resolve var: cider.nrepl/wrap-xref in this context #451

Closed devth closed 1 year ago

devth commented 1 year ago

Running into a strange issue where iced repl throws:

⚡ iced repl
OK: Leiningen project is detected
22-12-22 23:17:47 Trevor.Hartman DEBUG [yetibot.core.util.config:26] - No config found at "conf
ig/config.edn"
WARNING: update-vals already refers to: #'clojure.core/update-vals in namespace: clojure.tools.
analyzer.utils, being replaced by: #'clojure.tools.analyzer.utils/update-vals
WARNING: update-vals already refers to: #'clojure.core/update-vals in namespace: clojure.tools.
analyzer.passes, being replaced by: #'clojure.tools.analyzer.utils/update-vals
WARNING: update-vals already refers to: #'clojure.core/update-vals in namespace: clojure.tools.
analyzer.passes.uniquify, being replaced by: #'clojure.tools.analyzer.utils/update-vals
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Error loading cider.nrepl: Syntax error macroexpanding at (cider/nrepl.clj:1:1).
Error loading cider.nrepl: Syntax error macroexpanding at (cider/nrepl.clj:1:1).
Error loading cider.nrepl: Syntax error macroexpanding at (cider/nrepl.clj:1:1).
Error loading cider.nrepl: Syntax error macroexpanding at (cider/nrepl.clj:1:1).
Error loading cider.nrepl: Syntax error macroexpanding at (cider/nrepl.clj:1:1).
Error loading cider.nrepl: Syntax error macroexpanding at (cider/nrepl.clj:1:1).
Error loading cider.nrepl: Syntax error macroexpanding at (cider/nrepl.clj:1:1).
Error loading cider.nrepl: Syntax error macroexpanding at (cider/nrepl.clj:1:1).
Error loading cider.nrepl: Syntax error macroexpanding at (cider/nrepl.clj:1:1).
Error loading cider.nrepl: Syntax error macroexpanding at (cider/nrepl.clj:1:1).
Error loading cider.nrepl: Syntax error macroexpanding at (cider/nrepl.clj:1:1).
Error loading cider.nrepl: Syntax error macroexpanding at (cider/nrepl.clj:1:1).
Error loading cider.nrepl: Syntax error macroexpanding at (cider/nrepl.clj:1:1).
Error loading cider.nrepl: Syntax error macroexpanding at (cider/nrepl.clj:1:1).
Error loading cider.nrepl: Syntax error macroexpanding at (cider/nrepl.clj:1:1).
Error loading cider.nrepl: Syntax error macroexpanding at (cider/nrepl.clj:1:1).
Syntax error compiling var at (/private/var/folders/rr/11y6_bq91f78krwmnsb1j0ym0000gp/T/form-in
it7079387090557736222.clj:1:7741).
Unable to resolve var: cider.nrepl/wrap-xref in this context

Full report at:
/var/folders/rr/11y6_bq91f78krwmnsb1j0ym0000gp/T/clojure-17543514599445798685.edn
Subprocess failed (exit code: 1)

I am able to lein repl just fine.

On latest vim-iced at f62b8dc803de4aa7596bdf1bb979d8a5cff82828

openjdk version "19.0.1" 2022-10-18
lein 2.10.0

This is when starting a repl in this code base: https://github.com/yetibot/yetibot/ This one works though https://github.com/yetibot/core

Any ideas?

liquidz commented 1 year ago

@devth Thanks for your reporting! Weird, but I could reproduce the problem.

Any ideas?

No ideas for now, but I'll investigate. Has it been okay up to now?

liquidz commented 1 year ago

FYI: When I add [cider/cider-nrepl "0.28.7"] to the next of the following line and run lein repl, I could reproduce this problem. https://github.com/yetibot/yetibot/blob/e71cbda9193b11c759abb56b9d4d801070cc091b/project.clj#L119

So it does not seem to be a vim-iced'side problem.

devth commented 1 year ago

Thanks for looking into it! 🙏🏻

I tried bumping a bunch of deps and changing configs - it looks like upgrading nrepl from 0.6.0 to 1.0.0 in yetibot/core (a dep of yetibot) fixed it.