Skip to content

Bump tree-sitter dep to 0.25+/0.26+ for compatibility with current projects #138

Description

@clouatre

Summary

tree-sitter-html v0.23.2 (released 2024-11-11) is the last published release. It pins tree-sitter = "0.24" in dev-dependencies, which causes a dependency conflict for any project on tree-sitter >= 0.25. All other first-party grammar crates have since migrated to the tree-sitter-language bridge pattern and cut new releases -- tree-sitter-html has not.

What the problem looks like

Projects pinning tree-sitter = "0.26" cannot add tree-sitter-html without a version conflict. Cargo resolves tree-sitter-html's tree-sitter-language = "0.1" fine (0.1.7 is current and compatible), but the dev-dep tree-sitter = "0.24" creates an incompatible constraint at resolution time for workspaces that have moved to 0.25 or 0.26.

Other grammars that have already made this transition and serve as reference: tree-sitter-css (0.25.0), tree-sitter-yaml (0.7.x), tree-sitter-md (0.5.x). Their Cargo.toml files no longer carry a direct tree-sitter dev-dep -- they rely solely on tree-sitter-language for the Language type.

What is needed

The grammar source itself requires no changes. The fix is a Cargo.toml update:

  1. Bump or remove tree-sitter = "0.24" from [dev-dependencies] (replace with "0.26" or drop it in favour of tree-sitter-language for the test harness, matching what other grammars do).
  2. Cut a new crate release (v0.24.x or v0.25.0 following the other grammars' versioning scheme).

Offer

We are happy to open a PR for the Cargo.toml change if that would help move this forward. Just say the word.

Context

We maintain aptu-coder, an MCP code analysis server that uses tree-sitter grammars for multi-language AST analysis. We have a stub placeholder for HTML support gated behind this upstream release. We would like to complete it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions