This repository was archived by the owner on Aug 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 650
refactor(playground): refactor the playground to use the WASM bindings for the workspace #3018
Merged
Conversation
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
5065d24
to
3290451
Compare
Is there any chance that we could move the schema generation changes in a separate PR? |
…s for the workspace
9b48486
to
b153dbc
Compare
Deploying with
|
Latest commit: |
85d3a22
|
Status: | ✅ Deploy successful! |
Preview URL: | https://ba4988e7.tools-8rn.pages.dev |
Branch Preview URL: | https://refactor-playground-workspac.tools-8rn.pages.dev |
Sure, the PR is already split into two different commit so that should be easy enough to do |
b153dbc
to
0e89c0a
Compare
Parser conformance results on ubuntu-latestjs/262
jsx/babel
symbols/microsoft
ts/babel
ts/microsoft
|
ematipico
reviewed
Aug 8, 2022
MichaReiser
reviewed
Aug 8, 2022
ematipico
approved these changes
Aug 10, 2022
IWANABETHATGUY
pushed a commit
to IWANABETHATGUY/tools
that referenced
this pull request
Aug 10, 2022
…s for the workspace (rome#3018) * refactor(playground): refactor the playground to use the WASM bindings for the workspace * address PR review * unify the capabilities variable names
IWANABETHATGUY
pushed a commit
to IWANABETHATGUY/tools
that referenced
this pull request
Aug 22, 2022
…s for the workspace (rome#3018) * refactor(playground): refactor the playground to use the WASM bindings for the workspace * address PR review * unify the capabilities variable names
IWANABETHATGUY
pushed a commit
to IWANABETHATGUY/tools
that referenced
this pull request
Aug 22, 2022
…s for the workspace (rome#3018) * refactor(playground): refactor the playground to use the WASM bindings for the workspace * address PR review * unify the capabilities variable names
IWANABETHATGUY
pushed a commit
to IWANABETHATGUY/tools
that referenced
this pull request
Aug 22, 2022
…s for the workspace (rome#3018) * refactor(playground): refactor the playground to use the WASM bindings for the workspace * address PR review * unify the capabilities variable names
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
Fixes #3012
This PR refactors the Playground to use the WASM bindings to the Workspace API. These bindings currently live in the playground crate itself along with a few utilities, but I plan on eventually moving this code out into its own crate in a later refactor (as part of the Node API umbrella).
The core of the change is relatively simple, and only requires adding a few methods to the workspace in order to access the internal debug representations rendered by the playground (like the formatter IR or the control flow graph). The WASM binding glue is implemented over the existing serde implementations for all the Workspace-related types, using the
serde-serialize
feature ofwasm-bindgen
. Unfortunately since these types go through serialization they are represented as untypedany
values in the generated TypeScript definitions for the bindings (#3031 will add auto-generated definitions for these)Test Plan
Many of the changes are statically checked or execute at compile time, but unfortunately the playground doesn't really any testing infrastructure in place so that will have to be manually tested in the PR deployment