Fork me on GitHub
#calva
<
2020-01-30
>
pez07:01:14

I think there are two separate problems at play. Something is wrong in Calva when it comes to dealing with even mildly large results, and it also seems to lock up other Calva related commands (e.g. backspace is a Calva command when in a Clojure file). But I can't see how Calva would cause the REPL server to run amok...

otwieracz07:01:33

@pez is there any workaround for my issue with namespaced keywords?

otwieracz07:01:59

@pez any way to debug why I am getting it and you don't? Is this possible I've got something out of date?

otwieracz08:01:15

@pez I am developing in VSCode via SSH, if that matters.

pez08:01:54

I doubt that matters. But you could try the same piece of code in a local project.

pez08:01:08

As far as I know there is no workaround, unfortunately. I will see if the cljc version of rewrite-clj behaves any better, so that is the only hope I can provide right now...

otwieracz08:01:33

But what's surpsising is that it seems to work in other projects, via WSL in Windows if that matters..

otwieracz08:01:47

Can I somethow check version of clj-fmt?

otwieracz08:01:55

Which calva is using?

pez08:01:56

Calva is using a forked version. This one, iirc: https://github.com/PEZ/cljfmt/tree/calva-fmt

pez08:01:08

Agree it is surprising with this one instance of it not working. I don't remember if you have found the actual error message... was it about namespaced keywords?

pez08:01:54

So the same entire source file works in some other project?

otwieracz08:01:37

I haven't tried entirely the same source.

otwieracz08:01:51

I've got side question - is this possible to redirect logs and errors from output tab to repl?

otwieracz08:01:56

(from calva says to repl)

otwieracz08:01:50

@pez Unchecking Calva › Fmt: Align Map Items work-arounds this issue (but I'd miss this feature :()

pez08:01:56

> is this possible to redirect logs and errors from output tab to repl? See if the setting regarding Calva async output does what you want.

pez08:01:09

There is a command for reformatting with align. (Bound to ctrl+alt+l by default.

pez08:01:31

(It will probably fail the same way on that particular input, but anyway.)

pez08:01:10

Please report this issue with what you now know, @slawek098. Even if the rewrite-clj fix might take a while, I should be able to retry formatting w/o map align when it fails like that.

otwieracz08:01:07

@pez I've got it set to both but it spits nothing to REPL 😕

pez09:01:28

Might be a bug. I've heard that there are sometimes bugs in the product. 😃

otwieracz10:01:59

OK, so the difference is that when I evaluate something in REPL, it get's properly printed in repl.

otwieracz10:01:17

But when I evaluate it with Ctrl+Alt+C Space, it gets sent to Calva says

pez11:01:51

Use ctrl+alt+c ctrl+alt+space to evaluate in the REPL window.

pez11:01:19

The command with just space also populates the hover for the evaluated form (so not just in Calva says).

pez11:01:58

(The results that is)

otwieracz11:01:48

Ha, thank you!

pez16:01:28

@grounded_sage I think I know what causes the client side problems for you. I just experienced it myself. I opened a deep .edn file where everything was on one line. Is that what you do as well? I'll report the bug and will see what I can do to fix it. But until fixed, anyone using Calva should avoid opening large edn files.

grounded_sage16:01:40

I read in a JSON file from disk and convert it to edn in a (def …)

pez16:01:41

That sounds like something different than what caused me problems...

grounded_sage17:01:09

Though possibly related… solution. I think the my problem will resolve with the continued work going into Calva. It’s difficult for me to describe a repro.

🤞 4
pez20:01:31

Dear Calva-friends: Please be aware that opening Clojure and EDN files with very long lines can cause Calva to become fully locked up and your computer to get quite hot: https://github.com/BetterThanTomorrow/calva/issues/556 I'll look into this and see what can be done about it.