Am I doing this wrong?! (cljs workflow again)

47 views
Skip to first unread message

Tom Locke

unread,
Jun 23, 2019, 4:11:26 AM6/23/19
to Cursive
Hi,

This is basically a plea for a feature discussed previously, to be able to disable automatic saves when running a REPL command (and any other such triggers - I think sometimes just focussing the REPL causes a save? might be wrong about that).

It just seems like it would be a very easy change to implement, and the impact on CLJS development would be enormous.

I do more CLJ development now and it’s been amazing to finally discover what the whole “interactive development” style of clojure programming is supposed to be like. It could be that I’m doing something very wrong but for me the whole experience is completely broken in CLJS due to this one issue.

Recompiling a single function with cmd+enter takes a few milliseconds. Reagent can refresh the UI in the browser in a few milliseconds. I could make an edit, press a single key-combo, and see the change instantaneously in the browser. Instead I have to wait several seconds because a full recompile+reload is triggered.

This is really the difference between “this is how clojure programming is supposed to feel”, and not.

That’s how I get to “am I doing this wrong?”. The idea that such a massive improvement is so close at hand but doesn’t work because of something silly like an autosave that can’t be switched off just seems bizarre. Surely I am missing something? Maybe there’s just not a lot of CLJS devs using Cursive?

Thomas Heller posted what is very nearly a great solution, to turn off autobuild in shadow-cljs, but it has a problem in that it requires jumping between CLJ and CLJS REPLS, which is also a pain in Cursive. Actually now that I’m posting this, I’m thinking that pain might be less bad than the current pain. I haven’t given it a try yet so I should do that.

Sorry if this was a bit of a rant. Cursive is by far my favourite code editor I’ve ever used, and I appreciate it’s a one man effort. I guess I’m just posting in case it’s not clear how much impact this seemingly small change would have.

Having Cursive be able to correctly send commands to either a CLJ or CLJS REPL (e.g. it could be a setting per REPL command), would also solve the problem, and would be super useful for all sorts of other things, but that seems like more of a lift.

Tom

Colin Fleming

unread,
Jun 23, 2019, 5:32:46 AM6/23/19
to Cursive Group
Hi Tom,

Ok, I'll add this - as you say, it's an easy change (I think, I'll check the code tomorrow). Sorry, my impression from the last email exchange was that Thomas's solution was sufficient for your needs.

The split CLJ/CLJS REPL thing is also at the top of my list of big things to implement, but there have been a lot of little things recently. I'm hoping to get to it in the next month, though.

Cheers,
Colin
--
You received this message because you are subscribed to the Google Groups "Cursive" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cursive+u...@googlegroups.com.
To post to this group, send email to cur...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tom

unread,
Jun 24, 2019, 4:36:50 AM6/24/19
to Cursive
Yes that's my bad - I meant to follow up on the previous thread but never got around to it. Thanks very much for taking a look at it.

I'm still really baffled that no one else has been asking for this, and wondering what kind of workflow other CLJS folks are using. 

Tom

Tom

unread,
Jul 26, 2019, 3:57:15 AM7/26/19
to Cursive
Ok, I'll add this - as you say, it's an easy change (I think, I'll check the code tomorrow). 

Did this make it into 1.8.2? I didn't see it mentioned but I thought maybe because it doesn't have a github issue.

Colin Fleming

unread,
Jul 28, 2019, 7:38:06 PM7/28/19
to Cursive Group
Sorry, no, this is sitting in a branch with a bunch of other changes for the next EAP. I with all the messing around with the 2019.2 version I didn't want to add more to the mix. It'll hopefully be out soon once 2019.2 is stable.

Cheers,
Colin



On Fri, Jul 26, 2019, at 7:57 AM, Tom wrote:
Ok, I'll add this - as you say, it's an easy change (I think, I'll check the code tomorrow). 

Did this make it into 1.8.2? I didn't see it mentioned but I thought maybe because it doesn't have a github issue.


--
You received this message because you are subscribed to the Google Groups "Cursive" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cursive+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages