diff --git a/compiler/src/dotty/tools/dotc/config/PathResolver.scala b/compiler/src/dotty/tools/dotc/config/PathResolver.scala index 11d733ca4d49..83400795a877 100644 --- a/compiler/src/dotty/tools/dotc/config/PathResolver.scala +++ b/compiler/src/dotty/tools/dotc/config/PathResolver.scala @@ -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 @@ -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) @@ -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. @@ -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 @@ -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), @@ -263,4 +258,3 @@ class PathResolver(using c: Context) { def asURLs: Seq[java.net.URL] = result.asURLs } - diff --git a/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala b/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala index b2e5810be0c5..14a1ad51c81e 100644 --- a/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala +++ b/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala @@ -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" diff --git a/compiler/test/dotty/tools/dotc/CompilationTests.scala b/compiler/test/dotty/tools/dotc/CompilationTests.scala index 7ecb6be11e6b..39f96f0fa5a5 100644 --- a/compiler/test/dotty/tools/dotc/CompilationTests.scala +++ b/compiler/test/dotty/tools/dotc/CompilationTests.scala @@ -243,7 +243,7 @@ class CompilationTests { defaultOptions.and("-Ycheck-reentrant", "-Yerased-terms", // support declaration of scala.compiletime.erasedValue // "-source", "3.1", // TODO: re-enable once we allow : @unchecked in pattern definitions. Right now, lots of narrowing pattern definitions fail. - "-priorityclasspath", defaultOutputDir))(libGroup) + ))(libGroup) val tastyCoreSources = sources(Paths.get("tasty/src")) val tastyCore = compileList("tastyCore", tastyCoreSources, opt)(tastyCoreGroup)