Closed sritchie closed 7 months ago
@borkdude do I understand the recent #sci thread on slack correctly in that we need to manually add unquote-splicing for this to work? Note that editor mode is a browser-only variant of clerk that's powered by sci, demo here.
@mk I don't understand what this has to do with the above issue?
I'll take a look at this issue today
This is a rewrite-clj node -> s-expr issue. Note that this is not necessarily a rewrite-clj bug since not all strings can be represented as s-expressions without information loss.
E.g. you cannot represent ::s
as an s-expression and keeping it as an unresolved auto-qualified keyword. The same is true for syntax-quotes since they need to be resolved at read time using the environment you're qualifying symbols in.
As such I recommend transforming to forms at a later stage than what is done currently, the later the better and using sci/parse-string
rather than edamame
directly since that will correctly resolve symbols in syntax quote.
Given a notebook with this:
In Clojure, this evaluates correctly to
(do x)
. But in Clerk's editor mode, I see the following:Unquotes aren't correctly resolved.