Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious about what errors - if any - we'd want to make sure aren't rescuable? And why this engine seems to have a bit more error catching than others?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One important case we don't want to rescue is timeouts parsing individual files: we found that previously the timeout values were set low enough that GC-jitter/resource pressure/etc. could cause a file to timeout on some runs & not others (leading to inconsistent results). So the timeout values have been greatly heightened to the point where they indicate real problems, and we don't want to catch them because they indicate a file should be excluded/there's a more severe parser bug that deserves investigation. The problems caused by this is why we moved away from the prior behavior, which did catch basically all exceptions.
Beyond that, I'm still of the opinion that exceptions can & normally should indicate bugs that need fixing, and when they're caught/handled we should be as precise as possible about what we're catching. Otherwise we're potentially just hiding bugs. In this particular case we're intentionally hiding bugs in a dependency (
RubyParser
, etc.), which isn't great, but seems like the lesser of the evils available to us.