forked from bytecodealliance/jco
-
Notifications
You must be signed in to change notification settings - Fork 2
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 bindings for variants and output documentation for resources #5
Merged
mjoerussell
merged 4 commits into
nomic-enhancements-release
from
feature/variant-resource-bindings
Dec 5, 2024
Merged
Update bindings for variants and output documentation for resources #5
mjoerussell
merged 4 commits into
nomic-enhancements-release
from
feature/variant-resource-bindings
Dec 5, 2024
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
OmarTawfik
reviewed
Dec 3, 2024
OmarTawfik
reviewed
Dec 3, 2024
OmarTawfik
reviewed
Dec 3, 2024
OmarTawfik
reviewed
Dec 3, 2024
OmarTawfik
reviewed
Dec 3, 2024
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 few suggestions. Thanks for looking into this!
2 tasks
Merged
OmarTawfik
approved these changes
Dec 5, 2024
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.
One suggestion remaining about a lingering change.
Otherwise, LGTM. Thanks!
c054ff6
to
bb78e92
Compare
* Rename the generated enum type from "{variant_name}Variant" to "{variant_name}Kind" * Rename the generated readonly field on variant classes from "{variant_name}Kind" to "type" * Add documentation to the generated functions on variant classes
Co-authored-by: Omar Tawfik <15987992+OmarTawfik@users.noreply.github.com>
* Update documentation to include backticks around keywords/types * Update documentation to use the word "type" instead of "kind"
bb78e92
to
5b19b7b
Compare
github-merge-queue bot
pushed a commit
to NomicFoundation/slang
that referenced
this pull request
Dec 12, 2024
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` to `NodeType` in `codegen/../cst/index.mts` so that the expected imports align with the new generated exports. * [x] Depends on #1169 * [x] Depends on NomicFoundation/jco#5 Closes #1166 Closes #1171
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 changes some of the Typescript bindings for
variant
andresource
types.For
resources
, this outputs the type-level documentation that exists in the .wit files into the bindings. The original implementation didn't really track these (they were parsed, though), so a bit more modification went into these than some of the other documentation changes.For
variants
, this changes the naming convention for their Typescript enum outputs. Specifically, it:{variant_name}Variant
to{variant_name}Kind
{variant_name}Kind
totype
.This PR also adds some documentation for the common functions added to variant classes.
This PR will be used to solve NomicFoundation/slang#1166 and NomicFoundation/slang#1171.