Create CodeMirror extension to register AST as StateField #9237
Merged
franknoirot merged 18 commits intomainfrom Dec 10, 2025
Merged
Create CodeMirror extension to register AST as StateField #9237franknoirot merged 18 commits intomainfrom
franknoirot merged 18 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This contained material changes that break the app currently, relying on other future changes.
These rely on other changes to come to work properly.
910d88a to
a652ccb
Compare
Towards #8885, stacked on #9236. Adding a for-now unused CodeMirror extension that registers the AST as a StateField on the EditorView. Right now we trash the EditorView constantly so that value will not be trustworthy, but it will be once we remove all our React scaffolding around CodeMirror, which is a work-in-progress in #9190. Then this will be available to become the canonical derived AST state, automatically updated whenever the code is updated by the user.
318bb0b to
ab1ccee
Compare
pierremtb
approved these changes
Dec 10, 2025
Contributor
|
Not going to pretend that I know codemirror well but this seems sound and not impacting the current stuff (except maybe calling that ast setter, but should rely on the tests for that) |
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.
Towards #8885, stacked on #9236. Adding a for-now unused CodeMirror extension that registers the AST as a StateField on the EditorView. Right now we trash the EditorView constantly so that value will not be trustworthy, but it will be once we remove all our React scaffolding around CodeMirror, which is a work-in-progress in #9190. Then this will be available to become the canonical derived AST state, automatically updated whenever the code is updated by the user.