Skip to content
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

Illegal cyclic reference regression in 2.13 #11734

ybasket opened this issue Sep 12, 2019 · 0 comments


Copy link

commented Sep 12, 2019

In typelevel/squants#344 we face the following problem when compiling with 2.13 (2.10-2.12 work fine) - blocking squants to be released for 2.13:

[error] squants/shared/src/main/scala/squants/motion/Acceleration.scala:25:25: illegal cyclic reference involving class Velocity
[error]     with TimeDerivative[Velocity]

Some work fixing such issues was already done in #11640, but even the integration builds of the compiler containing the fix (I used now 2.13.1-bin-d602ff4) still fail to compile squants. If I add -Ybreak-cycles -Yrecursion 2147483647 compiler flags the error message changes a bit:

[error] squants/shared/src/main/scala/squants/motion/Velocity.scala:24:13: self constructor arguments cannot reference unconstructed `this`
[error]     extends Quantity[Velocity]

Extracting a minimal example has not worked so far, even when extracting larger parts of the class hierarchy, so I can't provide more than a branch of squants to test for now:

One possibility to investigate might be the alternative solution to #11640 proposed by @adriaanm in #11640 (comment).

Let me know if any more details are needed or there are things to be tried.

@ybasket ybasket referenced this issue Sep 12, 2019
@SethTisue SethTisue added this to the 2.13.2 milestone Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.