You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is no defense for having a "standard" option which is only useful for compiling the scala library. A -X or -Y option would be better, but that just clutters the next set. It should be a "-Z" option, only for guys like ourselves.
I think you misunderstand what sourcepath does. In fact, I don't believe there
is a good usecase for it, except compiling the standard library
It's not giving a path and telling the compiler to compile everything in there.
Basically, sourcepath allows you to compile the standard library without anything
on the classpath. The compiler will create class symbols for source files based
on their path and name.
@VladUreche said (edited on Jun 14, 2012 8:36:44 AM UTC):
-sourcepath is also used in the presentation compiler. And it seems pretty standard:
$ javac -help 2>&1| grep sourcepath
-sourcepath <path> Specify where to find input source files
EDIT: regarding the -sourcepath semantics clash in scalac vs scaladoc, the meeting decision was to disable the bootstrapping semantics from sourcepath when running scaladoc. So (still) WON'T FIX, sorry.
@harrah said:
It does something sensible for end users in javac. It does not appear to do the same thing for scalac, which is why it should be hidden behind -X or -Y.
a/A.scala:
packageatraitA {
defx: a.B
}
a/B.scala:
packageaclassB {
valx=3
}
Run:
$ scalac -sourcepath . a/A.scala
a/A.scala:4:error: typeB is not a member of packageadefx: a.B
^
one error found
It doesn't find a/B.scala like javac would. This is why the original report quoted:
In fact, I don't believe there is a good usecase for it, except compiling the standard library.
There is no defense for having a "standard" option which is only useful for compiling the scala library. A -X or -Y option would be better, but that just clutters the next set. It should be a "-Z" option, only for guys like ourselves.
On 28 July 2011 16:12, Lukas Rytz lukas.rytz@epfl.ch wrote:
Oh, ok. I think it would be good to somehow make this setting less visible. If you go here: http://www.scala-lang.org/docu/files/tools/scalac.html
-sourcepath
Specify where to find input source files.
This description gives no clue what this option is about.
The text was updated successfully, but these errors were encountered: