Fork me on GitHub
#calva
<
2020-08-06
>
pez07:08:04

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

pez07:08:04

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

dennisa11:08:32

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

dennisa11:08:02

; 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

dennisa11:08:41

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

pez12:08:18

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

dennisa15:08:10

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

pez15:08:17

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

pez15:08:04

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.

cb.lists07:08:53

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.

cb.lists07:08:53

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.

pez08:08:47

Generally, or in some context?

cb.lists08:08:25

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

cb.lists08:08:06

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

cb.lists08:08:44

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

cb.lists08:08:48

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

pez08:08:26

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

cb.lists09:08:36

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.

pez09:08:05

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.

cb.lists10:08:19

Yep that makes sense.

pez11:08:03

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?

cb.lists22:08:01

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.

cb.lists23:08:29

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

pez15:08:44

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! ๐Ÿ™ โค๏ธ

glebovmaksim22:08:24

Seems like accessing recent results is broken again.

pez22:08:25

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

glebovmaksim22:08:00

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

pez06:08:57

Actually it didn't really work in 117 either. Or rather, it came at a price for other things not working.

pez08:08:48

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

pez10:08:57

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

brandon.ringe16:08:54

Awesome! Will test

glebovmaksim20:08:54

I don't have a cljs project for testing right now, but clj works fine! Thank you, @! โค๏ธ I'll check cljs on the weekend and let you know if something is wrong.

andre20621:08:14

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?

andre20621:08:20

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

andre20617:08:41

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

pez18:08:11

Lovely that you tell us! Please consider writing a review. ๐Ÿ˜

andre20618:08:07

I will write one! Cheers