summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.xml14
-rw-r--r--lib/scala-compiler.jar.desired.sha12
-rw-r--r--lib/scala-library.jar.desired.sha12
-rw-r--r--lib/scala-reflect.jar.desired.sha12
-rw-r--r--project/Build.scala2
-rw-r--r--project/Layers.scala2
-rw-r--r--src/compiler/scala/tools/ant/FastScalac.scala2
-rw-r--r--src/compiler/scala/tools/ant/ScalaMatchingTask.scala9
-rw-r--r--src/compiler/scala/tools/ant/Scalac.scala43
-rw-r--r--src/compiler/scala/tools/ant/Scaladoc.scala69
-rw-r--r--src/compiler/scala/tools/ant/sabbus/Make.scala2
-rw-r--r--src/compiler/scala/tools/ant/sabbus/ScalacFork.scala2
-rw-r--r--src/compiler/scala/tools/ant/sabbus/Settings.scala6
-rw-r--r--src/compiler/scala/tools/nsc/doc/Settings.scala10
-rw-r--r--src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala2
-rw-r--r--src/compiler/scala/tools/nsc/interactive/tests/InteractiveTestSettings.scala2
-rw-r--r--src/compiler/scala/tools/nsc/settings/ScalaSettings.scala15
-rw-r--r--src/compiler/scala/tools/nsc/settings/StandardScalaSettings.scala11
-rw-r--r--src/compiler/scala/tools/util/PathResolver.scala12
-rw-r--r--src/manual/scala/man1/scalac.scala3
-rw-r--r--src/manual/scala/man1/scaladoc.scala12
-rw-r--r--src/partest/scala/tools/partest/nest/Worker.scala12
22 files changed, 94 insertions, 142 deletions
diff --git a/build.xml b/build.xml
index a23ed7ec7c..da52cd570a 100644
--- a/build.xml
+++ b/build.xml
@@ -1938,7 +1938,7 @@ DOCUMENTATION
docfooter="epfl"
docsourceurl="${scaladoc.url}€{FILE_PATH}.scala#L1"
docUncompilable="${src.dir}/library-aux"
- docSourcePath="${src.dir}"
+ sourcepath="${src.dir}"
classpathref="pack.classpath"
addparams="${scalac.args.all}"
docRootContent="${src.dir}/library/rootdoc.txt"
@@ -2020,7 +2020,7 @@ DOCUMENTATION
doctitle="Scala Compiler"
docversion="${version.number}"
docsourceurl="${scaladoc.url}€{FILE_PATH}.scala#L1"
- docSourcePath="${src.dir}"
+ sourcepath="${src.dir}"
classpathref="pack.classpath"
srcdir="${src.dir}/compiler"
docRootContent="${src.dir}/compiler/rootdoc.txt"
@@ -2043,7 +2043,7 @@ DOCUMENTATION
destdir="${build-docs.dir}/jline"
doctitle="Scala JLine"
docversion="${version.number}"
- docSourcePath="${src.dir}"
+ sourcepath="${src.dir}"
classpathref="pack.classpath"
srcdir="${src.dir}/jline/src/main/java"
addparams="${scalac.args.all}"
@@ -2067,7 +2067,7 @@ DOCUMENTATION
doctitle="Scalap"
docversion="${version.number}"
docsourceurl="${scaladoc.url}€{FILE_PATH}.scala#L1"
- docSourcePath="${src.dir}"
+ sourcepath="${src.dir}"
classpathref="pack.classpath"
srcdir="${src.dir}/scalap"
addparams="${scalac.args.all}"
@@ -2089,7 +2089,7 @@ DOCUMENTATION
destdir="${build-docs.dir}/scala-partest"
doctitle="Scala Parallel Testing Framework"
docversion="${version.number}"
- docSourcePath="${src.dir}"
+ sourcepath="${src.dir}"
classpathref="pack.classpath"
srcdir="${src.dir}/partest"
addparams="${scalac.args.all}"
@@ -2111,7 +2111,7 @@ DOCUMENTATION
destdir="${build-docs.dir}/continuations-plugin"
doctitle="Delimited Continuations Compiler Plugin"
docversion="${version.number}"
- docSourcePath="${src.dir}"
+ sourcepath="${src.dir}"
classpathref="pack.classpath"
srcdir="${src.dir}/continuations/plugin"
addparams="${scalac.args.all}"
@@ -2133,7 +2133,7 @@ DOCUMENTATION
destdir="${build-docs.dir}/actors-migration"
doctitle="Actors Migration Kit"
docversion="${version.number}"
- docSourcePath="${src.dir}"
+ sourcepath="${src.dir}"
classpathref="pack.classpath"
srcdir="${src.dir}/actors-migration"
addparams="${scalac.args.all}"
diff --git a/lib/scala-compiler.jar.desired.sha1 b/lib/scala-compiler.jar.desired.sha1
index 8664d8de5b..72eacf4fc3 100644
--- a/lib/scala-compiler.jar.desired.sha1
+++ b/lib/scala-compiler.jar.desired.sha1
@@ -1 +1 @@
-78aea1d6d86525ce869139f66bfb98505dab6c76 ?scala-compiler.jar
+043cf67f1a3769fb40d058693572058c5a7bf831 ?scala-compiler.jar
diff --git a/lib/scala-library.jar.desired.sha1 b/lib/scala-library.jar.desired.sha1
index 7a288e4086..aca99c9680 100644
--- a/lib/scala-library.jar.desired.sha1
+++ b/lib/scala-library.jar.desired.sha1
@@ -1 +1 @@
-935553e8d1dfb5d71652c195ce25314c3af2442c ?scala-library.jar
+410e7a0afc217532efe48c1c71684e08428bc211 ?scala-library.jar
diff --git a/lib/scala-reflect.jar.desired.sha1 b/lib/scala-reflect.jar.desired.sha1
index 321ac0752b..5878201d78 100644
--- a/lib/scala-reflect.jar.desired.sha1
+++ b/lib/scala-reflect.jar.desired.sha1
@@ -1 +1 @@
-d3a859a035f849d334732b12518715e7c9f4a475 ?scala-reflect.jar
+c4d6c4bd4c1a2d7b34a940ab935673a73dfb8630 ?scala-reflect.jar
diff --git a/project/Build.scala b/project/Build.scala
index f01651b239..610f756a34 100644
--- a/project/Build.scala
+++ b/project/Build.scala
@@ -359,7 +359,7 @@ object ScalaBuild extends Build with Layers {
},
compile := inc.Analysis.Empty,
// scaladocOptions in Compile <++= (baseDirectory) map (bd =>
- // Seq("-doc-source-path", (bd / "src" / "library").getAbsolutePath,
+ // Seq("-sourcepath", (bd / "src" / "library").getAbsolutePath,
// "-doc-no-compile", (bd / "src" / "library-aux").getAbsolutePath,
// "-doc-source-url", """https://lampsvn.epfl.ch/trac/scala/browser/scala/trunk/src/€{FILE_PATH}.scala#L1""",
// "-doc-root-content", (bd / "compiler/scala/tools/nsc/doc/html/resource/lib/rootdoc.txt").getAbsolutePath
diff --git a/project/Layers.scala b/project/Layers.scala
index fd614ef9ac..6d0c68f2a4 100644
--- a/project/Layers.scala
+++ b/project/Layers.scala
@@ -71,7 +71,7 @@ trait Layers extends Build {
resourceDirectory in Compile <<= baseDirectory apply (_ / "src" / "library"),
defaultExcludes in unmanagedResources := ("*.scala" | "*.java" | "*.disabled"),
// TODO - Allow other scalac option settings.
- scalacOptions in Compile <++= (scalaSource in Compile) map (src => Seq("-Ysourcepath", src.getAbsolutePath)),
+ scalacOptions in Compile <++= (scalaSource in Compile) map (src => Seq("-sourcepath", src.getAbsolutePath)),
resourceGenerators in Compile <+= (resourceManaged, Versions.scalaVersions, skip in Compile, streams) map Versions.generateVersionPropertiesFile("library.properties"),
referenceScala
)
diff --git a/src/compiler/scala/tools/ant/FastScalac.scala b/src/compiler/scala/tools/ant/FastScalac.scala
index 616c93faeb..c0d7441ad5 100644
--- a/src/compiler/scala/tools/ant/FastScalac.scala
+++ b/src/compiler/scala/tools/ant/FastScalac.scala
@@ -100,7 +100,7 @@ class FastScalac extends Scalac {
List(
/*scalac*/
s.bootclasspath, s.classpath, s.extdirs, s.dependencyfile, s.encoding,
- s.outdir, s.Ysourcepath,
+ s.outdir, s.sourcepath,
/*fsc*/
s.server
) filter (_.value != "") flatMap (x => List(x.name, x.value))
diff --git a/src/compiler/scala/tools/ant/ScalaMatchingTask.scala b/src/compiler/scala/tools/ant/ScalaMatchingTask.scala
index f459075565..2931f481e2 100644
--- a/src/compiler/scala/tools/ant/ScalaMatchingTask.scala
+++ b/src/compiler/scala/tools/ant/ScalaMatchingTask.scala
@@ -10,20 +10,13 @@ package scala.tools.ant
import java.io.{ File, InputStream, FileWriter }
-import org.apache.tools.ant.{ Task, BuildException, Project }
+import org.apache.tools.ant.{ Task, BuildException }
import org.apache.tools.ant.taskdefs.MatchingTask
import org.apache.tools.ant.types.{ Path, Reference }
trait ScalaTask {
self: Task =>
- /** Logs a warning message from the ant task (such as deprecated warnings) */
- protected def buildWarning(message: String): Unit = {
- log("warning:", Project.MSG_WARN)
- log(" " + message, Project.MSG_WARN)
- log("", Project.MSG_WARN)
- }
-
/** Generates a build error. Error location will be the
* current task in the ant file.
*
diff --git a/src/compiler/scala/tools/ant/Scalac.scala b/src/compiler/scala/tools/ant/Scalac.scala
index 8dbb737671..a34692f5e0 100644
--- a/src/compiler/scala/tools/ant/Scalac.scala
+++ b/src/compiler/scala/tools/ant/Scalac.scala
@@ -30,8 +30,8 @@ import scala.tools.nsc.reporters.{Reporter, ConsoleReporter}
* - `destdir`,
* - `classpath`,
* - `classpathref`,
- * - `Ysourcepath`,
- * - `Ysourcepathref`,
+ * - `sourcepath`,
+ * - `sourcepathref`,
* - `bootclasspath`,
* - `bootclasspathref`,
* - `extdirs`,
@@ -61,7 +61,7 @@ import scala.tools.nsc.reporters.{Reporter, ConsoleReporter}
* It also takes the following parameters as nested elements:
* - `src` (for `srcdir`),
* - `classpath`,
- * - `Ysourcepath`,
+ * - `sourcepath`,
* - `bootclasspath`,
* - `extdirs`,
* - `compilerarg`.
@@ -119,7 +119,7 @@ class Scalac extends ScalaMatchingTask with ScalacShared {
/** The class path to use for this compilation. */
protected var classpath: Option[Path] = None
/** The source path to use for this compilation. */
- protected var Ysourcepath: Option[Path] = None
+ protected var sourcepath: Option[Path] = None
/** The boot class path to use for this compilation. */
protected var bootclasspath: Option[Path] = None
/** The path to use when finding scalac - *only used for forking!* */
@@ -253,32 +253,19 @@ class Scalac extends ScalaMatchingTask with ScalacShared {
createClasspath().setRefid(input)
}
- // bridge to setYsourcepath
- @deprecated("The scalac sourcepath attribute is deprecated. Please use ySourcePath instead!")
- def setSourcepath(input: Path) = {
- buildWarning("The scalac sourcepath attribute is deprecated. Please use ySourcePath instead!")
- setYSourcepath(input)
- }
-
- @deprecated("The scalac sourcepath attribute is deprecated. Please use ySourcePath instead!")
- def setSourcepathref(input: Reference) = {
- buildWarning("The scalac sourcepath attribute is deprecated. Please use ySourcePath instead!")
- setYSourcepathref(input)
- }
-
- /** Sets the `Ysourcepath` attribute. Used by [[http://ant.apache.org Ant]].
+ /** Sets the `sourcepath` attribute. Used by [[http://ant.apache.org Ant]].
* @param input The value of `sourcepath`. */
- def setYSourcepath(input: Path) {
- Ysourcepath = setOrAppend(Ysourcepath, input)
+ def setSourcepath(input: Path) {
+ sourcepath = setOrAppend(sourcepath, input)
}
/** Sets the `sourcepath` as a nested sourcepath Ant parameter.
* @return A source path to be configured. */
- def createSourcepath(): Path = createNewPath(Ysourcepath _, p => Ysourcepath = p)
+ def createSourcepath(): Path = createNewPath(sourcepath _, p => sourcepath = p)
- /** Sets the `docSourcePath` as an external reference Ant parameter.
+ /** Sets the `sourcepath` as an external reference Ant parameter.
* @param input A reference to a source path. */
- def setYSourcepathref(input: Reference) {
+ def setSourcepathref(input: Reference) {
createSourcepath().setRefid(input)
}
@@ -465,10 +452,10 @@ class Scalac extends ScalaMatchingTask with ScalacShared {
if (destination.isEmpty) buildError("Member 'destination' is empty.")
else existing(getProject resolveFile destination.get.toString)
- /** Gets the value of the `ySourcepath` attribute in a
+ /** Gets the value of the `sourcepath` attribute in a
* Scala-friendly form.
* @return The source path as a list of files. */
- protected def getSourcepath: List[File] = pathAsList(Ysourcepath, "sourcepath")
+ protected def getSourcepath: List[File] = pathAsList(sourcepath, "sourcepath")
/** Gets the value of the `bootclasspath` attribute in a
* Scala-friendly form.
@@ -598,10 +585,10 @@ class Scalac extends ScalaMatchingTask with ScalacShared {
settings.outdir.value = asString(destination.get)
if (!classpath.isEmpty)
settings.classpath.value = asString(getClasspath)
- if (!Ysourcepath.isEmpty)
- settings.Ysourcepath.value = asString(getSourcepath)
+ if (!sourcepath.isEmpty)
+ settings.sourcepath.value = asString(getSourcepath)
else if (origin.get.size() > 0)
- settings.Ysourcepath.value = origin.get.list()(0)
+ settings.sourcepath.value = origin.get.list()(0)
if (!bootclasspath.isEmpty)
settings.bootclasspath.value = asString(getBootclasspath)
if (!extdirs.isEmpty) settings.extdirs.value = asString(getExtdirs)
diff --git a/src/compiler/scala/tools/ant/Scaladoc.scala b/src/compiler/scala/tools/ant/Scaladoc.scala
index 060289640a..daa08ef8a7 100644
--- a/src/compiler/scala/tools/ant/Scaladoc.scala
+++ b/src/compiler/scala/tools/ant/Scaladoc.scala
@@ -27,8 +27,8 @@ import scala.tools.nsc.reporters.{Reporter, ConsoleReporter}
* - `destdir`,
* - `classpath`,
* - `classpathref`,
- * - `docSourcePath`,
- * - `docSourcePathref`,
+ * - `sourcepath`,
+ * - `sourcepathref`,
* - `bootclasspath`,
* - `bootclasspathref`,
* - `extdirs`,
@@ -44,12 +44,12 @@ import scala.tools.nsc.reporters.{Reporter, ConsoleReporter}
* - `docgenerator`,
* - `docrootcontent`,
* - `unchecked`,
- * - `nofail` and others :)
+ * - `nofail`.
*
* It also takes the following parameters as nested elements:
* - `src` (for srcdir),
* - `classpath`,
- * - `docSourcePath`,
+ * - `sourcepath`,
* - `bootclasspath`,
* - `extdirs`.
*
@@ -90,7 +90,7 @@ class Scaladoc extends ScalaMatchingTask {
/** The class path to use for this compilation. */
private var classpath: Option[Path] = None
/** The source path to use for this compilation. */
- private var docSourcePath: Option[Path] = None
+ private var sourcepath: Option[Path] = None
/** The boot class path to use for this compilation. */
private var bootclasspath: Option[Path] = None
/** The external extensions path to use for this compilation. */
@@ -214,33 +214,29 @@ class Scaladoc extends ScalaMatchingTask {
def setClasspathref(input: Reference) =
createClasspath().setRefid(input)
- // Bridge the gap between sourcepath and docSourcePath
- @deprecated("The scaladoc sourcepath attribute is deprecated. Please use docSourcePath instead.")
- def setSourcepath(input: Path) = {
- buildWarning("The scaladoc sourcepath attribute is deprecated. Please use docSourcePath instead.")
- setDocSourcePath(input)
- }
-
- @deprecated("The scaladoc sourcepath attribute is deprecated. Please use docSourcePath instead.")
- def setSourcepathref(input: Reference) = {
- buildWarning("The scaladoc sourcepath attribute is deprecated. Please use docSourcePath instead.")
- setDocSourcePathRef(input)
- }
-
- /** Sets the `docSourcePath` attribute. */
- def setDocSourcePath(input: Path) =
- if (docSourcePath.isEmpty) docSourcePath = Some(input)
- else docSourcePath.get.append(input)
+ /** Sets the `sourcepath` attribute. Used by [[http://ant.apache.org Ant]].
+ *
+ * @param input The value of `sourcepath`.
+ */
+ def setSourcepath(input: Path) =
+ if (sourcepath.isEmpty) sourcepath = Some(input)
+ else sourcepath.get.append(input)
- /** Sets the `docSourcePath` as a nested docSourcePath Ant parameter. */
- def createSourcePath(): Path = {
- if (docSourcePath.isEmpty) docSourcePath = Some(new Path(getProject))
- docSourcePath.get.createPath()
+ /** Sets the `sourcepath` as a nested sourcepath Ant parameter.
+ *
+ * @return A source path to be configured.
+ */
+ def createSourcepath(): Path = {
+ if (sourcepath.isEmpty) sourcepath = Some(new Path(getProject))
+ sourcepath.get.createPath()
}
- /** Sets the `docSourcePath` as an external reference Ant parameter. */
- def setDocSourcePathRef(input: Reference) =
- createSourcePath().setRefid(input)
+ /** Sets the `sourcepath` as an external reference Ant parameter.
+ *
+ * @param input A reference to a source path.
+ */
+ def setSourcepathref(input: Reference) =
+ createSourcepath().setRefid(input)
/** Sets the `bootclasspath` attribute. Used by [[http://ant.apache.org Ant]].
*
@@ -250,7 +246,7 @@ class Scaladoc extends ScalaMatchingTask {
if (bootclasspath.isEmpty) bootclasspath = Some(input)
else bootclasspath.get.append(input)
- /** Sets the `bootclasspath` as a nested `docSourcePath` Ant parameter.
+ /** Sets the `bootclasspath` as a nested `sourcepath` Ant parameter.
*
* @return A source path to be configured.
*/
@@ -276,7 +272,7 @@ class Scaladoc extends ScalaMatchingTask {
else extdirs.get.append(input)
}
- /** Sets the `extdirs` as a nested docSourcePath Ant parameter.
+ /** Sets the `extdirs` as a nested sourcepath Ant parameter.
*
* @return An extensions path to be configured.
*/
@@ -460,8 +456,8 @@ class Scaladoc extends ScalaMatchingTask {
* @return The source path as a list of files.
*/
private def getSourcepath: List[File] =
- if (docSourcePath.isEmpty) buildError("Member 'sourcepath' is empty.")
- else docSourcePath.get.list().toList map nameToFile
+ if (sourcepath.isEmpty) buildError("Member 'sourcepath' is empty.")
+ else sourcepath.get.list().toList map nameToFile
/** Gets the value of the `bootclasspath` attribute in a
* Scala-friendly form.
@@ -599,11 +595,12 @@ class Scaladoc extends ScalaMatchingTask {
docSettings.outdir.value = asString(destination.get)
if (!classpath.isEmpty)
docSettings.classpath.value = asString(getClasspath)
- if (!docSourcePath.isEmpty)
- docSettings.docSourcePath.value = asString(getSourcepath)
+ if (!sourcepath.isEmpty)
+ docSettings.sourcepath.value = asString(getSourcepath)
+ /*else if (origin.get.size() > 0)
+ settings.sourcepath.value = origin.get.list()(0)*/
if (!bootclasspath.isEmpty)
docSettings.bootclasspath.value = asString(getBootclasspath)
-
if (!extdirs.isEmpty) docSettings.extdirs.value = asString(getExtdirs)
if (!encoding.isEmpty) docSettings.encoding.value = encoding.get
if (!doctitle.isEmpty) docSettings.doctitle.value = decodeEscapes(doctitle.get)
diff --git a/src/compiler/scala/tools/ant/sabbus/Make.scala b/src/compiler/scala/tools/ant/sabbus/Make.scala
index 9433c8dc5e..57505420c5 100644
--- a/src/compiler/scala/tools/ant/sabbus/Make.scala
+++ b/src/compiler/scala/tools/ant/sabbus/Make.scala
@@ -20,7 +20,7 @@ class Make extends Task with TaskArgs {
if (!destinationDir.isEmpty) settings.d = destinationDir.get
if (!compTarget.isEmpty) settings.target = compTarget.get
if (!compilationPath.isEmpty) settings.classpath = compilationPath.get
- if (!sourcePath.isEmpty) settings.Ysourcepath = sourcePath.get
+ if (!sourcePath.isEmpty) settings.sourcepath = sourcePath.get
settings.extraParams = extraArgsFlat
Compilers.make(id.get, (compilerPath.get.list.map{ path => new File(path).toURI.toURL }), settings)
}
diff --git a/src/compiler/scala/tools/ant/sabbus/ScalacFork.scala b/src/compiler/scala/tools/ant/sabbus/ScalacFork.scala
index 2ba49cc2b5..5199e273d7 100644
--- a/src/compiler/scala/tools/ant/sabbus/ScalacFork.scala
+++ b/src/compiler/scala/tools/ant/sabbus/ScalacFork.scala
@@ -101,7 +101,7 @@ class ScalacFork extends ScalaMatchingTask with ScalacShared with TaskArgs {
compTarget foreach (settings.target = _)
compilationPath foreach (settings.classpath = _)
- sourcePath foreach (settings.Ysourcepath = _)
+ sourcePath foreach (settings.sourcepath = _)
settings.extraParams = extraArgsFlat
if (isMSIL)
diff --git a/src/compiler/scala/tools/ant/sabbus/Settings.scala b/src/compiler/scala/tools/ant/sabbus/Settings.scala
index 58e0fd42a2..c62ea172ed 100644
--- a/src/compiler/scala/tools/ant/sabbus/Settings.scala
+++ b/src/compiler/scala/tools/ant/sabbus/Settings.scala
@@ -27,8 +27,8 @@ class Settings {
def classpath_=(p: Path): this.type = { classpathBf = Some(p); this }
private var sourcepathBf: Option[Path] = None
- def Ysourcepath = sourcepathBf.get
- def Ysourcepath_=(p: Path): this.type = { sourcepathBf = Some(p); this }
+ def sourcepath = sourcepathBf.get
+ def sourcepath_=(p: Path): this.type = { sourcepathBf = Some(p); this }
private var sourcedirBf: Option[File] = None
def sourcedir = sourcedirBf.get
@@ -66,7 +66,7 @@ class Settings {
(if (!gBf.isEmpty) "-g:"+g :: Nil else Nil) :::
(if (uncheckedBf) "-unchecked" :: Nil else Nil) :::
(if (!classpathBf.isEmpty) "-classpath" :: classpath.toString :: Nil else Nil) :::
- (if (!sourcepathBf.isEmpty) "-Ysourcepath" :: Ysourcepath.toString :: Nil else Nil) :::
+ (if (!sourcepathBf.isEmpty) "-sourcepath" :: sourcepath.toString :: Nil else Nil) :::
(if (!sourcedirBf.isEmpty) "-Xsourcedir" :: sourcedir.toString :: Nil else Nil) :::
(if (!bootclasspathBf.isEmpty) "-bootclasspath" :: bootclasspath.toString :: Nil else Nil) :::
(if (!extdirsBf.isEmpty) "-extdirs" :: extdirs.toString :: Nil else Nil) :::
diff --git a/src/compiler/scala/tools/nsc/doc/Settings.scala b/src/compiler/scala/tools/nsc/doc/Settings.scala
index 9a732c308f..4458889d55 100644
--- a/src/compiler/scala/tools/nsc/doc/Settings.scala
+++ b/src/compiler/scala/tools/nsc/doc/Settings.scala
@@ -62,15 +62,7 @@ class Settings(error: String => Unit) extends scala.tools.nsc.Settings(error) {
}
/** A setting that defines a URL to be concatenated with source locations and show a link to source files.
- * If needed the docSourcePath option can be used to exclude undesired initial part of the link to sources */
- val docSourcePath = PathSetting (
- "-doc-source-path",
- "The prefix in all source file paths. Will be stripped off all paths before URLs are generated.",
- ""
- )
-
- /** A setting that defines a URL to be concatenated with source locations and show a link to source files.
- * If needed the docSourcePath option can be used to exclude undesired initial part of the link to sources */
+ * If needed the sourcepath option can be used to exclude undesired initial part of the link to sources */
val docsourceurl = StringSetting (
"-doc-source-url",
"url",
diff --git a/src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala b/src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala
index f74fb38056..3dd77d47da 100644
--- a/src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala
+++ b/src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala
@@ -208,7 +208,7 @@ class ModelFactory(val global: Global, val settings: doc.Settings) {
def sourceUrl = {
def fixPath(s: String) = s.replaceAll("\\" + java.io.File.separator, "/")
- val assumedSourceRoot = fixPath(settings.docSourcePath.value) stripSuffix "/"
+ val assumedSourceRoot = fixPath(settings.sourcepath.value) stripSuffix "/"
if (!settings.docsourceurl.isDefault)
inSource map { case (file, _) =>
diff --git a/src/compiler/scala/tools/nsc/interactive/tests/InteractiveTestSettings.scala b/src/compiler/scala/tools/nsc/interactive/tests/InteractiveTestSettings.scala
index 15592a3a21..36671555d1 100644
--- a/src/compiler/scala/tools/nsc/interactive/tests/InteractiveTestSettings.scala
+++ b/src/compiler/scala/tools/nsc/interactive/tests/InteractiveTestSettings.scala
@@ -46,7 +46,7 @@ trait InteractiveTestSettings extends TestSettings with PresentationCompilerInst
println("error processing arguments (unprocessed: %s)".format(rest))
case _ => ()
}
- adjustPaths(settings.bootclasspath, settings.classpath, settings.javabootclasspath, settings.Ysourcepath)
+ adjustPaths(settings.bootclasspath, settings.classpath, settings.javabootclasspath, settings.sourcepath)
}
/** If there's a file ending in .opts, read it and parse it for cmd line arguments. */
diff --git a/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala b/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala
index 055ea7a01f..a16b42dc47 100644
--- a/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala
+++ b/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala
@@ -176,21 +176,6 @@ trait ScalaSettings extends AbsScalaSettings
val YvirtClasses = false // too embryonic to even expose as a -Y //BooleanSetting ("-Yvirtual-classes", "Support virtual classes")
val exposeEmptyPackage = BooleanSetting("-Yexpose-empty-package", "Internal only: expose the empty package.").internalOnly()
- val Ysourcepath = PathSetting ("-Ysourcepath", "[Only used when bootstrapping the scala library] Indicates the path to the scala library source code so the code generated is stand-alone rather than referencing the previous library classes.", "") // Defaults.scalaSourcePath
-
- // this should be defined StandardScalaSettings, but there we don't have withDeprecationMessage and withPostSetHook
- // see StandardScalaSettings.sourcepath for more information
- val deprSourcepath = this match {
- case s: doc.Settings => PathSetting("-sourcepath", "Deprecated. Please use -doc-source-path.", "").
- withDeprecationMessage ("-sourcepath is deprecated. Please use -doc-source-path.").
- withPostSetHook((v: PathSetting) => s.docSourcePath.tryToSet(List(v.value)))
- case s: MutableSettings => PathSetting("-sourcepath", "Deprecated. Please use -Ysourcepath.", "").
- withDeprecationMessage ("-sourcepath is deprecated. Please use -Ysourcepath.").
- withPostSetHook((v: PathSetting) => s.Ysourcepath.tryToSet(List(v.value)))
- case _ => PathSetting("-sourcepath", "Deprecated. Please use -doc-source-path or -Ysourcepath.", "").
- withDeprecationMessage ("-sourcepath is deprecated. Please use -doc-source-path or -Ysourcepath.")
- // no PostSetHook, we have no idea what's the equivalent
- }
def stop = stopAfter
diff --git a/src/compiler/scala/tools/nsc/settings/StandardScalaSettings.scala b/src/compiler/scala/tools/nsc/settings/StandardScalaSettings.scala
index 06838adb65..1bb0948168 100644
--- a/src/compiler/scala/tools/nsc/settings/StandardScalaSettings.scala
+++ b/src/compiler/scala/tools/nsc/settings/StandardScalaSettings.scala
@@ -24,15 +24,8 @@ trait StandardScalaSettings {
val extdirs = PathSetting ("-extdirs", "Override location of installed extensions.", Defaults.scalaExtDirs)
val javabootclasspath = PathSetting ("-javabootclasspath", "Override java boot classpath.", Defaults.javaBootClassPath)
val javaextdirs = PathSetting ("-javaextdirs", "Override java extdirs classpath.", Defaults.javaExtDirs)
- // sourcePath is now deprecated, as it had two very different meanings confused under a single setting
- // for the scalac compiler -- it was only used when bootstrapping the scala library, to prevent the new library
- // bytecode to depend on the old library (now -Ysource-path and .Ysourcepath)
- // for scaladoc -- it was used to generate the URL for the source file paths (used in conjunction with
- // -doc-source-url, now -doc-source-path and .docSourcePath)
- // to prevent .sourcepath usage:
- def sourcepath : PathSetting = { assert(false, "Settings.sourcepath has been deprecated. Please use either Settings.YsourcePath or Settings.docSourcePath instead."); null.asInstanceOf[PathSetting] }
- // to bridge -sourcepath command line: we define deprSourcepath in ScalaSettings
-
+ val sourcepath = PathSetting ("-sourcepath", "Specify location(s) of source files.", "") // Defaults.scalaSourcePath
+
/** Other settings.
*/
val dependencyfile = StringSetting ("-dependencyfile", "file", "Set dependency tracking file.", ".scala_dependencies")
diff --git a/src/compiler/scala/tools/util/PathResolver.scala b/src/compiler/scala/tools/util/PathResolver.scala
index 3b2bba5f8e..5f4e6d58c3 100644
--- a/src/compiler/scala/tools/util/PathResolver.scala
+++ b/src/compiler/scala/tools/util/PathResolver.scala
@@ -179,7 +179,7 @@ class PathResolver(settings: Settings, context: JavaContext) {
case "bootclasspath" => settings.bootclasspath.value
case "extdirs" => settings.extdirs.value
case "classpath" | "cp" => settings.classpath.value
- case "Ysourcepath" => settings.Ysourcepath.value
+ case "sourcepath" => settings.sourcepath.value
}
/** Calculated values based on any given command line options, falling back on
@@ -193,7 +193,15 @@ class PathResolver(settings: Settings, context: JavaContext) {
def javaUserClassPath = if (useJavaClassPath) Defaults.javaUserClassPath else ""
def scalaBootClassPath = cmdLineOrElse("bootclasspath", Defaults.scalaBootClassPath)
def scalaExtDirs = cmdLineOrElse("extdirs", Defaults.scalaExtDirs)
- def sourcePath = cmdLineOrElse("Ysourcepath", Defaults.scalaSourcePath)
+ /** Scaladoc doesn't need any bootstrapping, otherwise will create errors such as:
+ * [scaladoc] ../scala-trunk/src/reflect/scala/reflect/makro/Reifiers.scala:89: error: object api is not a member of package reflect
+ * [scaladoc] case class ReificationError(val pos: reflect.api.PositionApi, val msg: String) extends Throwable(msg)
+ * [scaladoc] ^
+ * because the bootstrapping will look at the sourcepath and create package "reflect" in "<root>"
+ * and then when typing relative names, instead of picking <root>.scala.relect, typedIdentifier will pick up the
+ * <root>.reflect package created by the bootstrapping. Thus, no bootstrapping for scaladoc!
+ * TODO: we should refactor this as a separate -bootstrap option to have a clean implementation, no? */
+ def sourcePath = if (!settings.isScaladoc) cmdLineOrElse("sourcepath", Defaults.scalaSourcePath) else ""
/** Against my better judgment, giving in to martin here and allowing
* CLASSPATH to be used automatically. So for the user-specified part
diff --git a/src/manual/scala/man1/scalac.scala b/src/manual/scala/man1/scalac.scala
index be2a9d2cf7..49324ffa83 100644
--- a/src/manual/scala/man1/scalac.scala
+++ b/src/manual/scala/man1/scalac.scala
@@ -143,6 +143,9 @@ object scalac extends Command {
CmdOption("print"),
"Print program with all Scala-specific features removed."),
Definition(
+ CmdOption("sourcepath", Argument("path")),
+ "Specify location(s) of source files."),
+ Definition(
CmdOptionBound("target:", Argument("target")),
SeqPara(
"Specify which backend to use (" & Mono("jvm-1.5," &
diff --git a/src/manual/scala/man1/scaladoc.scala b/src/manual/scala/man1/scaladoc.scala
index 333b6ad7e1..193c77fc51 100644
--- a/src/manual/scala/man1/scaladoc.scala
+++ b/src/manual/scala/man1/scaladoc.scala
@@ -75,13 +75,7 @@ object scaladoc extends Command {
"Define the overall version number of the documentation, typically the version of the library being documented."),
Definition(
CmdOption("doc-source-url", Argument("url")),
- "Define a URL to be concatenated with source locations for link to source files."),
- Definition(
- CmdOption("doc-diagrams"),
- "Generate diagrams in the current scaladoc compilation run."),
- Definition(
- CmdOption("doc-implicits"),
- "List members generated from implicit conversions in the scaladoc page."))),
+ "Define a URL to be concatenated with source locations for link to source files."))),
Section("Compiler Options",
DefinitionList(
@@ -109,8 +103,8 @@ object scaladoc extends Command {
"include the current directory in the search path, you must " &
"include " & Mono("\".\"") & " in the new settings.")),
Definition(
- CmdOption("doc-source-path", Argument("path")),
- "Specify the common prefix in the source files' paths. Used when generating links to source."),
+ CmdOption("sourcepath", Argument("path")),
+ "Specify where to find input source files."),
Definition(
CmdOption("bootclasspath", Argument("path")),
"Override location of bootstrap class files (where to find the " &
diff --git a/src/partest/scala/tools/partest/nest/Worker.scala b/src/partest/scala/tools/partest/nest/Worker.scala
index 1c2c52263d..48f78e9ddc 100644
--- a/src/partest/scala/tools/partest/nest/Worker.scala
+++ b/src/partest/scala/tools/partest/nest/Worker.scala
@@ -694,7 +694,7 @@ class Worker(val fileManager: FileManager, params: TestRunParams) extends Actor
// create proper settings for the compiler
val settings = new Settings(workerError)
settings.outdir.value = outDir.getAbsoluteFile.getAbsolutePath
- settings.Ysourcepath.value = sourcepath
+ settings.sourcepath.value = sourcepath
settings.classpath.value = fileManager.CLASSPATH
settings.Ybuildmanagerdebug.value = true
@@ -712,7 +712,7 @@ class Worker(val fileManager: FileManager, params: TestRunParams) extends Actor
val args = (line split ' ').toList
val command = new CompilerCommand(args, settings)
command.ok && {
- bM.update(filesToSet(settings.Ysourcepath.value, command.files), Set.empty)
+ bM.update(filesToSet(settings.sourcepath.value, command.files), Set.empty)
!reporter.hasErrors
}
}
@@ -799,7 +799,7 @@ class Worker(val fileManager: FileManager, params: TestRunParams) extends Actor
NestUI.verbose("resFile: "+resFile)
// run compiler in resident mode
- // $SCALAC -d "$os_dstbase".obj -Xresident -Ysourcepath . "$@"
+ // $SCALAC -d "$os_dstbase".obj -Xresident -sourcepath . "$@"
val sourcedir = logFile.getParentFile.getAbsoluteFile
val sourcepath = sourcedir.getAbsolutePath+File.separator
NestUI.verbose("sourcepath: "+sourcepath)
@@ -807,7 +807,7 @@ class Worker(val fileManager: FileManager, params: TestRunParams) extends Actor
val argList = List(
"-d", outDir.getAbsoluteFile.getPath,
"-Xresident",
- "-Ysourcepath", sourcepath)
+ "-sourcepath", sourcepath)
// configure input/output files
val logOut = new FileOutputStream(logFile)
@@ -817,7 +817,7 @@ class Worker(val fileManager: FileManager, params: TestRunParams) extends Actor
// create compiler
val settings = new Settings(workerError)
- settings.Ysourcepath.value = sourcepath
+ settings.sourcepath.value = sourcepath
settings.classpath.value = fileManager.CLASSPATH
reporter = new ConsoleReporter(settings, scala.Console.in, logConsoleWriter)
val command = new CompilerCommand(argList, settings)
@@ -828,7 +828,7 @@ class Worker(val fileManager: FileManager, params: TestRunParams) extends Actor
val cmdArgs = (line split ' ').toList map (fs => new File(dir, fs).getAbsolutePath)
NestUI.verbose("cmdArgs: "+cmdArgs)
val sett = new Settings(workerError)
- sett.Ysourcepath.value = sourcepath
+ sett.sourcepath.value = sourcepath
val command = new CompilerCommand(cmdArgs, sett)
command.ok && {
(new compiler.Run) compile command.files