Conversation
📝 WalkthroughWalkthroughSupport for the Erlang programming language is added across the WebAssembly language configuration system. The Erlang variant is registered in the language enum, its parser path is configured, and display name mapping is established for the interface. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@website/_data/parsers.ts`:
- Line 12: The parserPaths object contains languages (e.g., erlang, elixir,
kotlin, nix, swift, yaml) that are missing corresponding keys in the repos and
versions objects, causing downloadParsers.mjs (which looks up each language in
repos and versions) to skip them; add entries for each missing language to both
the repos and versions objects using the same language keys as in parserPaths
(e.g., add "erlang", "elixir", "kotlin", "nix", "swift", "yaml" keys) and set
repos[LANG] to the correct tree-sitter repository identifier and versions[LANG]
to the desired release/tag string so downloadParsers.mjs can find the repo and
version for each parser.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b2026999-869f-4370-94a0-0a92eed5e626
⛔ Files ignored due to path filters (1)
website/public/parsers/tree-sitter-erlang.wasmis excluded by!**/*.wasm
📒 Files selected for processing (3)
src/wasm_lang.rswebsite/_data/parsers.tswebsite/src/components/astGrep/lang.ts
| css: 'tree-sitter-css.wasm', | ||
| cpp: 'tree-sitter-cpp.wasm', | ||
| elixir: 'tree-sitter-elixir.wasm', | ||
| erlang: 'tree-sitter-erlang.wasm', |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# First, locate and examine parsers.ts
find . -name "parsers.ts" -type fRepository: ast-grep/ast-grep.github.io
Length of output: 97
🏁 Script executed:
# Also locate downloadParsers.mjs
find . -name "downloadParsers.mjs" -type fRepository: ast-grep/ast-grep.github.io
Length of output: 115
🌐 Web query:
tree-sitter-erlang npm package latest version
💡 Result:
The latest version published on npm for tree-sitter-erlang is 0.0.1-security (a security holding package, not the actual Erlang grammar). [1]
Source: [1]
🏁 Script executed:
cat -n ./website/_data/parsers.tsRepository: ast-grep/ast-grep.github.io
Length of output: 2832
🏁 Script executed:
cat -n ./website/public/parsers/downloadParsers.mjsRepository: ast-grep/ast-grep.github.io
Length of output: 958
Missing repos and versions entries for Erlang and other languages.
The erlang entry is in parserPaths, but corresponding entries are missing from the repos and versions objects. The downloadParsers.mjs script iterates through parserPaths and looks up each language in both objects (lines 7-8); if either is missing, it logs an error and skips that language (lines 9-11), preventing the WASM file from being downloaded.
Additionally, elixir, kotlin, nix, swift, and yaml have the same issue—they're defined in parserPaths but missing from repos and versions.
Add entries for all missing languages to both objects:
export const repos: Record<string, string> = {
bash: 'https://unpkg.com/tree-sitter-bash',
+ elixir: 'https://unpkg.com/tree-sitter-elixir',
+ erlang: 'https://unpkg.com/tree-sitter-erlang',
+ kotlin: 'https://unpkg.com/tree-sitter-kotlin',
+ nix: 'https://unpkg.com/tree-sitter-nix',
+ swift: 'https://unpkg.com/tree-sitter-swift',
+ yaml: 'https://unpkg.com/tree-sitter-yaml',
// ...
}
export const versions: Record<string, string> = {
bash: '0.25.1',
+ elixir: '<version>',
+ erlang: '<version>',
+ kotlin: '<version>',
+ nix: '<version>',
+ swift: '<version>',
+ yaml: '<version>',
// ...
}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@website/_data/parsers.ts` at line 12, The parserPaths object contains
languages (e.g., erlang, elixir, kotlin, nix, swift, yaml) that are missing
corresponding keys in the repos and versions objects, causing
downloadParsers.mjs (which looks up each language in repos and versions) to skip
them; add entries for each missing language to both the repos and versions
objects using the same language keys as in parserPaths (e.g., add "erlang",
"elixir", "kotlin", "nix", "swift", "yaml" keys) and set repos[LANG] to the
correct tree-sitter repository identifier and versions[LANG] to the desired
release/tag string so downloadParsers.mjs can find the repo and version for each
parser.
Add support for Erlang to the playground. This requires ast-grep/ast-grep#2516
The playground itself is currently untested.
Summary by CodeRabbit