Skip to content

Every explanation is printed twice with -explain and sbt #18774

Closed
@mrdziuban

Description

@mrdziuban

Compiler version

3.3.1

Minimized code

I'm not sure if this is an issue with Scala or sbt, so please let me know if I should open an issue with sbt instead!

https://github.com/mrdziuban/dotty-explain-issue

val test = nonExistent

Output

[error] -- [E006] Not Found Error: /Users/matt/dotty-explain-test/src/main/scala/example/Test.scala:3:11
[error] 3 |val test = nonExistent
[error]   |           ^^^^^^^^^^^
[error]   |           Not found: nonExistent
[error]   |-----------------------------------------------------------------------------
[error]   | Explanation (enabled by `-explain`)
[error]   |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[error]   | The identifier for `nonExistent` is not bound, that is,
[error]   | no declaration for this identifier can be found.
[error]   | That can happen, for example, if `nonExistent` or its declaration has either been
[error]   | misspelt or if an import is missing.
[error]    -----------------------------------------------------------------------------
[error] Explanation
[error] ===========
[error] The identifier for `nonExistent` is not bound, that is,
[error] no declaration for this identifier can be found.
[error] That can happen, for example, if `nonExistent` or its declaration has either been
[error] misspelt or if an import is missing.

Expectation

The explanation should only be printed once

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions