Skip to content

Language grammar dependencies in go.mod pollute downstream go.sum files #49

@kevinmorio

Description

@kevinmorio

The README states:

By default, none of the grammars are included in this package. This way, you can only bring in what you need.

However, the go.mod file lists all language grammars as direct dependencies:

  github.com/tree-sitter/tree-sitter-c v0.23.4
  github.com/tree-sitter/tree-sitter-cpp v0.23.4
  github.com/tree-sitter/tree-sitter-embedded-template v0.23.2
  github.com/tree-sitter/tree-sitter-go v0.23.4
  github.com/tree-sitter/tree-sitter-html v0.23.2
  github.com/tree-sitter/tree-sitter-java v0.23.5
  github.com/tree-sitter/tree-sitter-javascript v0.23.1
  github.com/tree-sitter/tree-sitter-json v0.24.8
  github.com/tree-sitter/tree-sitter-php v0.23.11
  github.com/tree-sitter/tree-sitter-python v0.23.6
  github.com/tree-sitter/tree-sitter-ruby v0.23.1
  github.com/tree-sitter/tree-sitter-rust v0.23.2

These are presumably used for testing, but because they're in go.mod, they end up in the go.sum of every downstream project that depends on go-tree-sitter, even if the project only uses its own custom grammar.

Expected behavior:

Projects that only depend on the core go-tree-sitter binding should not have language grammar checksums in their go.sum.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions