allow compile forms directly#808
Closed
alekseysotnikov wants to merge 1 commit intosquint-cljs:mainfrom
Closed
Conversation
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.
Member
Can you first post an issue where you outline the problem statement, etc? (Like suggested in the PR template). |
Author
|
Sure #809 |
Member
|
I'll have a look next week, thanks |
Member
|
Fixed on main. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I am proposing a way to render simple server-side snippets without performing the
forms -> string-> formsroundtrip.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.
This PR corresponds to an issue with a clear problem statement.
This PR contains a test to prevent against future regressions
I have updated the CHANGELOG.md file with a description of the addressed issue.