You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When compiling a scala_library that requires a macro expansion, and there is a user error in that macro, the entire scalac process will crash, resulting in a Bazel error like this:
ERROR: /Users/tkaplan/<redacted>:3:14: scala @//<redacted> failed: Worker process did not return a WorkResponse:
---8<---8<--- Start of log snippet, file at /private/var/tmp/_bazel_tkaplan/fa1bc4e61b191b698b582e9d142cb714/bazel-workers/worker-6-Scalac.log ---8<---8<---
[... truncated ...]
cros$MacroExpander.apply(Macros.scala:609)
at scala.tools.nsc.typechecker.Macros.standardMacroExpand(Macros.scala:784)
at scala.tools.nsc.typechecker.Macros.standardMacroExpand$(Macros.scala:782)
at scala.tools.nsc.Global$$anon$5.standardMacroExpand(Global.scala:482)
at scala.tools.nsc.typechecker.AnalyzerPlugins$$anon$10.default(AnalyzerPlugins.scala:457)
at scala.tools.nsc.typechecker.AnalyzerPlugins$$anon$10.default(AnalyzerPlugins.scala:454)
at scala.tools.nsc.typechecker.AnalyzerPlugins.invoke(AnalyzerPlugins.scala:411)
at scala.tools.nsc.typechecker.AnalyzerPlugins.pluginsMacroExpand(AnalyzerPlugins.scala:454)
at scala.tools.nsc.typechecker.AnalyzerPlugins.pluginsMacroExpand$(AnalyzerPlugins.scala:454)
at scala.tools.nsc.Global$$anon$5.pluginsMacroExpand(Global.scala:482)
There are several reasons why this isn't very user-friendly:
The actual reason for the error is in the truncated part of the stack trace (in this case, it was a NoSuchMethodError caused by mixing Scala 2.11 and 2.12 libs)
If the build is happening on CI, getting the worker-n-Scalac.log file can be difficult
The error won't be sent as part of the BES to any BES viewers like BuildBuddy
Maybe the ScalacWorker implementation should try to catch unchecked exceptions and determine if they are the result of macro expansion, rather than crashing.
When compiling a scala_library that requires a macro expansion, and there is a user error in that macro, the entire scalac process will crash, resulting in a Bazel error like this:
There are several reasons why this isn't very user-friendly:
Maybe the ScalacWorker implementation should try to catch unchecked exceptions and determine if they are the result of macro expansion, rather than crashing.
Full worker log:
worker-6-Scalac.log
The text was updated successfully, but these errors were encountered: