Yannick Scherer, the author of rewrite-clj, is alive. Proof: he just liked a post of mine on Twitter. https://twitter.com/xscys
FWIW I had a short email conversation with Yannick last year. I never met him but we have a mutual friend, I was doing stuff with rewrite-clj and was curious about the status. He wrote he wanted to get a few more things in, which he did, like better support for namespaced maps (although I believe it can still be improved.) He also wrote > Now, based on the already observed busy-ness I'd welcome anyone that would like to take the role of a co-maintainer. I will respond to PRs and issues eventually but I just cannot guarantee short latencies. So, yes, I'm all for more activity within the project but if I'm the sole maintainer I fear that frustrations will arise for all sides.
I also floated the idea of someone else requesting Clojurists Together funding for working on rewrite-clj, which he thought was a cool idea. > It is an interesting idea and maybe this will make things more interesting for potential co-maintainers. Personally, I don't need financial incentives to work on OSS – at the moment it's a question of timing/energy, mostly influenced by my work situation (lots of early stage projects, new responsibilities, all that stuff).
to me this would make a lot of sense, since so much tooling depends on it it would be a really good way to allocate some of that grant money
He has never responded to any Github issue or e-mail from anyone in this group (at least not since April 2019). At some point we worried that there was something wrong.
Meanwhile there are several forks of rewrite-clj around with various patches.
my guess is he's just really busy with other stuff. maybe it's time to consolidate everyone's forks into clojure-commons
@lee is working on a .cljc port
which will be released under clj-commons
maybe he should do a CT if he's up for it
I've made changes to rewrite-clj that are specific to clj-kondo and probably not mergeable
yeah I saw your monkey patch. You don't see a lot of those in Clojure 🙂
it used to be a monkey-patch but now it's a vendored version with a patch
ah I see
one thing I fixed was the namespaced map behavior (this was the monkey patch) but later I also changed how metadata is processed
because that was a common source of errors in clj-kondo
my main frustration is that the zipper doesn't skip over uneval nodes
what if you want to rewrite it?
then you use clojure.core/zip
functions
the zipper skips over comments and whitespace, but not over uneval. uneval to me is just another syntax for a comment, so it's not very consistent.
right. I used to use the zippers on clj-kondo a bit, but after doing some performance tests I found that manually editing was way faster
for some things it might be nice to not skip comments and whitespace...perhaps it's practical to consider configurable skipping?
yeah you suggested this many moons ago @sogaiu and I still think it is a good option. We’ll break a ton of code if we change default behaviour so an option makes sense.
may be it can be considered if there is clojurists together funding 🙂
What is an uneval node?
#_
that took too long to type on my phone 🙂
lol
i'm not sure i've seen the terminology used elsewhere -- i don't see it in the clojure source. there a close thing is the DiscardReader, so may be it could have been called a discard node?
I've been calling it uneval for a while now, but probably got it from rewrite-clj
As planned, I am diving back into rewrite-cljc and working toward a release. I'll post progress here as a device to (for sure, maybe, probably) keep myself from distraction. :simple_smile: I'll start with taking a look at getting tests running under graal. I've got existing graalifcations to use as a reference (thanks @borkdude!).
hey @plexus, 👋 ! One thing I did not really notice until digging into the rewrite-clj code is that you can instead use the *
functions from rewrite.clj.zip
to get at the raw zipper. For example down*
is the raw version of down
. Actually this is the only way to go if you have positional support enabled on your rewrite-clj zipper.
@lee is rewrite-cljc based on the clj or the cljs api? are there other changes/differences?
@snoe, there will be minor gotchas, but I am shooting for compatibility with both. Here's my current summary: https://github.com/lread/rewrite-cljs-playground/blob/master/doc/design/01-merging-rewrite-clj-and-rewrite-cljs.adoc
My intention is that it should be a drop in replacement for rewrite-clj and rewrite-cljs. Minor changes will be required for rewrite-cljs if you are using positional support.
Happy to hear any feedback or concerns from existing rewrite-clj and rewrite-cljs users.