-
Notifications
You must be signed in to change notification settings - Fork 20
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
Update TS bindings output for variants #1180
Update TS bindings output for variants #1180
Conversation
|
This is ready to review, but there are a couple small things that need to be fixed before it'll be ready to merge:
|
I've created a PR to fix the bug that's blocking this issue: NomicFoundation/jco#7. Once this is merged (& this PR has the updated version) then everything should be complete. |
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.
Based on #1169.
… .d.ts files using the `jco types` command. This command is better for our use case than `jco transpile` because it generates the declarations directly from the source .wit files, whereas `jco transpile` uses the WASM binaries to generate them. This means that `jco types` has access to the documentation that's written in the wit interfaces, and `jco transpile` does not. Since we're generating the interfaces in a separate step, I'm disabling typescript in the original `jco transpile` step. This is just a precaution to avoid confusion or possible conflicting declaration files interferring with each other.
…the variant ID as well as the EBNF form of the kind to use as documentation. Getting the EBNF form involves creating an instance of `SpecModel` and serializing the ID using that.
…guage` field to be a `&Language` instead of an `Rc<Language>` because of some weird issue getting `KindBuilder` to instantiate properly given that `KindsModel::from_language` received a `&Rc<Language>` param. However, I realized afterwards that I could just use `to_owned` when creating the SpecModel instead of changing SpecModel everywhere.
… for the clippy lints `doc_markdown` and `doc_link_with_quotes`. These are "pedantic" lints that we run into issues with now that we're outputting the EBNF docs for these kinds, but the errors aren't relevant to us.
…now-unused module import `codegen_spec`.
…tead of `NodeVariant`.
…odeKind` to `NodeType`. * Update base cst/index.mts to expect & export `NodeType`
2bc6924
to
44741f5
Compare
@OmarTawfik Rebase is complete, ready for your review whenever. |
crates/codegen/runtime/cargo/crate/src/runtime/cst/terminal_kind.rs.jinja2
Outdated
Show resolved
Hide resolved
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.
Left a couple of comments about unintended changes. Otherwise, LGTM.
Thank you!
Just some artifacts from the rebase, even though they were fixed in #1169 the rebase brought them back here. |
Updates our JCO submodule to include the changes in NomicFoundation/jco#5. Includes one other change to fully integrate these changes, which is to change
NodeVariant
toNodeType
incodegen/../cst/index.mts
so that the expected imports align with the new generated exports.Closes #1166
Closes #1171