Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 5.3.9104] scip-ctags: better error propagation #61847

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

sourcegraph-release-bot
Copy link
Collaborator

This change corrects the error handling in scip-ctags, making it more
consistent with universal-ctags. We now split errors into two classes:

  • Fatal: user command is invalid or incorrectly formatted, I/O errors. This
    indicates a big issue in how we're using ctags and we should fail hard.
  • Non-fatal: any file parsing issue (invalid UTF-8, unsupported language, or all symbols
    can't be parsed).

Our go-ctags wrapper only reports fatal errors, and just logs non-fatal errors.
We fail indexing for an entire Zoekt repo on go-ctags errors, which helps
surface serious issues with ctags, while allowing parse failures for individual files.

Fixes #61785
Fixes ENG-23595

Test plan

Added a new snapshot test for an error case, and made sure the output looked
good. Manual testing, including indexing the github-linguist/linguist repo
locally and checking it now succeeds.
Backport 47ab5f5 from #61712

This change corrects the error handling in scip-ctags, making it more
consistent with universal-ctags. We now split errors into two classes:
* Fatal: user command is invalid or incorrectly formatted, I/O errors. This
indicates a big issue in how we're using ctags and we should fail hard.
* Non-fatal: any file parsing issue (invalid UTF-8, unsupported language, or all symbols
can't be parsed).

Our go-ctags wrapper only reports fatal errors, and just logs non-fatal errors.
We fail indexing for an entire Zoekt repo on go-ctags errors, which helps
surface serious issues with ctags, while allowing parse failures for individual files.

(cherry picked from commit 47ab5f5)
@BolajiOlajide BolajiOlajide merged commit 153b624 into 5.3.9104 Apr 15, 2024
12 checks passed
@BolajiOlajide BolajiOlajide deleted the backport-61712-to-5.3.9104 branch April 15, 2024 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants