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" compiler crashes with eponymous type aliases and modules #6321

Closed
scabug opened this issue Sep 6, 2012 · 10 comments
Labels

Comments

@scabug
Copy link

scabug commented Sep 6, 2012

In a project I am struggling with spurious compiler crashes with "illegal cyclic reference involving ..." messages. They seem to be triggered by the co-presence of a type and an eponymous singleton object within the same namespace (package).

As noted on scala-internals, I was not able to minimise the problem. I really did an effort (https://github.com/Sciss/ScalacCyclicBug) but no success, the bugs don't appear. So to reproduce the problem, the following should suffice:

In this project, the tricky situation occurs twice (Scan and ProcGroup). The mere presence of the type aliases and objects doesn't seem to suffice to produce the bugs, but rather the references to those. Renaming the companion objects, e.g. to ProcGroupX, is a workaround, but obviously not the intended design. Also probably replacing the type aliases with traits (trait Scan) would help, but again is not possible in my current API.

@scabug
Copy link
Author

scabug commented Sep 6, 2012

Imported From: https://issues.scala-lang.org/browse/SI-6321?orig=1
Reporter: @Sciss
Affected Versions: 2.10.0-M7
See #5031

@scabug
Copy link
Author

scabug commented Sep 6, 2012

@retronym said:
Seems similar to #5031.

@scabug
Copy link
Author

scabug commented Oct 4, 2012

@adriaanm said:
given the similarity, Hubert, could you please have a look?

@scabug
Copy link
Author

scabug commented Oct 4, 2012

@hubertp said (edited on Oct 4, 2012 11:10:53 AM UTC):
Sciss, if you manage to remove the dependency on sbt in some sensible way then I am more likely to look into it.

@scabug
Copy link
Author

scabug commented Oct 4, 2012

@retronym said:
@hubert:

$ sbt
> test:compile
> last // this will show you the scalac command line

@scabug
Copy link
Author

scabug commented Oct 11, 2012

@hubertp said:

info] Resolving de.sciss#lucrestm_2.10.0-M7;1.0.+ ...
[info] Resolving org.scala-tools#scala-stm_2.10.0-M7;0.6 ...
[info] Resolving com.sleepycat#je;5.0.58 ...
[warn] 	module not found: com.sleepycat#je;5.0.58
[warn] ==== local: tried
[warn]   /home/hubert/.ivy2/local/com.sleepycat/je/5.0.58/ivys/ivy.xml
[warn] ==== sonoreleases: tried
[warn]   http://oss.sonatype.org/content/repositories/releases/com/sleepycat/je/5.0.58/je-5.0.58.pom
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/com/sleepycat/je/5.0.58/je-5.0.58.pom
[info] Resolving de.sciss#lucreexpr_2.10.0-M7;1.0.+ ...
[info] Resolving de.sciss#prefuse-core;0.21 ...
[info] Resolving org.scalatest#scalatest_2.10.0-M7;1.9-2.10.0-M7-B1 ...
[info] Resolving org.scala-lang#scala-reflect;2.10.0-M7 ...
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[warn] 	::          UNRESOLVED DEPENDENCIES         ::
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[warn] 	:: com.sleepycat#je;5.0.58: not found
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) sbt.ResolveException: unresolved dependency: com.sleepycat#je;5.0.58: not found
[error] Total time: 14 s, completed Oct 11, 2012 1:07:37 PM

@scabug
Copy link
Author

scabug commented Oct 30, 2012

@hubertp said:
Adriaan, since when we are the ones who need to dig through whole big projects to find a bug? True, I did it a couple of times out of social courtesy but it's not that I don't have better things to do.

@scabug
Copy link
Author

scabug commented Oct 30, 2012

@adriaanm said:
I never said you should dig in big projects, I'm sorry if it came across like that. I do think testing their own code is one of the best things anyone can do.

@scabug
Copy link
Author

scabug commented Oct 30, 2012

@Sciss said (edited on Oct 30, 2012 9:59:01 PM UTC):
@hubert I'm sorry that you had problems digging up Berkeley DB JE. This seems to come from the curse of Ivy (?) that dependency repositories are not transitory :-( With sbt's local cache it's often not clear that something is missing, as was the case here.

The missing repo for com.sleepycat should be

resolvers += "Oracle Repository" at "http://download.oracle.com/maven"

Is there any trick to include that in the pom so that it shows up in dependent projects?\

I added the resolver to the mentioned branch (cyclic_bug), so hopefully it should proceed to compilation stage now

@scabug scabug added the typer label Apr 7, 2017
@scabug scabug added this to the Backlog milestone Apr 7, 2017
@som-snytt
Copy link

Closing as duplicate. I rewound the subject repo to Sep 5, 2012, and attempted to run old sbt under old java, but was defeated by dependencies, like those who have gone before me.

It was fun seeing <+= again. I got out an old pair of bell-bottoms and put them on, too.

@SethTisue SethTisue removed this from the Backlog milestone Jun 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants