Skip to content

Remove the -priorityclasspath setting. #10736

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion compiler/test/dotty/tools/dotc/CompilationTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down