Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Oct 3, 2025

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:

No language found for path `/path/to/test/highlight/crash2.dart`

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 a metadata 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:

  • Grammar name and scope definitions
  • File type associations (.dart files)
  • Paths to highlights and tags query files
  • Metadata field - the critical missing piece for tree-sitter 0.25.x compatibility

Test Results

All tests now pass successfully:

  • ✅ 149 corpus tests (100% success rate)
  • ✅ 117 syntax highlighting assertions across 5 test files
  • ✅ 53 tags assertions across 4 test files

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

This section details on the original issue you should resolve

<issue_title>CI failures, new tree-sitter setup</issue_title>
<issue_description>Please summarize the CI failures on the recent merged Pull Request. It seems like there is some new configuration needed to properly run tree-sitter test now. Investigate potential solutions.</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #84

💡 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.

Copilot AI and others added 2 commits October 3, 2025 15:54
Co-authored-by: TimWhiting <15617545+TimWhiting@users.noreply.github.com>
Co-authored-by: TimWhiting <15617545+TimWhiting@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] CI failures, new tree-sitter setup Fix CI failures by adding tree-sitter.json for tree-sitter 0.25.x compatibility Oct 3, 2025
@Copilot Copilot AI requested a review from TimWhiting October 3, 2025 16:01
Copilot finished work on behalf of TimWhiting October 3, 2025 16:01
@TimWhiting TimWhiting marked this pull request as ready for review October 3, 2025 16:51
@TimWhiting TimWhiting merged commit 89026f3 into master Oct 3, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI failures, new tree-sitter setup
2 participants