dotty.tools.dotc.reporting
Type members
Classlikes
This class mixes in a few standard traits, so that it is easier to extend from Java.
This class mixes in a few standard traits, so that it is easier to extend from Java.
This class implements a Reporter that displays messages on a text console
This class implements a Reporter that displays messages on a text console
- Companion:
- object
- Companion:
- object
A re-usable Reporter used in Contexts#test
A re-usable Reporter used in Contexts#test
This trait implements isHidden
so that we avoid reporting non-sensical messages.
This trait implements isHidden
so that we avoid reporting non-sensical messages.
A Message
contains all semantic information necessary to easily
comprehend what caused the message to be logged. Each message can be turned
into a Diagnostic
which contains the log level and can later be
consumed by a subclass of Reporter
. However, the error position is only
part of Diagnostic
, not Message
.
A Message
contains all semantic information necessary to easily
comprehend what caused the message to be logged. Each message can be turned
into a Diagnostic
which contains the log level and can later be
consumed by a subclass of Reporter
. However, the error position is only
part of Diagnostic
, not Message
.
NOTE: you should not persist a message directly, because most messages take
an implicit Context
and these contexts weigh in at about 4mb per instance.
Therefore, persisting these will result in a memory leak.
Instead use the persist
method to create an instance that does not keep a
reference to these contexts.
- Value parameters:
- errorId
a unique id identifying the message, this will later be used to reference documentation online
- Companion:
- object
The fallback Message
containing no explanation and having no kind
The fallback Message
containing no explanation and having no kind
- Companion:
- object
The extractor for NoExplanation
can be used to check whether any error
lacks an explanation
The extractor for NoExplanation
can be used to check whether any error
lacks an explanation
- Companion:
- class
A simple not found message (either for idents, or member selection. Messages of this class are sometimes dropped in favor of other, more specific messages.
A simple not found message (either for idents, or member selection. Messages of this class are sometimes dropped in favor of other, more specific messages.
This interface provides methods to issue information, warning and error messages.
This interface provides methods to issue information, warning and error messages.
- Companion:
- object
This class implements a Reporter that stores all messages
This class implements a Reporter that stores all messages
Beware that this reporter can leak memory, and force messages in two scenarios:
- During debugging
config.Printers.typr
is set fromnoPrinter
tonew Printer
, which forces the message - The reporter is not flushed and the message containers capture a
Context
(about 4MB)
The role of messages is to provide the necessary details for a simple to understand diagnostic event. Each message can be turned into a message container (one of the above) by calling the appropriate method on them. For instance:
Messages
The role of messages is to provide the necessary details for a simple to understand diagnostic event. Each message can be turned into a message container (one of the above) by calling the appropriate method on them. For instance:
EmptyCatchBlock(tree).error(pos) // res: Error
EmptyCatchBlock(tree).warning(pos) // res: Warning
A re-usable Reporter used in Contexts#test
A re-usable Reporter used in Contexts#test
This class implements a Reporter that throws all errors and sends warnings and other info to the underlying reporter.
This class implements a Reporter that throws all errors and sends warnings and other info to the underlying reporter.
This module is carefully optimized to give zero overhead if Config.tracingEnabled
is false. The trace
operation is called in various hotspots, so every tiny bit
of overhead is unacceptable: boxing, closures, additional method calls are all out.
This module is carefully optimized to give zero overhead if Config.tracingEnabled
is false. The trace
operation is called in various hotspots, so every tiny bit
of overhead is unacceptable: boxing, closures, additional method calls are all out.
This trait implements isHidden
so that multiple messages per position
are suppressed, unless they are of increasing severity.
This trait implements isHidden
so that multiple messages per position
are suppressed, unless they are of increasing severity.
Exposes the
Exposes the
trace("question") { op }
syntax.
Traced operations will print indented messages if enabled. Tracing depends on Config.tracingEnabled and dotty.tools.dotc.config.ScalaSettings.Ylog. Tracing can be forced by replacing trace with trace.force or trace.log (see below).
trace("question") { op } }}}
Traced operations will print indented messages if enabled. Tracing depends on Config.tracingEnabled and dotty.tools.dotc.config.ScalaSettings.Ylog. Tracing can be forced by replacing trace with trace.force or trace.log (see below).