Fork me on GitHub
#rewrite-clj
<
2020-06-17
>
lread13:06:00

coolio, clojure-lsp rewrite-cljc upgrade test helped me find one omission in rewrite-clj (and hence rewrite-cljc) otherwise upgrade pretty straightforward https://github.com/lread/clojure-lsp/commits/lread-rewrite-cljc-test

borkdude13:06:07

what was the omission?

lread13:06:31

I notice that most users of rewrite-clj don’t use the (ex zip/next ext) fns and use the underlying zipper directly, probably due to the fact that this wasn’t documented very well.

lread13:06:40

so this is good news for rewrite-cljc, but not terribly exciting for users of rewrite-cljc until I get it up on clojars.

lread13:06:58

So I’ve tested rewrite-cljc against cljfmt, zprint and clojure-lsp. Happy to try more if anybody has recommendations.

lread13:06:31

In the short term, I’m gonna head back to cljdoc to finish up a couple of PRs I initiated many moons ago.

borkdude13:06:46

I'll do a call out on Twitter

borkdude13:06:53

for projects using rewrite-clj

borkdude13:06:02

although this should also be discoverable with data from clojars?

lread13:06:16

You sir, are a man of action! Thanks!

lread13:06:45

I think I want to move to clj-commons before first release. And I am a bit concerned about current namespace handling and potential breaking changes, but if I mark first release at alpha, I guess breaking changes would be ok.

borkdude13:06:12

What would be breaking?

borkdude13:06:02

If you're concerned about people having to change their namespaces from rewrite-clj. to rewrite-cljc., I don't think that's breaking. Your lib is a new one

borkdude13:06:19

similar to clojure.java.jdbc and next.jdbc

lread13:06:27

Nah… not worried about that… I think that rewrite-clj -> rewrite-cljc was a good choice.

lread13:06:11

More worried about offering something up around namespaced maps that isn’t fully considered yet.

borkdude13:06:34

You do have tests right?

borkdude14:06:43

Btw, I found a way to have tests run in a GraalVM native-imega. It can be done using a feature branch of babashka, but maybe this can be even a separate project

lread14:06:13

I’m not sure what makes sense for cljs in the area of namespaced maps and sexpr.

lread14:06:57

Cool! I was fiddling around with running rewrite-cljc test suite in GraalVM native-image a while back. Had something working locally but could not get past memory limitations of free CI services. Was thinking of splitting tests into multiple runs to overcome.

borkdude14:06:32

yes, I remember that.

borkdude14:06:00

so how it works with babashka: you include the library like the other built-in libraries. and then you run the unit tests from source with bb

lread14:06:40

oh that’s interesting

borkdude14:06:48

the unit tests being the very same unit tests that normally run in the JVM

borkdude14:06:58

I'm already doing this with several other libraries

lread14:06:55

that’s a great idea, I will definitely explore

borkdude14:06:16

maybe there can even be a bb spin-off (like bootleg, spire) that includes rewrite-cljc so you can use it for scripting

borkdude14:06:22

or code formatting, etc.

borkdude14:06:07

(parcera is another clojure parser that preserves whitespace)

lread14:06:48

Cool, thanks! Parcera is interesting too in itself.

borkdude14:06:35

do you keep a list of changes/fixes compared to rewrite-clj(s)? I'd be interested in those for my own fork that's in clj-kondo

lread14:06:31

Yeah, I think I have been pretty thorough in my migration notes https://github.com/lread/rewrite-cljc-playground/blob/master/doc/design/01-merging-rewrite-clj-and-rewrite-cljs.adoc but probably useful to split out changes/fixes compared to rewrite-clj(s) to separate doc. I’ll make a todo to see if that would work.

lread14:06:43

So while I’ve been in lurk mode for the last long while, I’ve noticed you remain a whirlwind productivity! But even more whirlwindier and productivitier! simple_smile

borkdude14:06:08

Addicted to Clojure, guilty as charged.

lread14:06:15

Your addiction is a positive force!

borkdude14:06:10

I'm using my addiction for good, not evil

lread14:06:21

If only more addicts would follow your example, the world would be a better place. simple_smile

plexus14:06:17

refactor-nrepl also uses rewrite-clj

lread15:06:06

Ah right, thanks @plexus, will check it out!

lread20:06:01

refactor-nrepl upgrade test to rewrite-cljc success https://github.com/lread/refactor-nrepl/commits/lread-rewrite-cljc-test

✔️ 6