Skip to content

Commit

Permalink
Remove the now unused setting -priorityclasspath.
Browse files Browse the repository at this point in the history
It was previously only used in tests, and does not exist in
Scala 2.
  • Loading branch information
sjrd committed Dec 10, 2020
1 parent cfacdb6 commit 92c5b82
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
8 changes: 1 addition & 7 deletions compiler/src/dotty/tools/dotc/config/PathResolver.scala
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ class PathResolver(using c: Context) {
case "extdirs" => settings.extdirs.value
case "classpath" | "cp" => settings.classpath.value
case "sourcepath" => settings.sourcepath.value
case "priorityclasspath" => settings.priorityclasspath.value
}

/** Calculated values based on any given command line options, falling back on
Expand All @@ -191,7 +190,6 @@ class PathResolver(using c: Context) {
def javaUserClassPath: String = if (useJavaClassPath) Defaults.javaUserClassPath else ""
def scalaBootClassPath: String = cmdLineOrElse("bootclasspath", Defaults.scalaBootClassPath)
def scalaExtDirs: String = cmdLineOrElse("extdirs", Defaults.scalaExtDirs)
def priorityClassPath: String = cmdLineOrElse("priorityclasspath", "")
/** Scaladoc doesn't need any bootstrapping, otherwise will create errors such as:
* [scaladoc] ../scala-trunk/src/reflect/scala/reflect/macros/Reifiers.scala:89: error: object api is not a member of package reflect
* [scaladoc] case class ReificationException(val pos: reflect.api.PositionApi, val msg: String) extends Throwable(msg)
Expand All @@ -208,9 +206,7 @@ class PathResolver(using c: Context) {
import classPathFactory._

// Assemble the elements!
// priority class path takes precedence
def basis: List[Traversable[ClassPath]] = List(
classesInExpandedPath(priorityClassPath), // 0. The priority class path (for testing).
JrtClassPath.apply(), // 1. The Java 9 classpath (backed by the jrt:/ virtual system, if available)
classesInPath(javaBootClassPath), // 2. The Java bootstrap class path.
contentsOfDirsInPath(javaExtDirs), // 3. The Java extension class path.
Expand All @@ -226,7 +222,6 @@ class PathResolver(using c: Context) {
override def toString: String = """
|object Calculated {
| scalaHome = %s
| priorityClassPath = %s
| javaBootClassPath = %s
| javaExtDirs = %s
| javaUserClassPath = %s
Expand All @@ -236,7 +231,7 @@ class PathResolver(using c: Context) {
| userClassPath = %s
| sourcePath = %s
|}""".trim.stripMargin.format(
scalaHome, ppcp(priorityClassPath),
scalaHome,
ppcp(javaBootClassPath), ppcp(javaExtDirs), ppcp(javaUserClassPath),
useJavaClassPath,
ppcp(scalaBootClassPath), ppcp(scalaExtDirs), ppcp(userClassPath),
Expand All @@ -263,4 +258,3 @@ class PathResolver(using c: Context) {

def asURLs: Seq[java.net.URL] = result.asURLs
}

1 change: 0 additions & 1 deletion compiler/src/dotty/tools/dotc/config/ScalaSettings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ trait CommonScalaSettings { self: Settings.SettingGroup =>
val classpath: Setting[String] = PathSetting("-classpath", "Specify where to find user class files.", defaultClasspath) withAbbreviation "-cp" withAbbreviation "--class-path"
val outputDir: Setting[AbstractFile] = OutputSetting("-d", "directory|jar", "Destination for generated classfiles.",
new PlainDirectory(Directory(".")))
val priorityclasspath: Setting[String] = PathSetting("-priorityclasspath", "Class path that takes precedence over all other paths (for testing only).", "") withAbbreviation "--priority-class-path"
val color: Setting[String] = ChoiceSetting("-color", "mode", "Colored output", List("always", "never"/*, "auto"*/), "always"/* "auto"*/) withAbbreviation "--color"
val verbose: Setting[Boolean] = BooleanSetting("-verbose", "Output messages about what the compiler is doing.") withAbbreviation "--verbose"
val version: Setting[Boolean] = BooleanSetting("-version", "Print product version and exit.") withAbbreviation "--version"
Expand Down

0 comments on commit 92c5b82

Please sign in to comment.