Skip to content

Commit

Permalink
Don't point to the compiler backlog when a compiler plugin phase cras…
Browse files Browse the repository at this point in the history
…hes (scala#21887)

closes scala#21783
  • Loading branch information
KacperFKorban committed Nov 20, 2024
1 parent b2d3612 commit a2b5fd1
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions compiler/src/dotty/tools/dotc/report.scala
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,23 @@ object report:
"compiler version" -> dotty.tools.dotc.config.Properties.versionString,
"settings" -> settings.map(showSetting).mkString(" "),
))
val fileAReportMsg =
if ctx.phase.isInstanceOf[plugins.PluginPhase]
then
s"""| An unhandled exception was thrown in the compiler plugin named "${ctx.phase.megaPhase}".
| Please report the issue to the plugin's maintainers.
| For non-enriched exceptions, compile with -Xno-enrich-error-messages.
|""".stripMargin
else
s"""| An unhandled exception was thrown in the compiler.
| Please file a crash report here:
| https://github.com/scala/scala3/issues/new/choose
| For non-enriched exceptions, compile with -Xno-enrich-error-messages.
|""".stripMargin
s"""
| $errorMessage
|
| An unhandled exception was thrown in the compiler.
| Please file a crash report here:
| https://github.com/scala/scala3/issues/new/choose
| For non-enriched exceptions, compile with -Xno-enrich-error-messages.
|$fileAReportMsg
|
|$info1
|""".stripMargin
Expand Down

0 comments on commit a2b5fd1

Please sign in to comment.