-
Notifications
You must be signed in to change notification settings - Fork 30
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
Custom compiler crash/panic handler #731
base: master
Are you sure you want to change the base?
Custom compiler crash/panic handler #731
Conversation
… report with Information about : OS, JVM, a full stacktrace . Additionally, the crash report is written into a log file
… in effektVersion
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.
Thanks for the PR! I think there are some design/layout choices that we could discuss (e.g. emitting markdown for copy/pasting to GitHub), but otherwise this looks like a good initial implementation.
We should also make sure that things like the System.getProperty
calls work on all platforms (including Windows!)
added correct Effekt Version
Hey, thanks for the help with the Effekt Version! Do you mean the markdown should be added to the written log? I don't see how much more a markdown could do for the readability opposed to the current way of pasting into a code-box, but I surely can implement the md-support aswell:) |
Hey:) Would this be a desirable outcome when returning the log in .md? (@marvinborner )
Effekt Compiler Crash ReportWhere to Report: https://github.com/effekt-lang/effekt/issues Compiler Details
Full Stack Trace
Additional Info
|
…piler/verbose-crash # Conflicts: # effekt/jvm/src/main/scala/effekt/Driver.scala
Hey:) |
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.
Hi @JakubSchwenkbeck, this seems like a great first draft.
Please take a look at my comments below to guide the next steps! :)
What do you think of this Layout? MARKDOWN:Effekt Compiler Crash Report[Error] : Internal compiler error: some text here The compiler unexpectedly panicked. This is a compiler bug. Compiler InformationEffekt Version: 0.10.0 Backend: js System InformationOperating System: Linux JVM Version: 21.0.5 (Ubuntu, /usr/lib/jvm/java-21-openjdk-amd64) Full Stack Trace
Arguments Passed to the Compiler
TERMINAL:[info] === Effekt Compiler Crash Report === [Error] : Internal compiler error: some text here The compiler unexpectedly panicked. This is a compiler bug. Effekt Version: 0.10.0 Backend used: js A detailed crash report has been written to: Operating System: Linux JVM Version: 21.0.5 Full Stack Trace: Arguments passed to the compiler: compilecrash.effekt |
Could you please post the current version of the generated report here, please? :) |
The Current Terminal print :
|
This is the markdown- log Effekt Compiler Crash ReportERROR : Internal compiler error: some text here The compiler unexpectedly panicked. This is a compiler bug. Compiler InformationEffekt Version: 0.10.0 Backend: js System InformationOperating System: Linux JVM Version: 21.0.5 (Ubuntu, OpenJDK Runtime Environment) Full Stack Trace
Arguments Passed to the Compiler
|
I'm flexible with the design, changing the layout / contet only needs minor String-manipulations, so feel free to knitpick:) |
Motivation
Print and log a more verbose compiler crash/panic message with information about the specific user setup
Resolves #576.
Changes
Implemented the
generateCrashReport
function, which creates a more verbose output if the compiler crashes/panics.This Report retrieves general and backend-specific information to make crashes more reproducable or traceable
It holds information about :
Additionally, the report is written to a
.md
-file in the .out/ directoryTesting
I added
INTERNAL_ERROR("some text here")
to thecompileSource
function in JVM/.../Driver.scala to crash the compiler and retrieve the new messagePrinting example using
INTERNAL_ERROR
looks like this: