Hello everyone, I have been having a problem with the "show hover" you see when hovering over a function name when aliasing. I'm asking here to know if there are some things I need to set up or if this is a known issue in calva Edit: Solution: Reloading VS Code and jacking in again fixed the problem for me.
if I use the non-aliased name, the hover works
however, the following does not show the hover
I'm running Lein + CLJS + Figwheel on WSL2 and am jacked in. Everything else is working correctly.
@pez after you said that it was erratic I closed and reopened Vs-code, and jacked-in, and now it seems to work XD I don't know what the problem was but a reload fixed things for me
Funny. I should try restart as well, maybe. š
JS lookups are a bit erratic. I havenāt quite figured out a pattern to it.
I have a basic shadow-cljs + deps.edn setup that won't jack in.
; Execution error (ClassNotFoundException) at java.net.URLClassLoader/findClass (URLClassLoader.java:471).
shadow.cljs.devtools.api
; Error while connecting cljs REPL: TypeError: Cannot read property 'search' of undefined
There's a resolved git issue here: https://github.com/BetterThanTomorrow/calva/issues/314
that's similar in nature. Could it be connected to that? I was actually trying to follow the basic Fulcro tutorial when this happened. https://book.fulcrologic.com/There is also a new issue filed about it. https://github.com/BetterThanTomorrow/calva/issues/1032 (And in fact there was someone in this channel that reported success with Fulcro fullstack the other dayā¦)
This one, is the one I was remembering.
thanks!
Welcome, @n2o!
hey, thanks for pointing me to this channel š iāll give the solution you suggested in the issue a try this evening :thumbsup:
See my post right above your entry announcement for a link to the thread where the solution was posted.
Thanks! That works swimmingly!
Oh, thatās awesome to know!
Full Stack Clojure: Clojure backend with shadow-cljs compiled frontend (re-frame): I am having an issue same as seen here: https://clojurians.slack.com/archives/CBE668G4R/p1613404184387200 But the workaround does not properly work in my environment. When I try to start a REPL, I get this error:
shadow-cljs - HTTP server available at <http://localhost:8700>
shadow-cljs - server version: 2.11.18 running at <http://localhost:9630>
shadow-cljs - nREPL server started on port 8777
shadow-cljs - watching build :app
[:app] Configuring build.
[:app] Compiling ...
[2021-02-15 17:26:16.000 - WARNING] :shadow.cljs.devtools.server.util/handle-ex - {:msg {:type :start-autobuild}}
NoClassDefFoundError com/google/common/collect/Streams
My deps.edn looks like this
{:paths ["src/main" "src/test"]
:aliases {:watch
{:main-opts ["-m" "shadow.cljs.devtools.cli"
"watch" ":app"]}
:dev-local
{:extra-deps {com.datomic/dev-local {:local/root "local_jars/dev-local/dev-local.jar"}}}}}
and my shadow-cljs.edn like this:
{:deps true
:nrepl {:port 8777}
:builds {:app {:target :browser
:modules [...]
:output-dir "resources/public/js/compiled"
:asset-path "/js/compiled"
:dev {:compiler-options {:closure-defines {re-frame.trace.trace-enabled? true}}}
:release [...]
:devtools {:http-root "resources/public"
:http-port 8700
:preloads [devtools.preload day8.re-frame-10x.preload]}}}}
When I then try to start a REPL via Calva, using deps.edn
, then starting with the aliases :watch
and dev-local
, results in the error above. Looks like some deps from Google, which should come with the Closure Compiler Collection are not in my classpathā¦? :thinking_face:
The full stacktrace looks like this:
NoClassDefFoundError com/google/common/collect/Streams
com.google.javascript.jscomp.deps.DependencyInfo$Require.asSymbolList (DependencyInfo.java:60)
com.google.javascript.jscomp.deps.DependencyInfo$Base.getRequiredSymbols (DependencyInfo.java:163)
com.google.javascript.jscomp.Compiler.findModulesFromInput (Compiler.java:1914)
com.google.javascript.jscomp.Compiler.findModulesFromEntryPoints (Compiler.java:1870)
com.google.javascript.jscomp.Compiler.parseInputs (Compiler.java:1679)
com.google.javascript.jscomp.Compiler.parseForCompilationInternal (Compiler.java:954)
com.google.javascript.jscomp.Compiler.lambda$parseForCompilation$4 (Compiler.java:937)
com.google.javascript.jscomp.CompilerExecutor.runInCompilerThread (CompilerExecutor.java:129)
com.google.javascript.jscomp.Compiler.runInCompilerThread (Compiler.java:843)
com.google.javascript.jscomp.Compiler.parseForCompilation (Compiler.java:935)
com.google.javascript.jscomp.Compiler.compile (Compiler.java:693)
jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (NativeMethodAccessorImpl.java:-2)
Caused by:
ClassNotFoundException com.google.common.collect.Streams
jdk.internal.loader.BuiltinClassLoader.loadClass (BuiltinClassLoader.java:606)
jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass (ClassLoaders.java:168)
java.lang.ClassLoader.loadClass (ClassLoader.java:522)
com.google.javascript.jscomp.deps.DependencyInfo$Require.asSymbolList (DependencyInfo.java:60)
com.google.javascript.jscomp.deps.DependencyInfo$Base.getRequiredSymbols (DependencyInfo.java:163)
Does anyone have any ideas on this problem? Would great to solve this š Essentially, this is a re-frame project with deps.edn and a backend written in Clojure, starting an http server as an API.
I donāt see shadow-cljs in the dependencies of your deps.edn. Could that be the problem?
Nope, of course it is in my configuration, I just did not want to spam that lot š here are some of my deps, the list is quite long in the original project
{:paths ["src/main" "src/test"]
:deps {[...]
org.clojure/clojure {:mvn/version "1.10.2"}
org.clojure/clojurescript {:mvn/version "1.10.773"}
re-frame/re-frame {:mvn/version "1.1.2"}
reagent/reagent {:mvn/version "1.0.0"}
ring-cors/ring-cors {:mvn/version "0.1.13"}
ring-middleware-format/ring-middleware-format {:mvn/version "0.7.4"}
ring/ring-mock {:mvn/version "0.4.0"}
ring/ring {:mvn/version "1.9.0"}
ring/ring-defaults {:mvn/version "0.3.2"}
thheller/shadow-cljs {:mvn/version "2.11.18"}}
:aliases {:watch
{:main-opts ["-m" "shadow.cljs.devtools.cli"
"watch" ":app"]}
:dev-local
{:extra-deps {com.datomic/dev-local {:local/root "local_jars/dev-local/dev-local.jar"}}}}}
When I use the workaround described in your docs to use two separate workspaces, the project works as expected (except for the fact that I have to use two windows, but that is still better than messing around with Cursive)
maybe I build a minimal example tomorrow and paste it in the github issue and this thread, so that you can better see it on your machine. Remote debugging can be very difficult š
Indeed. A minimal example will be super!
Hmā¦ My minimal example works as expected and as described with your solution aboveā¦ I used my own project and removed everything which is not crucial for the exampleā¦ Wellā¦ Now I have to search the root of the problem š¬
Thatās the wonderful thing with minimal examples. Haha.
Super happy it works! We should as a minimum document the way to do this. But I also think maybe we can build it in to the deps.edn + shadow-cljs
connect sequenceā¦.
New version of the standalone REPL PR for you to test, friends. I changed the name of the command to Fire up a āGetting Startedā REPL, and tried to make it more of that, by adding a Paredit starter file and also a (yet unfinished) Clojure basics guide. Iām thinking it can be a pretty nice way to start your Clojure journey: Fire up a REPL, evaluate and experiment with some code in some well thought through order (hoping I can achieve that, of course). Iām a bit unsure about the actual terminology, I donāt want it to get too formal, but donāt want to lie eitherā¦ Please help test the basic functionality and also test the guides. Probably lots of spelling errors and such thereā¦ Hereās the VSIX: https://11410-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.173-814-connect-without-project-7ab7b6e8.vsix