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

Don't point to the compiler backlog when a compiler plugin phase crashes #21887

Merged
merged 3 commits into from
Nov 5, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 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"""| Please file a crash report in the compiler plugin backlog.
| The name of the compiler plugin which caused the crash is "${ctx.phase.megaPhase}".
| For non-enriched exceptions, compile with -Xno-enrich-error-messages.
|""".stripMargin
else
s"""| 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.
KacperFKorban marked this conversation as resolved.
Show resolved Hide resolved
| 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
Loading