Skip to content

allow compile forms directly#808

Closed
alekseysotnikov wants to merge 1 commit intosquint-cljs:mainfrom
alekseysotnikov:allow-compile-forms-directly
Closed

allow compile forms directly#808
alekseysotnikov wants to merge 1 commit intosquint-cljs:mainfrom
alekseysotnikov:allow-compile-forms-directly

Conversation

@alekseysotnikov
Copy link
Copy Markdown

@alekseysotnikov alekseysotnikov commented Apr 25, 2026

I am proposing a way to render simple server-side snippets without performing the forms -> string-> forms roundtrip.
I found this approach workable for my use case, but I’m not certain whether it aligns with the project’s internals. Please let me know if it’s acceptable or can be improved, or feel free to reject it.

Instead of only accepting strings, the internal compile* and transpile*
functions now accept either:
- A string (parsed via read-forms as before)
- Clojure forms (used directly)
This enables server-side snippet rendering patterns where forms are
built programmatically without needing to stringify them first.
Rename compile-string* → compile* and transpile-string* → transpile*
for consistency with the new flexibility.
@borkdude
Copy link
Copy Markdown
Member

I found this approach workable for my use case

Can you first post an issue where you outline the problem statement, etc? (Like suggested in the PR template).

@alekseysotnikov
Copy link
Copy Markdown
Author

alekseysotnikov commented Apr 25, 2026

Sure #809

@borkdude
Copy link
Copy Markdown
Member

I'll have a look next week, thanks

@borkdude
Copy link
Copy Markdown
Member

Fixed on main.

@borkdude borkdude closed this Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants