Skip to content

fix(cli): improve error message in cases where a langauge can't be found for one of many paths#4662

Merged
clason merged 1 commit intorelease-0.25from
backport-4643-to-release-0.25
Aug 2, 2025
Merged

fix(cli): improve error message in cases where a langauge can't be found for one of many paths#4662
clason merged 1 commit intorelease-0.25from
backport-4643-to-release-0.25

Conversation

@tree-sitter-ci-bot
Copy link

Description

Backport of #4643 to release-0.25.

…4643)

Problem: When multiple input paths are provided to the `parse` command (a la `tree-sitter parse --paths [...]`), if a language can't be found for one of the paths, it can be a little unclear *which* path caused the failure. The loader *can* fail with `Failed to load language for file name <foo.bar>`, but this isn't guaranteed.

Solution: Attach some additional context in the case where multiple paths can be provided, displaying the problematic path on failure.
(cherry picked from commit 9ced617)
@clason clason merged commit 0c83a5d into release-0.25 Aug 2, 2025
18 checks passed
@clason clason deleted the backport-4643-to-release-0.25 branch August 2, 2025 10:17
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.

2 participants