aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/config
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/config')
-rw-r--r--src/dotty/tools/dotc/config/JavaPlatform.scala2
-rw-r--r--src/dotty/tools/dotc/config/PathResolver.scala9
-rw-r--r--src/dotty/tools/dotc/config/Settings.scala3
3 files changed, 8 insertions, 6 deletions
diff --git a/src/dotty/tools/dotc/config/JavaPlatform.scala b/src/dotty/tools/dotc/config/JavaPlatform.scala
index ef5fe9475..7f234b613 100644
--- a/src/dotty/tools/dotc/config/JavaPlatform.scala
+++ b/src/dotty/tools/dotc/config/JavaPlatform.scala
@@ -13,7 +13,7 @@ class JavaPlatform extends Platform {
def classPath(implicit ctx: Context): ClassPath = {
if (currentClassPath.isEmpty)
- currentClassPath = Some(new PathResolver(ctx).result)
+ currentClassPath = Some(new PathResolver(ctx.condensed).result)
currentClassPath.get
}
diff --git a/src/dotty/tools/dotc/config/PathResolver.scala b/src/dotty/tools/dotc/config/PathResolver.scala
index 97ea4525e..3aa42defb 100644
--- a/src/dotty/tools/dotc/config/PathResolver.scala
+++ b/src/dotty/tools/dotc/config/PathResolver.scala
@@ -135,7 +135,7 @@ object PathResolver {
def fromPathString(path: String)(implicit cctx: CondensedContext): JavaClassPath = {
val settings = cctx.settings.classpath.update(path)
- new PathResolver()(cctx.fresh.withSettings(settings)).result
+ new PathResolver(cctx.fresh.withSettings(settings)).result
}
/** With no arguments, show the interesting values in Environment and Defaults.
@@ -152,7 +152,7 @@ object PathResolver {
val ArgsSummary(sstate, rest, errors) =
cctx.settings.processArguments(args.toList, true)
errors.foreach(println)
- val pr = new PathResolver()(cctx.fresh.withSettings(sstate))
+ val pr = new PathResolver(cctx.fresh.withSettings(sstate))
println(" COMMAND: 'scala %s'".format(args.mkString(" ")))
println("RESIDUAL: 'scala %s'\n".format(rest.mkString(" ")))
pr.result.show
@@ -161,7 +161,8 @@ object PathResolver {
}
import PathResolver.{ Defaults, Environment, firstNonEmpty, ppcp }
-class PathResolver(implicit cctx: CondensedContext) {
+class PathResolver(cctx: CondensedContext) {
+ implicit def ctx: Context = cctx
import cctx.base.settings
val context = ClassPath.DefaultJavaContext
@@ -257,7 +258,7 @@ class PathResolver(implicit cctx: CondensedContext) {
lazy val result: JavaClassPath = {
val cp = new JavaClassPath(containers.toIndexedSeq, context)
if (settings.Ylogcp.value) {
- Console.println("Classpath built from " + settings.toConciseString(cctx.sstate))
+ Console.println("Classpath built from " + settings.toConciseString(ctx.sstate))
Console.println("Defaults: " + PathResolver.Defaults)
Console.println("Calculated: " + Calculated)
diff --git a/src/dotty/tools/dotc/config/Settings.scala b/src/dotty/tools/dotc/config/Settings.scala
index c1ac1f83a..1f96be342 100644
--- a/src/dotty/tools/dotc/config/Settings.scala
+++ b/src/dotty/tools/dotc/config/Settings.scala
@@ -40,7 +40,7 @@ object Settings {
def fail(msg: String) =
ArgsSummary(sstate, arguments, errors :+ msg)
- }
+ }
case class Setting[T: ClassTag] private[Settings] (
name: String,
@@ -214,6 +214,7 @@ object Settings {
setting
}
+
def BooleanSetting(name: String, descr: String): Setting[Boolean] =
publish(Setting(name, descr, false))