clj-commons / rewrite-clj

Rewrite Clojure code and edn
https://cljdoc.org/d/rewrite-clj
MIT License
592 stars 55 forks source link

sexpr on tag metadata now expands to long form #282

Closed lread closed 5 months ago

lread commented 5 months ago

We also now throw when trying to sexpr invalid metadata.

Closes #280

lread commented 5 months ago

@borkdude, when you have a moment, any objections/concerns to this change?

borkdude commented 5 months ago

I think this looks correct!

Side-question: why is sexpr now called sexpr*? I have code in clj-kondo here which needs to be changed accordingly as well:

https://github.com/clj-kondo/clj-kondo/blob/c16439a7bbbcde3c3f8f2b4bf0953b8b57694b27/parser/clj_kondo/impl/rewrite_clj/node/meta.clj#L16

lread commented 5 months ago

Thanks!

Side answer: I don't remember exactly, but it looks like I made this change to support optional opts for namespaced elements: https://github.com/clj-commons/rewrite-clj/commit/1299f67d1691cc813ba1d822f58e79c667749689