Here is an example error log from my own library that has custom error messages:
[error] 5 | val x = cnt + (cnt + 10000)
[error] | ^^^^^^^^^^^
[error] | The wildcard `Int` value width (14) is larger than the bit-accurate value width (8).
[error] |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[error] |Inline stack trace
[error] |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[error] |This location contains code that was inlined from Playground.scala:5
[error] 1330 | exactOp2[FuncOp.+.type, DFC, DFValAny](lhs, rhs)
[error] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[error] |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[error] |This location contains code that was inlined from Playground.scala:5
[error] 18 | export core.DFVal.Ops.*
[error] | ^
[error] |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[error] |This location contains code that was inlined from Playground.scala:5
[error] 109 |export hdl.*
[error] | ^
[error] ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
In what ways is this inline stack trace beneficial at all, and even if there are such situations, why not make this an opt-in with a flag?
Since I also use a compiler plugin, I enforce the outer position to be null in the diagnostics to prevent these redundant traces from filling up my log, but IMO this should not be the right way to do it.