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
what was the omission?
zip/insert-child* fn was missing https://github.com/lread/rewrite-cljc-playground/commit/4eeac8576341cfd0b205e21745b8ca4063b70476
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.
so this is good news for rewrite-cljc, but not terribly exciting for users of rewrite-cljc until I get it up on clojars.
So I’ve tested rewrite-cljc against cljfmt, zprint and clojure-lsp. Happy to try more if anybody has recommendations.
In the short term, I’m gonna head back to cljdoc to finish up a couple of PRs I initiated many moons ago.
ship it
😉
I'll do a call out on Twitter
for projects using rewrite-clj
although this should also be discoverable with data from clojars?
You sir, are a man of action! Thanks!
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.
What would be breaking?
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
similar to clojure.java.jdbc and next.jdbc
Nah… not worried about that… I think that rewrite-clj -> rewrite-cljc was a good choice.
More worried about offering something up around namespaced maps that isn’t fully considered yet.
You do have tests right?
Yup!
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
I’m not sure what makes sense for cljs in the area of namespaced maps and sexpr.
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.
yes, I remember that.
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
oh that’s interesting
the unit tests being the very same unit tests that normally run in the JVM
I'm already doing this with several other libraries
that’s a great idea, I will definitely explore
maybe there can even be a bb spin-off (like bootleg, spire) that includes rewrite-cljc so you can use it for scripting
or code formatting, etc.
@lee I've got something similar here: https://github.com/babashka/pod-babashka-parcera
(parcera is another clojure parser that preserves whitespace)
Cool, thanks! Parcera is interesting too in itself.
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
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.
awesome!
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:
Addicted to Clojure, guilty as charged.
Your addiction is a positive force!
I'm using my addiction for good, not evil
If only more addicts would follow your example, the world would be a better place. :simple_smile:
refactor-nrepl also uses rewrite-clj
Ah right, thanks @plexus, will check it out!
refactor-nrepl upgrade test to rewrite-cljc success https://github.com/lread/refactor-nrepl/commits/lread-rewrite-cljc-test