-
Notifications
You must be signed in to change notification settings - Fork 77
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
fix: don't use built in language in wasm #72
Conversation
WalkthroughThe recent update streamlines the handling of languages in our YAML processing module. By renaming Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- crates/language/src/yaml.rs (2 hunks)
Additional comments: 2
crates/language/src/yaml.rs (2)
- 14-20: The renaming of
language()
tobuilt_in_language()
and the use of conditional compilation based on thebuiltin-parser
feature are well-implemented. However, adding documentation to explain the purpose of these two separate implementations could improve code readability and maintainability.- 34-40: The direct use of
language.id_for_node_kind()
in theYaml
struct initialization, replacing theid_for_kind()
function, simplifies the code and likely enhances compatibility with WASM environments. Ensure that all instances whereid_for_kind()
was previously used have been updated to this new approach.Verification successful
The search for any remaining references to
id_for_kind()
in the Rust codebase did not produce any results, indicating that all instances of this function have been successfully replaced or removed as suggested. This confirms that the changes have been implemented correctly.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for any remaining references to `id_for_kind()` which should have been removed or replaced. rg --type rust 'id_for_kind'Length of output: 28
removes the use of the built_in_language in the yaml constructor as it will panic with unimplemented when run in a wasm environment
Summary by CodeRabbit