-
-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for HEEx compilation #323
Merged
scottming
merged 6 commits into
lexical-lsp:main
from
scottming:support-heex-compilation
Sep 29, 2023
Merged
Support for HEEx compilation #323
scottming
merged 6 commits into
lexical-lsp:main
from
scottming:support-heex-compilation
Sep 29, 2023
Conversation
This file contains 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
scottming
force-pushed
the
support-heex-compilation
branch
from
August 14, 2023 13:10
adc5a4f
to
16bca48
Compare
scottming
commented
Aug 14, 2023
apps/remote_control/lib/lexical/remote_control/build/document/compilers/heex.ex
Outdated
Show resolved
Hide resolved
scottming
force-pushed
the
support-heex-compilation
branch
3 times, most recently
from
September 1, 2023 00:37
e988515
to
fc14a23
Compare
scottming
force-pushed
the
support-heex-compilation
branch
from
September 1, 2023 13:43
e47be3d
to
94163f0
Compare
generated by `mix new live_demo`, then add the `liveview` deps
It's like peeling an onion. When we have an HEEx file, we first use the HTML engine to transform and compile it. Once the part that belongs to HTML is fine, we then use the EEx engine to transform it, evaluate it, and finally compile it.
This reverts commit 570097f.
scottming
force-pushed
the
support-heex-compilation
branch
from
September 27, 2023 03:39
94163f0
to
65ed9f0
Compare
scottming
force-pushed
the
support-heex-compilation
branch
from
September 27, 2023 08:12
65ed9f0
to
472e072
Compare
scohen
approved these changes
Sep 28, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks solid.
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.
This PR adopts an approach that divides the compilation of HEEx into three steps. First, it focuses on the HTML portion, then the EEx part, where certain errors in EEx require evaluation to obtain, and finally, the compile_quoted step.
I think this layered approach is quite good, like peeling an onion.
Though there are some problems that I haven't thought of a good solution for now, such as
mix compile
will emit an error, but how can this be achieved for single file compilation? Jose suggested that we compile the relevantex
files directly, but it seems difficult because the latest content of those files may only exist in theDocument.Store
of the server node..ex
file, likecore_components.ex
, how can the~H
block be compiled separately?~p
block in a~H
block orHEEx
file.DEMO
as-you-type compilation
CleanShot.2023-08-13.at.17.51.35-trimmed.mp4
after saving
CleanShot.2023-08-13.at.17.51.35.mp4