Skip to content

Add Playground to make debugging easier in Metals #14692

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
Mar 15, 2022
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
13 changes: 13 additions & 0 deletions compiler/test/dotty/tools/dotc/Playground.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package dotty.tools.dotc

import dotty.tools.vulpix._
import org.junit.Test
import org.junit.Ignore

@Ignore class Playground:
import TestConfiguration._
import CompilationTests._

@Test def example: Unit =
implicit val testGroup: TestGroup = TestGroup("playground")
compileFile("tests/playground/example.scala", defaultOptions).checkCompile()
2 changes: 1 addition & 1 deletion compiler/test/dotty/tools/dotc/SettingsTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class SettingsTests {
false

val default = Settings.defaultState
assertThrows[IllegalArgumentException](checkMessage("found: not an option of type java.lang.String, required: Boolean")) {
dotty.tools.assertThrows[IllegalArgumentException](checkMessage("found: not an option of type java.lang.String, required: Boolean")) {
Settings.option.updateIn(default, "not an option")
}

Expand Down
4 changes: 2 additions & 2 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ object Build {
// Prevent sbt from rewriting our dependencies
scalaModuleInfo ~= (_.map(_.withOverrideScalaVersion(false))),

libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % Test,
libraryDependencies += "com.github.sbt" % "junit-interface" % "0.13.3" % Test,

// If someone puts a source file at the root (e.g., for manual testing),
// don't pick it up as part of any project.
Expand Down Expand Up @@ -1327,7 +1327,7 @@ object Build {
"org.jsoup" % "jsoup" % "1.14.3", // Needed to process .html files for static site
Dependencies.`jackson-dataformat-yaml`,

"com.novocode" % "junit-interface" % "0.11" % "test",
"com.github.sbt" % "junit-interface" % "0.13.3" % Test,
),
Compile / mainClass := Some("dotty.tools.scaladoc.Main"),
Compile / buildInfoKeys := Seq[BuildInfoKey](version),
Expand Down
4 changes: 4 additions & 0 deletions tests/playground/example.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
object Test:
val foo: Int = 2
def bar(x: Int): Int = x + x
bar(foo)