This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-12-15
Channels
- # adventofcode (110)
- # announcements (30)
- # aws (2)
- # babashka (39)
- # babashka-sci-dev (112)
- # beginners (155)
- # calva (5)
- # cider (12)
- # clj-kondo (11)
- # cljs-dev (1)
- # cljsrn (2)
- # clojure (144)
- # clojure-australia (2)
- # clojure-europe (14)
- # clojure-nl (5)
- # clojure-spec (3)
- # clojure-uk (2)
- # clojurescript (22)
- # core-async (23)
- # cursive (31)
- # data-science (3)
- # emacs (12)
- # events (1)
- # fulcro (8)
- # honeysql (7)
- # jobs-discuss (11)
- # lsp (1)
- # missionary (28)
- # nextjournal (7)
- # off-topic (64)
- # pedestal (3)
- # polylith (19)
- # reagent (14)
- # reitit (12)
- # releases (4)
- # shadow-cljs (33)
- # tools-deps (3)
- # xtdb (3)
I am trying to cider-jack-in-cljs
into a shadow-clj
project, but I am getting this error:
"Execution error (NoSuchMethodError) at com.google.javascript.jscomp.deps.ModuleLoader/createRootPaths (ModuleLoader.java:257).\n'java.util.stream.Collector com.google.common.collect.ImmutableSortedSet.toImmutableSortedSet(java.util.Comparator)'\n"
Does anyone have any idea what this may mean? (I can jack-in with calva){:clojure.main/message
x"Execution error (NoSuchMethodError) at com.google.javascript.jscomp.deps.ModuleLoader/createRootPaths (ModuleLoader.java:257).\n'java.util.stream.Collector com.google.common.collect.ImmutableSortedSet.toImmutableSortedSet(java.util.Comparator)'\n",
:clojure.main/triage
{:clojure.error/class java.lang.NoSuchMethodError,
:clojure.error/line 257,
:clojure.error/cause
"'java.util.stream.Collector com.google.common.collect.ImmutableSortedSet.toImmutableSortedSet(java.util.Comparator)'",
:clojure.error/symbol
com.google.javascript.jscomp.deps.ModuleLoader/createRootPaths,
:clojure.error/source "ModuleLoader.java",
:clojure.error/phase :execution},
:clojure.main/trace
{:via
[{:type java.lang.NoSuchMethodError,
:message
"'java.util.stream.Collector com.google.common.collect.ImmutableSortedSet.toImmutableSortedSet(java.util.Comparator)'",
:at
[com.google.javascript.jscomp.deps.ModuleLoader
createRootPaths
"ModuleLoader.java"
257]}],
:trace
[[com.google.javascript.jscomp.deps.ModuleLoader
createRootPaths
"ModuleLoader.java"
257]
[com.google.javascript.jscomp.deps.ModuleLoader
<init>
"ModuleLoader.java"
147]
[com.google.javascript.jscomp.deps.ModuleLoader
<init>
"ModuleLoader.java"
48]
[com.google.javascript.jscomp.deps.ModuleLoader$Builder
build
"ModuleLoader.java"
139]
[com.google.javascript.jscomp.deps.ModuleLoader
<clinit>
"ModuleLoader.java"
408]
[com.google.javascript.jscomp.DiagnosticGroups
<clinit>
"DiagnosticGroups.java"
189]
[shadow.build.closure__init load nil 77]
[shadow.build.closure__init <clinit> nil -1]
[java.lang.Class forName0 "Class.java" -2]
[java.lang.Class forName "Class.java" 398]
Just found out that this is the culprit.
(setq cider-jack-in-dependencies
(delete-dups
(append
lispy-cider-jack-in-dependencies
cider-jack-in-dependencies)))
I had added that because lispy tries to add pomegranate and dynapath dynamically but sometimes it fails. But seems like this is incompatible with cljs projects
funny thing, just this week we completed removing dynapath from cider-nrepl.
what does lispy do to require such dynamism anyways? I don't know much about the project but good old paredit.el
certainly never needs to inject JVM deps or such :)
Honestly all I care is the editing commands, so I think most of this somewhat unnecessary and better provided by cider and other modules
but I don't quite know how to disable it yet
Here you can track the logic it follows for conditionally injecting its stuff https://github.com/abo-abo/lispy/blob/e9731aa95581951ab2cbfaed28f0ac7d71124ac0/le-clojure.el#L145-L189
It observes (eq major-mode 'clojurescript-mode)
. Maybe when you cider-jack-in-cljs
the major mode is clojure-mode
instead?
You can also just setq lispy-cider-jack-in-dependencies nil
, maybe that won't cause an immediate issue if you only use the editing commands
thanks for the suggestios, I'll try them out