Add -Vcyclic to improve reporting of "cyclic reference" errors#10680
Conversation
c04850d to
f8708b2
Compare
|
Dotty also has message about symbols involved in the cycle IIRC. This just uses IIRC here the lock/unlock are not symmetric? |
|
I'm concerned about performance ( How about a single |
|
it ought to be behind a diagnostic flag. is where I learned about |
c449be6 to
4a80252
Compare
|
|
||
| val badsym = if (!sym.isSynthetic) sym else { | ||
| val organics = trace.filter(!_.isSynthetic) | ||
| if (organics.length == 0) sym |
There was a problem hiding this comment.
How about adding something to the error message here? $sym is synthetic; use -Vcyclic to find which definition needs an explicit type.
There was a problem hiding this comment.
apparently, I followed that suggestion.
6781f7a to
b8901c0
Compare
lrytz
left a comment
There was a problem hiding this comment.
LGTM! Let's squash before merge.
b8901c0 to
ecdaecc
Compare
-Vcyclic to improve reporting of "cyclic reference" errors
-Vcyclicimproves reporting of "cyclic reference" errors.It enables "tracing" of symbol locking to show which symbols were involved in the cycle.
This is also helpful when a synthetic symbol name is reported, since that name is not meaningful.
Look for a non-synthetic symbol to blame.
Fixes scala/bug#7808