rewrite-clj 2021-04-06

Hello! ๐Ÿ‘‹

Iโ€™m trying to elide dead feature flag branches from our codebase and rewrite-clj seems to be the tool for that type of thing ๐Ÿ™‚

Right now I have a big function that returns something that is wrapped in <forms: โ€ฆ > . I tried rewrite-clj.zip/string to just turn it into a regular string but that didnโ€™t work (same for root-string ). In particular Iโ€™m getting the following error:

rewrite_clj.node.forms.FormsNode cannot be cast to clojure.lang.IFn

Duh, just str works ๐Ÿ˜„

๐Ÿ‘ 1

๐Ÿ˜…

Glad you got things working @martinklepsch! Without seeing your code it is hard for me to guess why the zip APIโ€™s string fns were not working for you. Could it be that you were calling these fns on nodes rather than a zipper?

Yeah it seems so

I didn't even know z/string existed, I've always just used str :)

Honestly no idea why I didnโ€™t just try that hahaha

Well, the nice thing is we got a visit from you here in the rewrite-clj channel! ๐Ÿ™‚

always here to entertain ๐Ÿ˜‚

but yeah, I was thinking the same, itโ€™s nice when the circle closes ๐Ÿ™‚

โค๏ธ 1