Closed scabug closed 10 years ago
Imported From: https://issues.scala-lang.org/browse/SI-4492?orig=1 Reporter: Martin Gamwell Dawids (mgd) See #4876 Attachments:
Martin Gamwell Dawids (mgd) said: Reproduction scenario
@adriaanm said: Un-assigning to foster work stealing, as announced in https://groups.google.com/forum/?fromgroups=#!topic/scala-internals/o8WG4plpNkw
@adriaanm said: Unassigning and rescheduling to M6 as previous deadline was missed.
@adriaanm said: Marking this as critical because the modularization may cause more of these. We should try to detect when someone needs to add scala-xml and be helpful in suggestion a dependency on scala-library-all, or a more fine-grained one.
@adriaanm said: Tweaked error message and a position: https://github.com/scala/scala/pull/3631
@adriaanm said: It'll be hard to reach parity with javac, but the above PR gets us close. The evaluation order during symbol loading is structured differently; thus, we complain about the package org.example.a before we get to the type org.example.a.A, making the error message a little less focussed.
=== What steps will reproduce the problem (please be specific and use wikiformatting)? === Consider these three simple Scala source files:
File projectA/org/example/a/A.scala:
File projectB/org/example/b/B.scala:
File projectC/org/example/c/C.scala:
Now, we compile the first two separately without problems:
Compiling the 3rd requires both projectA and projectB on the classpath. Leaving out projectA causes an expected error, but the error message is not as helpful as it could be:
If we reimplement class C in Java:
and then compile using the Java compiler we get:
This error tells us exactly what is wrong.
The source and a build script is attached.
=== Additional information === Doing the same in Eclipse leads to an even better error message (actually two messages):
This issue was originally (incorrectly) raised as part of another ticket on the Scala IDE bug tracking system:
=== What versions of the following are you using? ===