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`.
pez 2020-08-06T07:39:04.125600Z

Alright, since .117 contains some of the fixes in the repl-window-less build (in a better shape), here's a new one, that I see as a release candidate: https://7278-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.118-711-remove-old-repl-window-7177b7b8.vsix

Cris B 2020-08-06T07:50:53.127600Z

With that vsix I'm finding the eval results usually disappear a fraction of a second after being displayed. This happened sometimes with earlier builds (I was trying to figure out a pattern before reporting it), but happens nearly every time now.

pez 2020-08-06T08:14:47.128Z

Generally, or in some context?

Cris B 2020-08-06T08:34:25.128500Z

It seems to be nearly every time I eval any form after an edit.

Cris B 2020-08-06T08:35:06.128700Z

(with a 2nd eval in the same spot, the output persists as expected)

Cris B 2020-08-06T08:36:44.128900Z

Ah, and it's specific to 'eval top-level form'. Doesn't happen with 'eval current'

Cris B 2020-08-06T08:49:48.129100Z

I've just reproduced this with a minimal deps.edn project (empty map, 1 source file), and using the vanilla 'Clojure CLI' connect sequence.

pez 2020-08-06T08:56:26.129300Z

Does it matter if you use a shortcut, or which shortcut?

Cris B 2020-08-06T09:09:36.129500Z

Good point. Just tried - invoking the command directly (ie via ctrl-shift-p menu) works as expected. The problem occurs with the default alt-enter. Probably something to do with the alt menu issue (which I wouldn't have considered as I turn the menu bar off, but I think alt still selects it). Have to go now, but I'll have a further dig a bit later.

pez 2020-08-06T09:20:05.129700Z

Then this should be already an issue since .109 (which introduced the alt+enter shortcut), right? If so I won't regard it as a stopper for this PR.

Cris B 2020-08-06T10:08:19.129900Z

Yep that makes sense.

pez 2020-08-06T11:05:03.132100Z

The inline display should be dismissed when the document is edited (a decision that could be questioned, but anyway). Can you see if the document is marked dirty when you use the shortcut?

dabrazhe 2020-08-06T11:55:32.132300Z

@pez Great job! What gets in the way is the error reporting. Would it be possible to limit the error to just the description, it the first part ?

dabrazhe 2020-08-06T11:56:02.132500Z

; Execution error (ArityException) at aws-http-core.fidlle/eval15719 (form-init4379729622409352072.clj:19).
; Wrong number of args (0) passed to: clojure.core/rand-int
[{:file "AFn.java" :line 429 :method "throwArity" :flags [:java]}
 {:file "AFn.java" :line 28 :method "invoke" :flags [:java]}
 {:file "form-init4379729622409352072.clj" :line 19 :fn "eval15719"  :method "invokeStatic" :flags [:project :repl :clj]}
 {:file "form-init4379729622409352072.clj" :line 19 :fn "eval15719"  :method "invoke" :flags [:dup :project :repl :clj]}
 {:file "Compiler.java" :line 7176 :method "eval" :flags [:tooling :java]}
 {:file "Compiler.java" :line 7166 :method "eval" :flags [:dup :tooling :java]}
 {:file "Compiler.java" :line 7131 :method "eval" :flags [:dup :tooling :java]}
 {:file "jar:file:/Users/denis/.m2/repository/org/clojure/clojure/1.10.0/clojure-1.10.0.jar!/clojure/core.clj:3214" :fn "eval"  :method "invokeStatic" :flags [:clj]}
 {:file "jar:file:/Users/denis/.m2/repository/org/clojure/clojure/1.10.0/clojure-1.10.0.jar!/clojure/core.clj:3210" :fn "eval"  :method "invoke" :flags [:clj]}
.. etc

dabrazhe 2020-08-06T11:56:41.132900Z

I'd love to see only

; Execution error (ArityException) at aws-http-core.fidlle/eval15719 (form-init4379729622409352072.clj:19).
; Wrong number of args (0) passed to: clojure.core/rand-int

pez 2020-08-06T12:06:18.133500Z

File an issue about it. There might be a way, but it will probably be a fair amount of work.

dabrazhe 2020-08-06T15:26:10.133700Z

actually in the Repl window you had this option to show only the Clojure error, which is great )

pez 2020-08-06T15:31:17.133900Z

Yes, the REPL window had some advantages, for sure. πŸ˜ƒ

pez 2020-08-06T15:33:04.134100Z

But if we can solve so that you can bring forward the stacktrace at will, we can probably do some filtering on it as well. Mention that filtering thing in the issue.

pez 2020-08-06T15:45:44.137400Z

Dear Calva friends. I have just released v2.0.118, which gets rid of 2 kloc (and with them the old REPL window). With your help, we've tested it as best as we can, and removed some bugs. Hopefully there are not many/any left that could have to do with the removal. Please help me be on the alert to fix any issues this release creates. Thanks! πŸ™ ❀️

❀️ 5
pez 2020-08-07T08:02:48.147600Z

So, it seems things work differently in clj and cljs.

cljs::cljs.user=> 
1
1
cljs::cljs.user=> 
2
2
cljs::cljs.user=> 
3
3
cljs::cljs.user=> 
[*3 *2 *1]
[1 2 3]
cljs::cljs.user=> 

pez 2020-08-07T08:03:40.147800Z

@brandon.ringe ^

pez 2020-08-07T10:23:57.148200Z

I just released .119 which should fix this reliably for both cljs and clj sessions. Please test and confirm, peeps!

πŸŽ‰ 1
bringe 2020-08-07T16:08:54.159Z

Awesome! Will test

Maksim Glebov 2020-08-07T20:11:54.161700Z

I don't have a cljs project for testing right now, but clj works fine! Thank you, @pez! ❀️ I'll check cljs on the weekend and let you know if something is wrong.

dregre 2020-08-06T21:10:14.139400Z

I’m curious, is there a write-up somewhere about why the old REPL is gone and why the new output-file-driven approach is better?

dregre 2020-08-07T17:59:41.160200Z

@pez I love the new experience, this has been wonderful β€”Β thank your maintaining such a great project!

❀️ 1
pez 2020-08-07T18:37:11.161200Z

Lovely that you tell us! Please consider writing a review. 😍

dregre 2020-08-07T18:59:07.161400Z

I will write one! Cheers

Maksim Glebov 2020-08-06T21:23:58.139500Z

This is what you're looking for: https://clojureverse.org/t/calva-summer-of-bugs-2020/6303

❀️ 1
dregre 2020-08-06T21:28:20.140300Z

Thank you! πŸ™:skin-tone-2:

1
Cris B 2020-08-06T22:02:01.140700Z

I think I've found something - it seems to be an interaction with auto-save. I normally have that turned on, but with it switched off (which I just did temporarily to control file dirtiness), the shortcut behaves properly. This also explains why the problem didn't always occur for me. I had auto save on after a 1s delay. If the eval is done before the 1s is up, the eval results are dismissed. If after, they remain. This means the problem is easily worked around by switching auto-save to occur on switch editor/window focus rather than after delay. No idea why this only happens with alt-based shortcuts. But anyway it's a further clue.

Maksim Glebov 2020-08-06T22:02:24.140900Z

Seems like accessing recent results is broken again.

πŸ‘Ž 1
pez 2020-08-06T22:25:25.142900Z

File as an issue please. We will need to figure this out once and for all.

Maksim Glebov 2020-08-06T22:31:00.143100Z

It works in a previous version .117. Maybe we just need to reopen https://github.com/BetterThanTomorrow/calva/issues/724?

Cris B 2020-08-06T23:30:29.143400Z

Thinking about this further - unless there's an obvious & riskless fix I don't think you even need to address this. Auto-save after a delay is generally a bad idea, made unnecessary in any case by vscode's hot exit. Perhaps add a note somewhere to docs that you can refer anyone else to who has this issue. The workaround is just to switch auto-save to onWindowChange or onFocusChange