-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Add -Vcyclic
to improve reporting of "cyclic reference" errors
#10680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apparently, I followed that suggestion.
6781f7a
to
b8901c0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Let's squash before merge.
b8901c0
to
ecdaecc
Compare
-Vcyclic
to improve reporting of "cyclic reference" errors
-Vcyclic
improves 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