Fork me on GitHub

Tried the quil project template, and alas:

MacBook-Pro:cljs leespector$ cd quil-cljs-calva-template-master/
MacBook-Pro:quil-cljs-calva-template-master leespector$ lein repl
Warning: implicit hook found: leiningen.cljsbuild/activate 
Hooks are deprecated and will be removed in a future version.
Retrieving cider/cider-nrepl/0.21.2-SNAPSHOT/cider-nrepl-0.21.2-20190325.161609-7.pom from clojars
Retrieving cider/cider-nrepl/0.21.2-SNAPSHOT/cider-nrepl-0.21.2-20190325.161609-7.jar from clojars
Compiling ClojureScript...
Compiling ["resources/public/js/main.js"] from ["src"]...
Successfully compiled ["resources/public/js/main.js"] in 2.182 seconds.
nREPL server started on port 64560 on host - 
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by cider.nrepl.inlined_deps.dynapath.v0v2v5.dynapath.defaults$eval24411$fn__24412 to method
WARNING: Please consider reporting this to the maintainers of cider.nrepl.inlined_deps.dynapath.v0v2v5.dynapath.defaults$eval24411$fn__24412
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
REPL-y 0.4.3, nREPL 0.6.0
Clojure 1.9.0
OpenJDK 64-Bit Server VM 11.0.1+13-LTS
    Docs: (doc function-name-here)
          (find-doc "part-of-name-here")
  Source: (source function-name-here)
 Javadoc: (javadoc java-object-or-class-here)
    Exit: Control+D or (exit) or (quit)
 Results: Stored in vars *1, *2, *3, an exception in *e

quil-cljs-calva-template.user=> (start-figwheel)
CompilerException java.lang.RuntimeException: Unable to resolve symbol: start-figwheel in this context, compiling:(/private/var/folders/9h/j56m5kf15fjc747cy0pm35zc0000gn/T/form-init6036560391151580908.clj:1:1) 


I'm sorry, @lspector , I think I've made a typo in the instructions. Try (figwheel-start).


@ivana , can you give us some more info on the procedure you follow to start the repl and connect Calva?


@ivana, and anyone in this channel, with latest vscode (or if it is just insiders, idk) there seems to have entered a problem that causes Calva to fail initializing. Someone was kind and found thr culprit so I should be able to fix it pretty quick. I'm sorry for the inconveniences!


Right, so it is actually latest VS Code that introduces this problem for Calva. Not sure if is for all users, or under just some circumstances, but until it is fixed, don't upgrade VS Code before fixed Calva is released, if Calva is important for your workflow.


If someone knows the procedure for how to downgrade VS Code, please share,


OK, so Calva 1.3.65 is out, fixing that issue with latest vscode. Please let me know if you see any new issues with it.

👍 8

@ivana ^This should fix the issue you had^


@pez thanks a lot! yesterday in another chat I was suggested to downgrade VScode to the february version (1.32 if I remember right) and after that everything was fine. But it is good news, that you fixed a problem and now it can work on latest versions of both Calva and VScode, thow I did not tried it yet. I'm very glad with VSC and Calva (even with all bugs in second 🙂 ) and I'm happy not to switch to any another horrible editors (I tried even NightCode yesterday)


As a bonus the upgrade also fixes the issue with Calva keeping the reasons for file load failures a secret. Now it reports those errors in the Calva says output channel, thanks to this PR:


Exciting competition for Calva might be on its way:


Hey, anyone using vscode-parinfer with Calva?


I think that could work. But I would suggest using the infer parens command in demand instead.


Thanks @pez. start-figwheel -> figwheel-start was definitely key; can you change that on your doc? Two other things on working with the template: 1) On connecting Calva, you don't say how to find the right server address. I think I currently have a bunch running (and no idea how to see/kill them 😞). If there's a way to make this automatically correct then that would be glorious, but short of this it would help to include something more explicit in your instructions. 2) Is it possible for you to make this into a template for lein new? Unless all of my projects, and all of my students' projects, will be called quil-cljs-calva-template, it looks like we'll have to do a lot of finding and changing of names, both at the OS level and inside of files.


Fixed the figwheel-start thing now. FYI, you can suggest whatever changes to that README by editing the file on github.


I’ll try to make that template for you. I need to learn how to make templates anyway.


I don’t understand the suggestion about finding the server address. What server?


Friends, it is Friday and things have started moving again when it comes to the new REPL window in Calva. We will need help testing things so that we don’t mess things up too much for Calva users out there. Please consider installing the 2.0.0 packages we will be posting in this channel. Here’s one. TGIF! ❤️


Thanks so much @pez!


Re: "What server?" I may be misunderstanding or misnaming something fundamental. Upon "Calva: Connect" I am asked for something like "localhost:53437" in a field at the top of the window, which says below it something starting with "Add port to nREPL..." My understanding was that this should be the address of a REPL server previously started in the terminal. Sometimes it seems to autoconnect, sometimes not. Maybe this is related to the fact that I may have a bunch of REPLs started. Does that make sense?


Yeah, it makes sense. Maybe it is not clear enough to users that Calva only finds the address if the current workspace is rooted at the Clojure project root. If Calva suggests the wrong address, things will not work very well. Hmmm, I think we can make that much clearer in the Ux.


Awesome. I do think I've sometimes been using the wrong address, whether it was suggested or maybe I copied/pasted the wrong one. I'm usually working on a couple of projects at once, for research/teaching/trying new things, etc. Since VSCode can only edit one at a time, I switch it around a bunch. Sometimes I also have REPL running for some other reason too, like using Gorilla REPL. Sometimes more than one of these will be in the same project too...


I too often have lots of REPL servers running at once (mostly because I need to test Calva for different people’s different setups). I open several VS Code windows to deal with it.


Just installed v 2.0. Look great in the light theme : )) Is there a way to let Calva to run the gigantic lein update-in command and open the CLJ Repl window?


Can be kick started by opening a clj file or from the Command pallette


@pez d'oh! I somehow never realized one could open multiple VSCode windows! That will make life nicer regardless of the rest.

metal 4

@dennisa, thanks for helping to test this! In fact we aim to make v2.0 do just that. Look for the Calva Jack-in command. It is not really working in most situation right now though, but it is where things are headed.


Great, how do I configure it )


How would you like to configure it?


it's giving an error on start


Jack-in? I don’t doubt it. It will need quite a lot of work before we release it.


alright, thanks for working on it in any case. What's the best place to post bugs found in 2.0 : )?


Github. Tag stuff [2.0] or {New REPL Window] or whatever you think seems relevant, but just tag it so that it is clear that it is not the currently released version.

👍 8

Cider jack-in assembles a command line and then lets the user edit that command line before it is issued. I like that and think Calva should do something similar.