calva

Wednesdays you might find @U0ETXRFEW in the Gather Calva space. Invite is https://gather.town/invite?token=GZqrm7CR and the password is `Be kind`.
Baibhav Bista 2021-02-15T05:09:16.377400Z

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.

Baibhav Bista 2021-02-15T05:09:46.377800Z

if I use the non-aliased name, the hover works

Baibhav Bista 2021-02-15T05:10:25.378400Z

however, the following does not show the hover

Baibhav Bista 2021-02-15T05:13:29.380500Z

I'm running Lein + CLJS + Figwheel on WSL2 and am jacked in. Everything else is working correctly.

Baibhav Bista 2021-02-15T08:22:13.381500Z

@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

pez 2021-02-15T09:05:03.382Z

Funny. I should try restart as well, maybe. šŸ˜ƒ

pez 2021-02-15T07:39:08.380900Z

JS lookups are a bit erratic. I havenā€™t quite figured out a pattern to it.

Xarlyle0 2021-02-15T15:40:25.385600Z

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/

pez 2021-02-15T15:48:51.387Z

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ā€¦)

pez 2021-02-15T15:49:44.387200Z

This one, is the one I was remembering.

Xarlyle0 2021-02-15T15:50:27.387300Z

thanks!

pez 2021-02-15T16:04:38.388Z

Welcome, @n2o!

n2o 2021-02-15T16:05:08.388600Z

hey, thanks for pointing me to this channel šŸ™‚ iā€™ll give the solution you suggested in the issue a try this evening :thumbsup:

šŸ¤˜ 1
pez 2021-02-15T16:06:21.389500Z

See my post right above your entry announcement for a link to the thread where the solution was posted.

šŸ‘ 1
šŸš€ 1
Xarlyle0 2021-02-15T16:13:48.390200Z

Thanks! That works swimmingly!

pez 2021-02-15T16:17:01.390400Z

Oh, thatā€™s awesome to know!

n2o 2021-02-15T20:49:58.393300Z

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

n2o 2021-02-15T20:51:55.393700Z

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]}}}}

n2o 2021-02-15T20:53:31.393900Z

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:

n2o 2021-02-15T20:55:00.394100Z

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)

n2o 2021-02-15T20:56:27.394500Z

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.

pez 2021-02-15T20:59:39.394900Z

I donā€™t see shadow-cljs in the dependencies of your deps.edn. Could that be the problem?

n2o 2021-02-15T21:06:32.395600Z

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"}}}}}

n2o 2021-02-15T21:08:00.395800Z

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)

n2o 2021-02-15T21:09:10.396Z

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 šŸ™‚

pez 2021-02-15T21:10:35.396600Z

Indeed. A minimal example will be super!

n2o 2021-02-15T21:31:21.397300Z

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 šŸ˜¬

pez 2021-02-15T23:12:28.397700Z

Thatā€™s the wonderful thing with minimal examples. Haha.

pez 2021-02-15T23:14:21.397900Z

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ā€¦.

pez 2021-02-15T23:50:17.405300Z

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

2
2
1