Skip to content

Commit 92c5b82

Browse files
committed
Remove the now unused setting -priorityclasspath.
It was previously only used in tests, and does not exist in Scala 2.
1 parent cfacdb6 commit 92c5b82

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

compiler/src/dotty/tools/dotc/config/PathResolver.scala

+1-7
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ class PathResolver(using c: Context) {
177177
case "extdirs" => settings.extdirs.value
178178
case "classpath" | "cp" => settings.classpath.value
179179
case "sourcepath" => settings.sourcepath.value
180-
case "priorityclasspath" => settings.priorityclasspath.value
181180
}
182181

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

210208
// Assemble the elements!
211-
// priority class path takes precedence
212209
def basis: List[Traversable[ClassPath]] = List(
213-
classesInExpandedPath(priorityClassPath), // 0. The priority class path (for testing).
214210
JrtClassPath.apply(), // 1. The Java 9 classpath (backed by the jrt:/ virtual system, if available)
215211
classesInPath(javaBootClassPath), // 2. The Java bootstrap class path.
216212
contentsOfDirsInPath(javaExtDirs), // 3. The Java extension class path.
@@ -226,7 +222,6 @@ class PathResolver(using c: Context) {
226222
override def toString: String = """
227223
|object Calculated {
228224
| scalaHome = %s
229-
| priorityClassPath = %s
230225
| javaBootClassPath = %s
231226
| javaExtDirs = %s
232227
| javaUserClassPath = %s
@@ -236,7 +231,7 @@ class PathResolver(using c: Context) {
236231
| userClassPath = %s
237232
| sourcePath = %s
238233
|}""".trim.stripMargin.format(
239-
scalaHome, ppcp(priorityClassPath),
234+
scalaHome,
240235
ppcp(javaBootClassPath), ppcp(javaExtDirs), ppcp(javaUserClassPath),
241236
useJavaClassPath,
242237
ppcp(scalaBootClassPath), ppcp(scalaExtDirs), ppcp(userClassPath),
@@ -263,4 +258,3 @@ class PathResolver(using c: Context) {
263258

264259
def asURLs: Seq[java.net.URL] = result.asURLs
265260
}
266-

compiler/src/dotty/tools/dotc/config/ScalaSettings.scala

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

0 commit comments

Comments
 (0)