Skip to content

languages.toml: gotmpl grammar source (dannylongeuay/tree-sitter-go-template) returns 404 #16119

Description

@holopanen

The gotmpl grammar entry in languages.toml points to a repository that no longer exists:

[[grammar]]
name = "gotmpl"
source = { git = "https://github.com/dannylongeuay/tree-sitter-go-template", rev = "395a33e08e69f4155156f0b90138a6c86764c979" }

curl -s -o /dev/null -w "%{http_code}\n" https://github.com/dannylongeuay/tree-sitter-go-template returns 404.

Confirmed on Fedora's packaged helix 25.07.1-11.fc44 (hx --grammar fetch).

Impact: hx --grammar fetch doesn't fail cleanly on the dead repo — it drops into a credential prompt ("Username for 'https://github.com'"), which hangs any non-interactive invocation (e.g. topgrade, CI, scripted grammar updates) instead of skipping or erroring out.

Steps to reproduce:

  1. hx --grammar fetch on a fresh config (no local languages.toml override)
  2. Observe it prompts for a GitHub username instead of failing

Workaround: excluding the grammar via a user languages.toml:

use-grammars = { except = ["gotmpl"] }

Two separate things worth fixing:

  1. The dead/renamed source for gotmpl in languages.toml.
  2. libgit2-backed fetch falling back to an auth prompt on a 404 instead of failing immediately — this turns any single broken grammar entry into a silent hang for non-interactive tooling.

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