This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-04-14
Channels
- # aleph (2)
- # announcements (11)
- # aws (4)
- # babashka (42)
- # babashka-sci-dev (81)
- # beginners (90)
- # biff (2)
- # calva (40)
- # cider (16)
- # clj-kondo (26)
- # clj-on-windows (1)
- # cljdoc (4)
- # cljfx (1)
- # cljsrn (2)
- # clojure (92)
- # clojure-austin (2)
- # clojure-europe (23)
- # clojure-nl (5)
- # clojure-uk (3)
- # clojured (3)
- # clojurescript (19)
- # community-development (3)
- # conjure (1)
- # cursive (4)
- # datalevin (3)
- # datomic (5)
- # emacs (13)
- # events (1)
- # fulcro (26)
- # graphql (1)
- # hugsql (15)
- # introduce-yourself (5)
- # leiningen (1)
- # lsp (29)
- # minecraft (19)
- # music (1)
- # off-topic (36)
- # pathom (12)
- # podcasts (2)
- # portal (8)
- # re-frame (12)
- # reagent (11)
- # rewrite-clj (4)
- # shadow-cljs (56)
- # spacemacs (2)
- # vim (12)
- # windows (3)
- # xtdb (43)
$ npm run release
...
> npx shadow-cljs release :calva-lib :test
shadow-cljs - config: /home/manas/calva/shadow-cljs.edn
[:calva-lib] Compiling ...
------ WARNING #1 - -----------------------------------------------------------
File: ~/.m2/repository/org/babashka/sci/0.2.8/sci-0.2.8.jar!/sci/impl/analyzer.cljc:1129:40
--------------------------------------------------------------------------------
1126 | throw (analyze-throw ctx expr)
1127 | declare (expand-declare ctx expr)
1128 | expand-dot* (expand-dot* ctx expr)
1129 | . (expand-dot** ctx expr)
----------------------------------------------^---------------------------------
variable $ctx is undeclared
--------------------------------------------------------------------------------
1130 | expand-constructor (expand-constructor ctx expr)
1131 | new (analyze-new ctx expr)
1132 | ns (analyze-ns-form ctx expr)
1133 | var (analyze-var ctx expr)
--------------------------------------------------------------------------------
nil
[:calva-lib] Build completed. (195 files, 153 compiled, 0 warnings, 345.28s)
[:test] Compiling ...
------ ERROR -------------------------------------------------------------------
File: jar:file:/home/manas/.m2/repository/org/babashka/sci/0.2.8/sci-0.2.8.jar!/sci/impl/analyzer.cljc:179:1
--------------------------------------------------------------------------------
176 | ~'expr)])))))
177 |
178 | (declare return-and) ;; for clj-kondo
179 | (gen-return-and)
-------^------------------------------------------------------------------------
Syntax error macroexpanding cljs.core/and.
Please try to use thread to keep your questions together. I'm finding a bit of troubles knowing where I should answer this.
Ran into my first compilation problem 🙂 How to set up dev environment, locally test calva? I looked through the package.json. Do I set up a local VSCODE update site and point my VSCODE to download update snapshots from local server?
Have you found https://github.com/BetterThanTomorrow/calva/wiki/How-to-Hack-on-Calva ? The basic workflow is to run Calva in dev mode. There is a main build task that should start it all for you. cmd+shit+b
on Mac.
Thank you. I will try
Am I missing setting up any environment variables ? Looks like I am having some setup issues
I’m following https://github.com/BetterThanTomorrow/calva/wiki/How-to-Hack-on-Calva. Step 3 says, “When all watchers are stable […]” Everything seems to be working well so far, but how can I tell that “all watchers are stable?” I don’t know where to look for that in the VS Code interface.
Yeah, They sure look stable to me. 😃 Please update the wiki to be clearer about where to see the watchers.
There is another thing I’m a bit confused about. I’m not sure if I’m able to explain it well, but I’ll try: I now have Calva running in debug mode, and I have used “Start or Connect to a Clojure REPL” from within the Calva project (root directory), which seems to be working. But how can I use the dev version of Calva I have running in debug mode from a different “window/instance” of VS Code? So that I can use Calva in debug mode when working on a different Clojure project, outside of the Calva project itself. I can’t tell whether my Clojure project (a different root folder, opened in a different VS Code “window/instance”) is using the production version of Calva (the one installed as an Extension) or the dev version of Calva I have running in debug mode in the other “window/instance” of VS Code. Does that make sense?
Also, when I ran the VS Code command “Developer: Restart Extension Host,” I got an error in the “Calva Watch CLJS” console. (No code changes.) See the detailed error message below. Perhaps I’ve done something wrong when I started/connected to the REPL; I’m not sure. :thinking_face:
ERROR: ERROR: Unhandled REPL handler exception processing messageUnhandled REPL handler exception processing message {{:op:op closeclose, , :session:session 752bc0a0-1fdc-413e-ba6e-620ef616d51d}
a9636dc5-52ed-4ab3-8452-9303a4395685}
java.net.SocketException: Socket closed
at java.base/sun.nio.ch.NioSocketImpl.ensureOpenAndConnected(NioSocketImpl.java:165)
at java.base/sun.nio.ch.NioSocketImpl.beginWrite(NioSocketImpl.java:366)
at java.base/sun.nio.ch.NioSocketImpl.implWrite(NioSocketImpl.java:411)
at java.base/sun.nio.ch.NioSocketImpl.write(NioSocketImpl.java:440)
at java.base/sun.nio.ch.NioSocketImpl$2.write(NioSocketImpl.java:826)
at java.base/java.net.Socket$SocketOutputStream.write(Socket.java:1035)
at java.base/java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:81)
at java.base/java.io.BufferedOutputStream.flush(BufferedOutputStream.java:142)
at nrepl.transport$bencode$fn__5900.invoke(transport.clj:121)
at nrepl.transport.FnTransport.send(transport.clj:28)
at nrepl.middleware.print$send_nonstreamed.invokeStatic(print.clj:159)
at nrepl.middleware.print$send_nonstreamed.invoke(print.clj:138)
at nrepl.middleware.print$printing_transport$reify__6187.send(print.clj:174)
at nrepl.middleware.session$close_session.invokeStatic(session.clj:269)
at nrepl.middleware.session$close_session.invoke(session.clj:263)
at nrepl.middleware.session$session$fn__6791.invoke(session.clj:306)
at nrepl.middleware$wrap_conj_descriptor$fn__5986.invoke(middleware.clj:16)
at nrepl.middleware.print$wrap_print$fn__6198.invoke(print.clj:234)
at nrepl.middleware$wrap_conj_descriptor$fn__5986.invoke(middleware.clj:16)
at shadow.cljs.devtools.server.nrepl$start$fn__7472.invoke(nrepl.clj:142)
at nrepl.server$handle_STAR_.invokeStatic(server.clj:22)
at nrepl.server$handle_STAR_.invoke(server.clj:19)
at nrepl.server$handle$fn__7258.invoke(server.clj:39)
at clojure.core$binding_conveyor_fn$fn__5772.invoke(core.clj:2034)
at clojure.lang.AFn.call(AFn.java:18)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
java.net.SocketException: Socket closed
at java.base/sun.nio.ch.NioSocketImpl.ensureOpenAndConnected(NioSocketImpl.java:165)
at java.base/sun.nio.ch.NioSocketImpl.beginWrite(NioSocketImpl.java:366)
at java.base/sun.nio.ch.NioSocketImpl.implWrite(NioSocketImpl.java:411)
at java.base/sun.nio.ch.NioSocketImpl.write(NioSocketImpl.java:440)
at java.base/sun.nio.ch.NioSocketImpl$2.write(NioSocketImpl.java:826)
at java.base/java.net.Socket$SocketOutputStream.write(Socket.java:1035)
at java.base/java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:81)
at java.base/java.io.BufferedOutputStream.flush(BufferedOutputStream.java:142)
at nrepl.transport$bencode$fn__5900.invoke(transport.clj:121)
at nrepl.transport.FnTransport.send(transport.clj:28)
at nrepl.middleware.print$send_nonstreamed.invokeStatic(print.clj:159)
at nrepl.middleware.print$send_nonstreamed.invoke(print.clj:138)
at nrepl.middleware.print$printing_transport$reify__6187.send(print.clj:174)
at nrepl.middleware.session$close_session.invokeStatic(session.clj:269)
at nrepl.middleware.session$close_session.invoke(session.clj:263)
at nrepl.middleware.session$session$fn__6791.invoke(session.clj:306)
at nrepl.middleware$wrap_conj_descriptor$fn__5986.invoke(middleware.clj:16)
at nrepl.middleware.print$wrap_print$fn__6198.invoke(print.clj:234)
at nrepl.middleware$wrap_conj_descriptor$fn__5986.invoke(middleware.clj:16)
at shadow.cljs.devtools.server.nrepl$start$fn__7472.invoke(nrepl.clj:142)
at nrepl.server$handle_STAR_.invokeStatic(server.clj:22)
at nrepl.server$handle_STAR_.invoke(server.clj:19)
at nrepl.server$handle$fn__7258.invoke(server.clj:39)
at clojure.core$binding_conveyor_fn$fn__5772.invoke(core.clj:2034)
at clojure.lang.AFn.call(AFn.java:18)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
Did you start the extension in debug mode as per step 3 (emphasis added)? It will open a new window where your development version of Calva is used.
> 3. When all watchers are stable (look at the terminals) - Start the extension in debug mode (the Extension Host): F5
.
> I have used “Start or Connect to a Clojure REPL”
Once the extension is running in that new window. You should go back to the Calva window and connect to (not start) the REPL.
> 4. Back in the Calva window, connect the REPL, choosing the calva
project root and then the Calva
project type, accepting the host and port to connect to.
Ah! Yes, I did follow the guide. However, I thought the empty VS Code window was a window I had opened before, which I had forgotten to close, so I closed it by mistake. Notice that I also updated the Wiki page 🙂
I’m going to restart VS Code and do it again from scratch, to make sure I’m not messing anything up.
There are a few launch profiles defined so you can start the dev extension host in a few different scenarios. But once it's open you can just open any other non-opened folder from that window and it will still be using dev Calva.
I am trying to build on windows WSL and code
While resolving: [email protected]
Found: [email protected]
node_modules/sass
dev sass@"^1.18.0" from the root project
Could not resolve dependency:
peer sass@"1.0.0-beta.3" from [email protected]
node_modules/dart-sass-loader
dev dart-sass-loader@"^1.0.0" from the root project
more errors 😞
I ran npm install --force
this to get around the error. But I am not sure what it will lead to
There is no ':node-library' option shown when I press ctrl + shift + b
There's not supposed to be any such option. Run Build Task should just run the main build task, which when it is done should have build a dev Calva for you, which you can start using in a development extension host. Which you can launch via the launch tasks, the default of which can be started with F5
.
If for some reason Run Build Task gives you that menu, then select the task Calva Watchers from it, and you should be good.
<!subteam^S03BGSAUPTQ|@calva-team>, I think the sass dependency here is a remnant from the old webview-based REPL/output window. At least I can't see another reason why we would need SASS for anything...
let's remove it 🙂
I think I found the issue. My fork seems to be outdated. When I updated my fork. I updated master branch. Not dev branch. I just merged dev branch from main repo. I will do git pull and retry
Only the Calva Dev has isDefault
set to true
. You just need to run the build task from the command palette and the watchers will all be started.
It's running fine now after git pull. Thanks
1. "Back in the Calva window, connect the REPL, choosing the calva
project root and then the Calva
project type, accepting the host and port to connect to.
How to do this
I press ctrl+shit+p there is no option to connect
I will reinstall now
Launched the repl finally. I just gone through less than two hours of troubleshooting since yesterday. A lot better beginner experience than some of the other projects I tried to get working..
1)Generic repl looks for nrepl.port
file. I was thinking it looks for .nrepl.port
file. The reason I got the name wrong was that when I started nrepl programmatically from java, it was creating .nrepl.port
file
Two hours is a lot. But you had some special circumstances there with the old fork and all, which is not typical for a first-time setup.