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

revset: don't crash if revset engine returns non-BackendError #6321

Merged
merged 1 commit into from
Apr 13, 2025

Conversation

martinvonz
Copy link
Member

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added tests to cover my changes

@martinvonz martinvonz requested a review from a team as a code owner April 11, 2025 14:35
We call `RevsetEvaluationError::expect_backend_error()` in lots of
places. If the revset engine had returned a non-`BackendError`, it
would result in a panic. For example, a revset engine might return
something like `RevsetEvaluationError::Other("not supported".into())`
for some revsets. We shouldn't crash when this happens.

We may want to create some higher-level `RepoError` to return here,
but for now let's just avoid the crash.
@martinvonz martinvonz added this pull request to the merge queue Apr 13, 2025
Merged via the queue into main with commit c259eb7 Apr 13, 2025
28 checks passed
@martinvonz martinvonz deleted the push-xtxtykvwmnkw branch April 13, 2025 19:01
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