Docs: rbs and toml#92
Conversation
There was a problem hiding this comment.
Pull request overview
This PR expands the documented/tested from override support by adding real-world examples for Tree-sitter grammars that live outside the default tree-sitter/tree-sitter-<lang> GitHub org/repo naming pattern (TOML and RBS), pinned to known versions.
Changes:
- Document
fromoverrides fortoml(tree-sitter-grammars) andrbs(joker1007) in the README example config. - Mirror those same examples in the crate-level rustdoc configuration snippet (
src/lib.rs). - Extend the CLI build integration tests to cover pinned
fromoverrides fortomlandrbs.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/cmd/build.rs | Adds pinned build test cases and config fixtures for toml and rbs using from overrides. |
| src/lib.rs | Updates rustdoc TOML config example to include toml and rbs from overrides. |
| README.md | Updates user-facing config example to include toml and rbs from overrides. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Thanks for the PR. I would only ask to follow the commit style of the repo and avoid emojis. Once that's done and the test suite passes, I'll merge. |
The toml tree-sitter grammar is maintained under the tree-sitter-grammars org, not the default tree-sitter org. Add toml as a documented example of the `from` override in README, rustdoc, and test fixtures. Pinned at v0.7.0 (64b56832c2cffe41758f28e05c756a3a98d16f41). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
473225d to
5afbba6
Compare
- Add tree-sitter-rbs v0.2.2 with from override to README, rustdoc, and tests - rbs-merge can use tree-sitter-rbs as a backend for RBS type signature parsing Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
5afbba6 to
808c0ef
Compare
|
@stackmystack fixed! |
|
Thanks! |
|
I would merge it but it's been failing twice: https://github.com/stackmystack/tsdl/actions/runs/24172059617/job/73811475681?pr=92 I'm not sure what's that all about, that always used to work. If you're interested and want to look at it, please be my guest. Otherwise, I'll try to take a look this weekend. |
Description
The toml tree-sitter grammar is maintained under the tree-sitter-grammars org, not the default tree-sitter org - pinned at v0.7.0.
The rbs tree-sitter grammar is maintained by @joker1007, not the default tree-sitter org - pinned at v0.2.2.
Add toml and rbs as a documented examples of the
fromoverride in README, rustdoc, and test fixtures.Motivation and Context
Just adds documentation and test support for toml and rbs grammars, since they are becoming more widely used in Ruby-land. ;)
I have also integrated tsdl into my ts-grammar-action, so it now downloads released version of tsdl, and uses it to install grammars! I am now beginning use that GitHub Action in at least one workflow in all of my gems, as I begin validating their coherence with my gem template, and they will use tree sitter grammars to accomplish much of that work via my ast-merge gem & friends. in other words - all of my gems will depend on this in GHA soon.
How Has This Been Tested?
Both grammars built and verified successfully:
• toml v0.7.0 → libtree-sitter-toml.so (37K) — exports tree_sitter_toml + external scanner symbols
• rbs v0.2.2 → libtree-sitter-rbs.so (129K) — exports tree_sitter_rbs
Total build time: 2.3s (including tree-sitter-cli download). The from overrides for both non-standard repos (tree-sitter-grammars/tree-sitter-toml and joker1007/tree-sitter-rbs) work correctly.
Types of Changes
Checklist: