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`.
Joel 2020-10-17T06:02:00.341800Z

specified the maven server and then it worked.

šŸŽ‰ 1
Joel 2020-10-17T06:02:32.342500Z

I'm not able to navigate (go to definition of function) or list callers to a function. Does Calva not do that?

2020-10-17T08:05:50.343400Z

@joel380 when connected to a repl that has the appropriate definitions loaded, i was able to use f12 to go to definition

2020-10-17T08:08:08.344700Z

@pez i started passing some generated strings to calva's lexer today and noticed that _* is parsed as:

[{'type': 'junk', 'offset': 0, 'raw': '_', 'state': {'inString': False}}, 
 {'type': 'id', 'offset': 1, 'raw': '*', 'state': {'inString': False}},   
 {'type': 'eol', 'raw': '\n', 'offset': 2, 'state': {'inString': False}}]
is that intentional?

pez 2020-10-17T08:23:56.347200Z

@joel380 Calva does not list callers/references. That would be sweet. It does allow you to peek and navigate to definitions, though. You probably need to check if you have the right nrepl dependencies and that the current file is loaded.

pez 2020-10-17T08:26:49.348400Z

@sogaiu, thanks for digging up those! Please file it as an issue.

2020-10-17T08:28:42.349500Z

ok. so if something looks odd, should i just file an issue and further discussion can take place there? i'm bound to be mistaken or uninformed on some of these things šŸ™‚

pez 2020-10-17T08:34:23.353400Z

Well, I appreciate that you inform here if you wonder if an issue might or might not be what we need. However, with these parsing things there is a truth to be consulted, the reader. We want the Calva parser to stay as close to the reader as possible. Maybe you can rephrase that other issue you filed, about ignore markers and the absence of spaces, to read more like a collection of parsing issues you've found. At least until we pick it up and start trying to fix them.

2020-10-17T08:38:02.355500Z

ok, so let's see if i've got your idea correct: 1) rephrase existing issue and accumulate things there for the time being 2) if it looks like it differs from what the reader might say, add to the issue 3) if there seems to be a doubt, mention on this channel or contact you some other way to discuss and decide further action how does that seem?

pez 2020-10-17T08:52:21.355900Z

If you agree, then it seems good.

pez 2020-10-17T08:55:57.356700Z

Did you generate those strings using the fastcheck things in Calva's test harness, btw?

2020-10-17T09:01:31.358800Z

i'm fine to try the above suggested course of action. re: generating the strings -- no, i am pretty ignorant of that which you mentioned :) i am applying this: https://github.com/sogaiu/hypothesis-grammar-clojure

pez 2020-10-17T09:11:13.359800Z

I see. This is the fast-check thing that I was talking about: https://github.com/BetterThanTomorrow/calva/blob/dev/src/extension-test/unit/cursor-doc/clojure-lexer-test.ts

2020-10-17T09:13:19.360300Z

ah cool -- thanks for the info. will take a look.

pez 2020-10-17T09:34:23.360400Z

šŸŽ‰ Thanks, @stefan.van.den.oord!

1
ā¤ļø 3
2020-10-17T18:07:27.364600Z

My Jack-in from Calva has just stopped working. The pop up window does not appear now at all. Any suggestions on how I can debug the problem.

šŸ‘ 2
pez 2020-10-17T18:08:59.366600Z

@humanist1965 can you try with v2.0.126? This could be an issue with the latest version, and if so we need to take immediate action.

2020-10-17T18:19:12.368800Z

@pez Yes v2.0.1.126 works. So it does appear to be a problem with the latest version. Iā€™m on macOS Catalina (in case that is relevant).

simon 2020-10-17T18:55:23.369200Z

jonathanhuston 2020-10-17T19:30:54.370600Z

Hi @pez ā€“ same problem as @humanist1965 on Catalina, also works when I switch back to v2.0.126.

pez 2020-10-17T19:52:10.371400Z

@humanist1965 @jonathan.huston what kind of projects are you jacking in to?

jonathanhuston 2020-10-17T20:09:02.373Z

@pez nothing fancy, just a simple Leiningen project with five source files and a project.clj, no external dependencies. Calva starts up just fine in v.2.0.127, but when I try to jack in with the keyboard shortcut or the command palette, nothing at all happens. No problems in 126.

šŸ‘ 1
pez 2020-10-17T20:11:13.373400Z

What can you see in the Developer Console? (Help menu)

jonathanhuston 2020-10-17T20:25:26.375200Z

@pez jacking in has no effect whatsoever, even in the developer console, no error or warning

šŸ‘ 1
pez 2020-10-17T20:40:06.376100Z

Does it matter if you try jack-in from the command palette or via the keyboard shortcut?

jonathanhuston 2020-10-17T20:40:37.376600Z

@pez nope, no effect in either case

pez 2020-10-17T20:51:38.377200Z

Does the Calva command for running all tests not work for your setup?

pez 2020-10-17T20:52:31.378100Z

I'm also on Catalina, so am looking for something that can reproduce the error...

bringe 2020-10-17T20:54:10.378500Z

I'm on arch linux, and nothing happens at all when I run Jack-in šŸ˜¬

bringe 2020-10-17T20:54:20.378700Z

Clojure cli project

jonathanhuston 2020-10-17T21:13:25.379Z

checked on Fedora, with the same result

šŸ‘ 1
simon 2020-10-17T21:13:38.379100Z

I probably missed that command @pez. Do you mean https://calva.io/test-runner/? I tried the ctrl+alt+c shift+t combo but maybe there's mismatch of shortcuts. I get this weird red-brown colored element in the VS Code sidebar

simon 2020-10-17T21:17:46.379500Z

I think it searches file names that contain a "t" šŸ˜‰

bringe 2020-10-17T21:20:14.379900Z

I see the start of the issue..

bringe 2020-10-17T21:21:55.380600Z

https://github.com/BetterThanTomorrow/calva/blob/b5fa6d568f8e6da9a7c47c5e4262781bb9823893/src/nrepl/jack-in.ts#L145 liveShareSuppoer.setupLiveShareListener() is throwing an exception, and the catch block just returns and short-circuits jack-in

šŸ‘ 1
bringe 2020-10-17T21:21:59.380900Z

@pez

pez 2020-10-17T21:26:08.383400Z

Great. If you have some time to try to ship a fix, that would be great. Otherwise I'll give it a go tomorrow morning. It is getting too late here and my brain is not really up to it. šŸ˜ƒ

bringe 2020-10-17T21:28:09.384100Z

I may be able to ship something today, but should we roll back for now? I don't know the rollback process

bringe 2020-10-17T21:28:35.384600Z

@pez. Also found that this call returns null if the live share extension is not installed https://github.com/BetterThanTomorrow/calva/blob/b5fa6d568f8e6da9a7c47c5e4262781bb9823893/src/liveShareSupport.ts#L17

bringe 2020-10-17T21:28:48.385100Z

Which results in the next line throwing an error for calling a function on null

bringe 2020-10-17T21:31:54.385800Z

So, a check there should fix. I'm on it now

pez 2020-10-17T21:33:17.387400Z

Awesome. Will you be able to test a VSIX quickly, if @brandon.ringe posts it here, @jonathan.huston, @humanist1965?

pez 2020-10-17T21:34:12.387500Z

Haha, weird. But try from the command palette?

pez 2020-10-17T21:34:49.388200Z

Anyway, I'm sorry to abandon you, but I am pretty useless right now. šŸ’¤

bringe 2020-10-17T21:35:43.388700Z

No problem! Sleep is important. Rest up

bringe 2020-10-17T21:36:08.389200Z

The benefit of us having such different time zones šŸ˜„

simon 2020-10-17T21:39:10.389300Z

I refreshed my workspace and looked in the key bindings (I wasn't successful there though). I don't know what I did exactly now, but the test runner works now as expected šŸ˜‰

simon 2020-10-17T21:56:00.390300Z

Is there a way to auto-format clojure maps such that values are vertically aligned, similarly to how Intellij/Cursive can do it?

pez 2020-10-19T06:59:11.397900Z

There is a formatter config for this. See https://calva.io/formatting/

pez 2020-10-19T07:00:02.398200Z

Beware that it behaves a bit crazy at times. I stick to manually aligning using he command.

pez 2020-10-19T10:40:56.398600Z

(`:align-associative?` is the config param. I forgot to mention that.)

šŸ‘Œ 1
bringe 2020-10-17T22:02:05.390700Z

Try the (experimental) command "Format and align current form" - default key kinding is ctrl+alt+L

bringe 2020-10-17T22:02:25.390900Z

It's experimental, but seems to work for me

simon 2020-10-17T22:03:11.391100Z

thanks @brandon.ringe :star-struck:

āœŒļø 1
bringe 2020-10-17T22:04:02.392200Z

@jonathan.huston @humanist1965 and or anyone else for whom jack-in was broken, please test this vsix to make sure it works now: https://8346-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.128-fix-broken-jack-in-dd74c009.vsix

simon 2020-10-17T22:05:40.392400Z

Could I rebind it to be executed on save?

bringe 2020-10-17T22:08:02.392600Z

Hmm... not that I'm aware of. @pez, is this possible? And if not, is this something that would be a good idea / possible to add to Format As You Type, or whatever the default formatting is that happens when you press tab?

bringe 2020-10-17T22:08:56.392800Z

This is working for me, if I can get a confirmation from someone soon that would be awesome. Otherwise I may just push the new version since this is a time-sensitive thing imo.

bringe 2020-10-17T22:34:08.393Z

Have some other things to do today, so releasing now šŸš€

bringe 2020-10-17T22:53:05.393800Z

Version 2.0.128 is out, and jack-in should be working for all! Please report any issues.

šŸ‘ 2
2020-10-17T23:06:51.394300Z

seems to be working fine here šŸ™‚ (sorry it's not an issue)