diff options
Diffstat (limited to 'bridge/src/sbt-test/compilerReporter/simple')
5 files changed, 0 insertions, 73 deletions
diff --git a/bridge/src/sbt-test/compilerReporter/simple/Source.scala b/bridge/src/sbt-test/compilerReporter/simple/Source.scala deleted file mode 100644 index 6f0678599..000000000 --- a/bridge/src/sbt-test/compilerReporter/simple/Source.scala +++ /dev/null @@ -1,10 +0,0 @@ -trait A -trait B - -trait Wr { - val z: A with B -} - -object Er { - val a = er1 -}
\ No newline at end of file diff --git a/bridge/src/sbt-test/compilerReporter/simple/build.sbt b/bridge/src/sbt-test/compilerReporter/simple/build.sbt deleted file mode 100644 index 017846f5e..000000000 --- a/bridge/src/sbt-test/compilerReporter/simple/build.sbt +++ /dev/null @@ -1 +0,0 @@ -Reporter.checkSettings
\ No newline at end of file diff --git a/bridge/src/sbt-test/compilerReporter/simple/project/DottyInjectedPlugin.scala b/bridge/src/sbt-test/compilerReporter/simple/project/DottyInjectedPlugin.scala deleted file mode 100644 index 3433779b6..000000000 --- a/bridge/src/sbt-test/compilerReporter/simple/project/DottyInjectedPlugin.scala +++ /dev/null @@ -1,17 +0,0 @@ -import sbt._ -import Keys._ - -object DottyInjectedPlugin extends AutoPlugin { - override def requires = plugins.JvmPlugin - override def trigger = allRequirements - - override val projectSettings = Seq( - scalaVersion := "0.1-SNAPSHOT", - scalaOrganization := "ch.epfl.lamp", - scalacOptions += "-language:Scala2", - scalaBinaryVersion := "2.11", - autoScalaLibrary := false, - libraryDependencies ++= Seq("org.scala-lang" % "scala-library" % "2.11.5"), - scalaCompilerBridgeSource := ("ch.epfl.lamp" % "dotty-bridge" % "0.1.1-SNAPSHOT" % "component").sources() - ) -} diff --git a/bridge/src/sbt-test/compilerReporter/simple/project/Reporter.scala b/bridge/src/sbt-test/compilerReporter/simple/project/Reporter.scala deleted file mode 100644 index c0a56ec82..000000000 --- a/bridge/src/sbt-test/compilerReporter/simple/project/Reporter.scala +++ /dev/null @@ -1,44 +0,0 @@ -import sbt._ -import Keys._ -import KeyRanks.DTask - -object Reporter { - import xsbti.{Reporter, Problem, Position, Severity, Maybe} - - lazy val check = TaskKey[Unit]("check", "make sure compilation info are forwared to sbt") - - // compilerReporter is marked private in sbt - lazy val compilerReporter = TaskKey[Option[xsbti.Reporter]]("compilerReporter", "Experimental hook to listen (or send) compilation failure messages.", DTask) - - lazy val reporter = - Some(new xsbti.Reporter { - private val buffer = collection.mutable.ArrayBuffer.empty[Problem] - def reset(): Unit = buffer.clear() - def hasErrors: Boolean = buffer.exists(_.severity == Severity.Error) - def hasWarnings: Boolean = buffer.exists(_.severity == Severity.Warn) - def printSummary(): Unit = println(problems.mkString(System.lineSeparator)) - def problems: Array[Problem] = buffer.toArray - def log(pos: Position, msg: String, sev: Severity): Unit = { - object MyProblem extends Problem { - def category: String = null - def severity: Severity = sev - def message: String = msg - def position: Position = pos - override def toString = s"custom: $position:$severity: $message" - } - buffer.append(MyProblem) - } - def comment(pos: xsbti.Position, msg: String): Unit = () - }) - - lazy val checkSettings = Seq( - compilerReporter in (Compile, compile) := reporter, - check <<= (compile in Compile).mapFailure( _ => { - val problems = reporter.get.problems - println(problems.toList) - assert(problems.size == 2) - assert(problems.count(_.severity == Severity.Error) == 1) // not found: er1, - assert(problems.count(_.severity == Severity.Warn) == 1) // `with' as a type operator has been deprecated; use `&' instead, - }) - ) -}
\ No newline at end of file diff --git a/bridge/src/sbt-test/compilerReporter/simple/test b/bridge/src/sbt-test/compilerReporter/simple/test deleted file mode 100644 index a5912a391..000000000 --- a/bridge/src/sbt-test/compilerReporter/simple/test +++ /dev/null @@ -1 +0,0 @@ -> check
\ No newline at end of file |