Fork me on GitHub
#editors
<
2018-03-28
>
dpsutton00:03:05

re switching cljs/clj for cljc files, CIDER by default evaluates the code to both connections. i don't like this feature at all

cfleming03:03:32

@pez that looks very nice 🙂

❤️ 4
dpsutton03:03:17

@cfleming how does cursive do evaluation in a cljc buffer?

pez04:03:19

Both… it makes some sense, but I wouldn’t put it as the default.

pez04:03:00

How important is a debugger to you guys? There is another extension that has that, but I have never gotten it to work. Right now focusing on the interactive programming for this extension.

seancorfield04:03:39

@pez FWIW, I haven't used a (traditional/step) debugger in any language for maybe three decades.

cfleming06:03:05

@dpsutton When you send a file, it just sends it to the currently selected REPL, whichever that is.

cfleming06:03:24

But Cursive’s story for CLJS REPLs is embarrassingly lame right now.

cfleming06:03:24

@pez A debugger is essential for me, I use Cursive’s one all the time.

cfleming06:03:57

It’s particularly useful because the Cursive code isn’t pure Clojure, but I use it for pure Clojure code too (although less)

pez06:03:50

It's worth a lot @seancorfield! I seem to manage quite well without debugger in Clojure, because Interactive Programming, I think. But I wouldn't come far with Clojure 4 VS Code without a debugger! Mostly because it is written i Javascript (I'm thinking of porting it to TypeScript, wasting to much time right now).

pez06:03:25

@cfleming: I'll have to consider adding debugger support, I guess. Do you know what the dependency requirements are for Cursive's debugger?

pez06:03:01

Also, @cfleming, what is the mess with the CLJS REPL support?

cfleming06:03:30

Well, Cursive just uses IntelliJ’s one, but that dependency comes for free because I’m building on IntelliJ. It uses JDI/JDPA under the hood.

cfleming06:03:41

Cursive doesn’t have a built-in CLJS REPL right now, just a clojure.main one that you can use to bootstrap a CLJS one. That rules out a lot of the nice functionality that the CLJ REPL has, like interactive test integration, pretty printing of results etc.

cfleming06:03:32

I think your best approach would be to integrate the CIDER debugger into Code. Writing a JDPA client from something not running on the JVM is going to be really painful.

cfleming06:03:10

The CIDER one arguably works better than Cursive’s for pure-Clojure code since it’s not line based, but doesn’t work at all for e.g. stepping into Java deps.

pez06:03:13

I see, in my case the user has to start the CLJ REPL and then bootstrap the CLJS one on top of that. Then the extension finds the respective sessions using CIDER.

pez06:03:53

I'll stay away from JDPA, thanks for the warning! 😃

cfleming06:03:54

It’s not that JDPA is bad, but writing a client without using JDI (the Java client on top of the socket protocol) is likely to be a ton of work.

cfleming06:03:07

Does Code have a Java debugger?

cfleming06:03:15

Or an extension implementing that?

cfleming06:03:58

Actually, it does - you might be able to use that.

cfleming06:03:12

If you decide to investigate going down that road, I recommend watching my talk on the Cursive debugger, I talk a lot about the various pitfalls of line-based debugging with Clojure code.

pez06:03:59

Link to that talk please!

cfleming06:03:31

Feel free to ask if you have any questions.

pez06:03:00

Thanks, I probably will.

pez06:03:59

My extension can pretty print and run tests when hooked up to the cljs repl.

pez06:03:36

Not sure what you mean with interactive test integration, though. 😃

pez06:03:21

A problem my extension suffers from badly right now is that it only reports when all tests are run, which does not work for the project I am working in right now. That and I need to implement the rerun test Cider feature.

dominicm06:03:17

@pez I already have forgotten, are you using cider nrepl?

dominicm06:03:29

Okay. I think the cider test output is very reasonable

pez06:03:55

It is, I just need to figure out how to get the results out as they come in. Haven't investigated it much yet.

pez07:03:09

I do mark any test failures in the editor, though. 😄 So running namespace tests is still very productive. I run both the tests in namespace and any conventionally named test namespace. Not sure how Emacs does that. The reason I am even using VS Code is that my little machine does not cope well with Emacs, so it is hard for me to try things out there.

snoe07:03:43

I’ve started on LSP server for clojure https://github.com/snoe/clojure-lsp if anyone is interested.

parrot 16
dominicm09:03:55

You may be interested in speaking to @U05224H0W who started to explore this already a while back.

pez07:03:32

@snoe I am! I'm pretty new to the concept of LSPs though, can you share what use cases you see for a Clojure one?

pez07:03:29

@cfleming: So given that I might be able to use that Java debugger somehow. From a user perspective, which one do you think is to prefer? (I understand that stepping into Java deps must be extra convenient for you. 😄)

snoe12:03:11

@pez Cool!. Find usages, renames across a project, and auto-requiring namespaces are the big ones I miss in vim. And then, I also feel that not having to query the repl for these things; in the Cursive way rather than the Cider way (for me) eliminates a number of headaches.

metal 4