Fix CI failures by adding tree-sitter.json for tree-sitter 0.25.x compatibility #85
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.
Problem
The recent upgrade to tree-sitter-cli 0.25.x introduced breaking changes that caused CI test failures. While corpus tests passed, syntax highlighting and tags tests failed with errors like:
Root Cause
Tree-sitter 0.25.x introduced a new configuration format that requires a
tree-sitter.json
file at the repository root. Most critically, this file must include ametadata
field. Without it, tree-sitter cannot properly load the parser for highlight and tags tests, even though corpus tests continue to work.Solution
Added a
tree-sitter.json
configuration file that properly defines the grammar configuration with all required fields:.dart
files)Test Results
All tests now pass successfully:
The solution works without requiring any user-level tree-sitter configuration, ensuring CI will work correctly on all platforms (macOS, Ubuntu, Windows).
References
This addresses the CI failures mentioned in issue #XX (if applicable) and ensures compatibility with tree-sitter-cli 0.25.x going forward.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.