Fork me on GitHub
#calva
<
2019-04-05
>
lspector02:04:32

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 127.0.0.1 - 
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 java.net.URLClassLoader.addURL(java.net.URL)
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) 

pez04:04:24

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

pez04:04:26

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

pez06:04:03

@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. https://github.com/BetterThanTomorrow/calva/issues/144#issuecomment-480140416 Someone was kind and found thr culprit so I should be able to fix it pretty quick. I'm sorry for the inconveniences!

pez07:04:15

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.

pez07:04:38

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

pez09:04:34

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.

pez09:04:14

@ivana ^This should fix the issue you had^

ivana10:04:10

@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)

pez10:04:52

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: https://github.com/BetterThanTomorrow/calva/pull/143

pez11:04:48

Exciting competition for Calva might be on its way: http://lighttable.com/2019/03/31/New-year-old-plans/

grav13:04:33

Hey, anyone using vscode-parinfer with Calva?

pez13:04:12

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

lspector14:04:09

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.

pez17:04:33

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

pez17:04:17

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

pez17:04:57

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

pez18:04:01

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! ❤️

lspector18:04:14

Thanks so much @pez!

lspector18:04:32

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?

pez18:04:32

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.

lspector18:04:14

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...

pez19:04:14

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.

dennisa19:04:07

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?

dennisa19:04:32

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

lspector19:04:19

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

pez19:04:43

@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.

dennisa20:04:35

Great, how do I configure it )

pez20:04:51

How would you like to configure it?

dennisa20:04:24

it's giving an error on start

pez20:04:21

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

dennisa20:04:38

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

pez20:04:01

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.

pez20:04:42

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.