This page is no longer maintained — Please continue to the home page at www.scala-lang.org

-sourcepath doesn't work?

2 replies
gkossakowski
Joined: 2010-03-11,
User offline. Last seen 33 weeks 5 days ago.
Hi,
grek-imac:bin grek$ ./scalac -sourcepath ~/tmp/arrays/Usage: scalac <options> <source files>where possible standard options include: [...]
It looks like -sourcepath doesn't work in scala's trunk. I tried to debug it and it seems like -sourcepath is never picked up when list of source files is being assembled.
Am I missing something obvious or it's ready for a ticket?
--
Grzegorz Kossakowski

rytz
Joined: 2008-07-01,
User offline. Last seen 45 weeks 5 days ago.
Re: -sourcepath doesn't work?
I think you misunderstand what sourcepath does. In fact, I don't believe thereis 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 anythingon the classpath. The compiler will create class symbols for source files basedon their path and name.
Lukas
On Thu, Jul 28, 2011 at 16:03, Grzegorz Kossakowski <grzegorz [dot] kossakowski [at] gmail [dot] com> wrote:
Hi,
grek-imac:bin grek$ ./scalac -sourcepath ~/tmp/arrays/Usage: scalac <options> <source files> where possible standard options include: [...]
It looks like -sourcepath doesn't work in scala's trunk. I tried to debug it and it seems like -sourcepath is never picked up when list of source files is being assembled.
Am I missing something obvious or it's ready for a ticket?
--
Grzegorz Kossakowski


gkossakowski
Joined: 2010-03-11,
User offline. Last seen 33 weeks 5 days ago.
Re: -sourcepath doesn't work?
On 28 July 2011 16:12, Lukas Rytz <lukas [dot] rytz [at] epfl [dot] ch> wrote:
I think you misunderstand what sourcepath does. In fact, I don't believe thereis 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 anythingon the classpath. The compiler will create class symbols for source files basedon their path and name.

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 <path>
Specify where to find input source files. 

This description gives no clue what this option is about.

--
Grzegorz Kossakowski

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland