Fork me on GitHub
#calva
<
2019-11-05
>
bringe00:11:39

Hello Calva friends: I made a small fix so that the hover definition will show for values preceded by @ and '. I'm pretty sure this will not affect other things negatively, but some testing by others would be nice before merging. The VSIX is here https://1930-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.58-fix-find-definition-for-derefed-value-c8a3c398.vsix and the PR is here https://github.com/BetterThanTomorrow/calva/pull/449

Sasho11:11:22

👋 In Calva, is it possible to stop the current evaluation. For example, if one evaluates (Thread/sleep 1000000), is there a way to stop it, without restarting Calva?

Sasho11:11:08

Or for example, if one evaluates (range).

pez15:11:58

Since a week it is. 😃 Interrupt Running Evaluations

Sasho09:11:49

🎉

Sasho09:11:57

Very nice, I tested it, it works 🎉

calva 4
Filipe Silva21:11:42

shadow-cljs lets you start a background server:

$ yarn shadow-cljs start
yarn run v1.17.3
$ D:\work\learn-re-frame-course-files\cheffy\node_modules\.bin\shadow-cljs start
shadow-cljs - config: D:\work\learn-re-frame-course-files\cheffy\shadow-cljs.edn  cli version: 2.8.69  node: v10.16.0
shadow-cljs - server starting ..................................... ready!
Done in 10.14s.

Filipe Silva21:11:09

this is useful for when you end up having several invocations of shadow-cljs

Filipe Silva21:11:48

trying to jack in when there's already a shadow-cljs server makes the jack-in process hang

Filipe Silva21:11:07

the terminal window will say this:

Filipe Silva21:11:12

shadow-cljs - config: d:\work\learn-re-frame-course-files\cheffy\shadow-cljs.edn  cli version: 2.8.69  node: v10.16.0
shadow-cljs - connected to server
shadow-cljs - watching build :app
[:app] Configuring build.
[:app] Compiling ...
[:app] Build completed. (691 files, 690 compiled, 0 warnings, 46.46s)

Filipe Silva21:11:10

and the repl will never connect

Filipe Silva21:11:34

I think this is because Calva is waiting for the repl port to be printed

Filipe Silva21:11:03

if I stop the server via yarn shadow-cljs stop and jack in again, it will work

Filipe Silva21:11:23

I imagine that it's because the terminal that Calva uses will have more information

Filipe Silva21:11:25

> Executing task: C:\Program Files\nodejs\npx.cmd shadow-cljs -d cider/piggieback:0.4.1 -d cider/cider-nrepl:0.22.4 watch :app <

shadow-cljs - config: d:\work\learn-re-frame-course-files\cheffy\shadow-cljs.edn  cli version: 2.8.69  node: v10.16.0
shadow-cljs - updating dependencies
shadow-cljs - dependencies updated
shadow-cljs - HTTP server available at 
shadow-cljs - server version: 2.8.69 running at 
shadow-cljs - nREPL server started on port 3333
shadow-cljs - watching build :app
[:app] Configuring build.
[:app] Compiling ...
[:app] Build completed. (691 files, 1 compiled, 0 warnings, 9.60s)

Filipe Silva21:11:06

my question is: could I configure calva in some way that jack in will work even with the background server?

Filipe Silva21:11:30

maybe using the "calva.replConnectSequences" config item?

pez21:11:32

I am not sure I follow correctly. But let’s start with this: > this is useful for when you end up having several invocations of shadow-cljs When do you end ip having several invocations?

Filipe Silva10:11:57

I end up with multiple invocations when I am running different types of builds

Filipe Silva10:11:20

I usually run calva itself with the watch build for the main app

Filipe Silva10:11:19

but things like non-watch tests, or release builds, or shadow-cljs run invocations, are separate commands that aren't really something I should use on jack in

Filipe Silva10:11:41

every now and then I also end up restarting my editor for one reason or another

Filipe Silva10:11:25

if I am running a separate shadow-cljs server via shadow-cljs start, all of these invocations are very quick to run

Filipe Silva10:11:02

but doing so prevent jack in from working

pez10:11:14

Thanks. I will probably drop this ball if it is only in the channel. Can you post an issue about it? Not promising to fix anything, naturally, but I do like to support shadow well and as an issue more people can see it and contribute in different ways.

Filipe Silva10:11:59

I'll also ask on the shadow-cljs channel about it... because in the shadow-cljs start + jack in process, the shadow-cljs server never actually prints repl/server information at all

pez10:11:35

If you use the dependency injection parameters from the jack-in command when you start the server, maybe you can then connect Calva, instead of jacking in?

Filipe Silva10:11:52

yes I think that would work, but have not tried it

pez10:11:19

Calva looks for files created in .shadow.cljs/

pez10:11:06

I don’t know how good this guide is in explaining things, but maybe you can pick up some clues from it: https://calva.readthedocs.io/en/latest/jack-in-guide.html

pez23:11:50

Calva used to be a bit unhelpful with what parameters this or that function accepts. This changed a while ago, when @c.fehse added the parameter info to the the function hovers. In the last few versions of Calva Christian continued to improve this, by adding signature help while typing. It is a bit crude in its current form, but that is also about to change, because now we have worked together on it a bit and this is what it looks like in the PR branch. What’s new is that we show the function name, the relevant signature of the function and which argument you are currently typing. These things currently work only for non-special forms, but anyway, those are plenty. Can we get some help testing this? Here’s the VSIX: https://github.com/BetterThanTomorrow/calva/pull/450 And here is some info about Calva VSIX packages, and how to install them, and how to stop using them: https://github.com/BetterThanTomorrow/calva/wiki/Testing-VSIX-Packages

🤯 4
pez23:11:46

OK, so you can actually find the VSIX from the PR link I pasted, but here’s a direct link, for your convenience 😃 : https://1991-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.58-wip-sinature-handler-use-paredit-58dbd0ff.vsix