c

bloop.reporter

ObservedReporter

final class ObservedReporter extends ZincReporter

Linear Supertypes
ZincReporter, ConfigurableReporter, xsbti.Reporter, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ObservedReporter
  2. ZincReporter
  3. ConfigurableReporter
  4. Reporter
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new ObservedReporter(observedLogger: ObservedLogger[Logger], underlying: Reporter)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def allProblems: Seq[Problem]

    All the Problems seen by this reporter.

    All the Problems seen by this reporter.

    Definition Classes
    ObservedReporterConfigurableReporter
  5. def allProblemsPerPhase: Seq[ProblemPerPhase]
    Definition Classes
    ObservedReporterZincReporter
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  8. def comment(pos: Position, msg: String): Unit
    Definition Classes
    ObservedReporter → Reporter
  9. val config: ReporterConfig

    The configuration for this reporter.

    The configuration for this reporter.

    Definition Classes
    ObservedReporterConfigurableReporter
  10. val cwd: AbsolutePath

    The current working directory of the user who started compilation.

    The current working directory of the user who started compilation.

    Definition Classes
    ObservedReporterConfigurableReporter
  11. def enableFatalWarnings(): Unit

    Enables internal bloop implementation of fatal warnings.

    Enables internal bloop implementation of fatal warnings.

    Having fatal warnings implemented inside the compiler has several drawbacks:

    1. Bloop receives a failed compilation when there is a warning. A failed compilation doesn't allow us to cache the work done during an incremental compiler cycle and the compilation products generated are thrown away. This means next time we compile we need to redo the work of compiling all changed source files when we would only want to recompile the files that produced a fatal warning.

    2. When warnings are produced, Metals doesn't have access to the class files generated by the failed compilation. This affects negatively the editing experience in the editor.

    To work around these limitations, we remove -Xfatal-warnings from the scalac options passed to the compiler and we implement fatal warnings ourselves in our reporter implementation.

    Our implementation promotes warnings to errors just before we're going to report them but still represents warnings as warnings in the analysis file. At the same time, it also treats successful compilations with fatal warnings as errors at the very end of the compilation pipeline, after all the compilation passes have been done in a build graph, and guarantees that it works for clients that have their compilations deduplicated.

    All in all, implementing fatal warnings reproduces the previous behavior in the compiler but without the inconveniences of handling compilation results as failures when only fatal warnings are solely responsible for the failed result.

    Definition Classes
    ObservedReporterZincReporter
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  14. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  15. def getSourceFilesWithFatalWarnings: Set[File]

    Tells the caller which source files have fatal warnings so that Bloop can mark them as changed and get recompiled in the next incremental cycle.

    Tells the caller which source files have fatal warnings so that Bloop can mark them as changed and get recompiled in the next incremental cycle.

    Definition Classes
    ObservedReporterZincReporter
  16. def hasErrors(): Boolean

    true if this reporter has received errors, false otherwise.

    true if this reporter has received errors, false otherwise.

    Definition Classes
    ObservedReporterConfigurableReporter → Reporter
  17. def hasWarnings(): Boolean

    true if this reporter has received warnings, false otherwise.

    true if this reporter has received warnings, false otherwise.

    Definition Classes
    ObservedReporterConfigurableReporter → Reporter
  18. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  19. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  20. def log(xproblem: xsbti.Problem): Unit
    Definition Classes
    ObservedReporter → Reporter
  21. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  23. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  24. val observedLogger: ObservedLogger[Logger]
  25. def printSummary(): Unit
    Definition Classes
    ObservedReporter → Reporter
  26. def problems(): Array[xsbti.Problem]
    Definition Classes
    ObservedReporter → Reporter
  27. def processEndCompilation(previousSuccessfulProblems: List[ProblemPerPhase], code: StatusCode, clientClassesDir: Option[AbsolutePath], analysisOut: Option[AbsolutePath]): Unit

    A function called at the very end of compilation that processes the state of the reporter.

    A function called at the very end of compilation that processes the state of the reporter. The execution of this endpoint can clean or report more diagnostics with the client but it does not announce the end of compilation, which is instead done with announceEndCompilation.

    previousSuccessfulProblems

    The problems reported in the previous compiler analysis that were successful.

    code

    The status code for a given compilation. The status code can be used whenever there is a noop compile and it's successful or cancelled.

    clientClassesDir

    The analysis file of the client in case it has been rewritten. compilation has been finished. When the request is deduplicated, this directory matches the classes directory of the deduplicated client.

    Definition Classes
    ObservedReporterZincReporter
  28. def reportCancelledCompilation(): Unit

    Report the compile cancellation of this project.

    Report the compile cancellation of this project.

    Definition Classes
    ObservedReporterZincReporter
  29. def reportCompilationProgress(progress: Long, total: Long): Unit

    Report the progress from the compiler.

    Report the progress from the compiler.

    Definition Classes
    ObservedReporterZincReporter
  30. def reportEndCompilation(): Unit

    A function called at the very end of compilation that processes the end of compilation from the reporter point of view as well as announce the end to the client.

    A function called at the very end of compilation that processes the end of compilation from the reporter point of view as well as announce the end to the client.

    This method is called when the caller knows for sure that announcing the end of compilation to the client is safe. For example, when a compilation fails and there are no background tasks to run. Compare this to the sister reportEndCompilation method which is used for the opposite.

    Definition Classes
    ObservedReporterZincReporter
  31. def reportEndIncrementalCycle(durationMs: Long, result: Try[Unit]): Unit

    A function called after every incremental cycle, even if any compilation errors happen.

    A function called after every incremental cycle, even if any compilation errors happen. This method is not called if the compilation is a no-op (e.g. same analysis as before).

    durationMs

    The time it took to complete the incremental compiler cycle.

    result

    The result of the incremental cycle. We don't use bsp.StatusCode because the bloop backend, where this method is used, should not depend on bsp4j.

    Definition Classes
    ObservedReporterZincReporter
  32. def reportNextPhase(phase: String, sourceFile: File): Unit

    Report when the compiler enters in a phase.

    Report when the compiler enters in a phase.

    Definition Classes
    ObservedReporterZincReporter
  33. def reportStartCompilation(previousProblems: List[ProblemPerPhase]): Unit

    A function called *always* at the very beginning of compilation.

    A function called *always* at the very beginning of compilation.

    Definition Classes
    ObservedReporterZincReporter
  34. def reportStartIncrementalCycle(sources: Seq[VirtualFile], outputDirs: Seq[File]): Unit

    A function called before every incremental cycle with the compilation inputs.

    A function called before every incremental cycle with the compilation inputs. This method is not called if the compilation is a no-op (e.g. same analysis as before).

    Definition Classes
    ObservedReporterZincReporter
  35. def reset(): Unit
    Definition Classes
    ObservedReporter → Reporter
  36. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  37. def toString(): String
    Definition Classes
    AnyRef → Any
  38. val underlying: Reporter
  39. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  40. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  41. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from ZincReporter

Inherited from ConfigurableReporter

Inherited from xsbti.Reporter

Inherited from AnyRef

Inherited from Any

Ungrouped