Fork me on GitHub
#chlorine
<
2020-05-29
>
fabrao03:05:51

Hello all, I saw today a strange behavior in Chlorine. I turned on refresh namespace when save a file

fabrao03:05:58

When I save it with cursor at top, it gives the error in Chlorine console

"No value supplied for key: true"
But if I go with cursor to the end of file, no error apear 🤔

seancorfield03:05:02

Like I said before: seriously, just turn off all the refresh stuff and ignore it. Those "helpful" things bite nearly everyone who uses them in my experience.

seancorfield03:05:41

@fabrao I suspect it's that Chlorine doesn't always know how to figure the namespace in a file if the cursor is above the ns form. I mentioned it to @mauricio.szabo a while back. Not sure if there's a GitHub issue for it.

seancorfield03:05:46

I don't see an issue -- I'll create one. I should have created it some time ago.

fabrao03:05:16

Sean, you consider using what to do that?

fabrao03:05:13

like chlorine:load-file , it will work in the same way as refreshing namespace?

seancorfield03:05:51

@fabrao As I've said before: eval every top level form as you edit code -- you don't even need to save files for that.

seancorfield04:05:09

A good RDD workflow means evaling everything you change, as you change it.

fabrao04:05:49

Ok, that´s the way I thougth it was a good workflow for dayly , but I got your point and I agree with you

seancorfield04:05:47

My workflow tends to involve saving code at somewhat random times so the code often isn't compilable when I save it 🙂 but it is always compilable when I eval it, because that's what I'm used to: edit, eval, edit, eval, edit, randomly save, edit, eval 🙂

seancorfield04:05:46

I will often switch back and forth between files, making changes and eval'ing them as I go, editing code (and eval'ing it), editing tests (and eval'ing them and running them).

fabrao04:05:05

I used to run tests each saving 🙂 , but it´s ugly when tests growing LOL

seancorfield04:05:26

I run individual tests ctrl-; t with my cursor on the test name (I feel I should enhance that at some point to allow the cursor to be anywhere in the test form).

fabrao04:05:51

that´s I´m doing now

seancorfield04:05:01

So I edit a test (or write a new one) and then ctrl-; B and then ctrl-; t.

seancorfield04:05:19

(and at some random point I do ctrl-s to save a file 🙂 )

fabrao04:05:57

thanks again for your help. Have a nice day, cya

seancorfield04:05:15

Cya tomorrow 🙂

mauricio.szabo13:05:24

Just catching up now 🙂. I use refresh, but not on-save. But I also mostly work on Clojure code that's refreshable,

mauricio.szabo13:05:44

(Also, thanks for opening the issue :+1:. I'll look at it right now. I was worried about fixing that implementation because I saw some freezes on Atom when I wrote the first code for the solution, but since 0.7.0 I made some performance optimizations that will probably not freeze Atom anymore)