Report a crash from the compiler instead of hanging the compilation#2967
Merged
tgodzik merged 1 commit intoJun 12, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #1434
The original report asked for the complete stack trace when a compiler plugin crashes the compiler with a
NoSuchMethodError. The reporting side was largely fixed in the meantime (since v1.5.12 the consumer of a failed compile result prints the whole trace), but reproducing the scenario revealed something worse: the compilation never finishes at all.NoSuchMethodErroris aLinkageError, whichNonFataltreats as fatal: it escapes the monix task running the compilation and the result is never completed, leaving the client waiting forever.StackOverflowErrorandNoClassDefFoundErrorwere already special-cased inBloopHighLevelCompiler, but every otherLinkageErrorfell through, and the crash reporting was split between the catch sites and the consumer of the result, which printed the trace twice.Now all fatal compiler crashes are wrapped in a new non-fatal
bloop.CompilerCrashcarrying type-specific advice, so the compilation fails normally throughResult.Failed(..., Some(t))and the consumer of the result reports the full stack trace exactly once:Notes
CompilerCrashis deliberately public in theblooppackage even though it is just a transport between the compiler integration and the result reporting: the only instantiation site lives insbt.internal.inc.bloop.internal, outside theblooppackage hierarchy, soprivate[bloop]would not compile, and the class's fully-qualified name is the first line of the user-visible report, wherebloop.CompilerCrashreads better than asbt.internal.inc.*name.