-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Compile exercises directly with scalac instead of sbt (#31)
Compile exercises directly with scalac instead of sbt Co-authored-by: Erik Schierboom <[email protected]>
- Loading branch information
1 parent
b5a725c
commit 06428d8
Showing
33 changed files
with
211 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
.bsp/ | ||
.idea/ | ||
.vscode/ | ||
.metals/ | ||
.bloop/ | ||
dumps/ | ||
target/ | ||
tests/**/results.json | ||
tests/**/build.log | ||
tests/**/runner.log | ||
tests/**/*.original | ||
tests/**/*.original | ||
project/metals.sbt | ||
project/project |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
import Dependencies._ | ||
|
||
ThisBuild / scalaVersion := "2.12.8" | ||
ThisBuild / scalaVersion := "2.13.6" | ||
ThisBuild / version := "0.1.0-SNAPSHOT" | ||
ThisBuild / organization := "org.exercism" | ||
ThisBuild / organizationName := "exercism" | ||
|
||
lazy val root = (project in file(".")) | ||
.settings( | ||
name := "TestRunner", | ||
libraryDependencies += scalaTest % Test, | ||
libraryDependencies += "org.json" % "json" % "20201115" | ||
// not in the Test scope so that it gets added to the fat jar generated by sbt assembly | ||
libraryDependencies += scalaTest, | ||
libraryDependencies += "org.json" % "json" % "20220320" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import sbt._ | ||
|
||
object Dependencies { | ||
lazy val scalaTest = "org.scalatest" %% "scalatest" % "3.0.1" | ||
lazy val scalaTest = "org.scalatest" %% "scalatest" % "3.2.10" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version=1.4.5 | ||
sbt.version=1.5.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
[error] /opt/test-runner/tests/example-empty-file/src/test/scala/ExampleEmptyFileTest.scala:7:5: not found: value Leap | ||
[error] Leap.leapYear(2015) should be (false) | ||
[error] ^ | ||
[error] /opt/test-runner/tests/example-empty-file/src/test/scala/ExampleEmptyFileTest.scala:12:5: not found: value Leap | ||
[error] Leap.leapYear(1996) should be (true) | ||
[error] ^ | ||
[error] /opt/test-runner/tests/example-empty-file/src/test/scala/ExampleEmptyFileTest.scala:17:5: not found: value Leap | ||
[error] Leap.leapYear(2100) should be (false) | ||
[error] ^ | ||
[error] /opt/test-runner/tests/example-empty-file/src/test/scala/ExampleEmptyFileTest.scala:22:5: not found: value Leap | ||
[error] Leap.leapYear(2000) should be (true) | ||
[error] ^ | ||
[error] four errors found | ||
[error] (Test / compileIncremental) Compilation failed | ||
[error] Total time: 4 s, completed Apr 14, 2021 2:11:23 PM | ||
/tmp/exercise/src/test/scala/ExampleEmptyFileTest.scala:7: error: not found: value Leap | ||
Leap.leapYear(2015) should be (false) | ||
^ | ||
/tmp/exercise/src/test/scala/ExampleEmptyFileTest.scala:12: error: not found: value Leap | ||
Leap.leapYear(1996) should be (true) | ||
^ | ||
/tmp/exercise/src/test/scala/ExampleEmptyFileTest.scala:17: error: not found: value Leap | ||
Leap.leapYear(2100) should be (false) | ||
^ | ||
/tmp/exercise/src/test/scala/ExampleEmptyFileTest.scala:22: error: not found: value Leap | ||
Leap.leapYear(2000) should be (true) | ||
^ | ||
4 errors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,49 @@ | ||
[info] Loading project definition from /Users/pro/Exercism/scala/grade-school/project | ||
[info] Loading settings for project grade-school from build.sbt ... | ||
[info] Set current project to grade-school (in build file:/Users/pro/Exercism/scala/grade-school/) | ||
[info] Compiling 1 Scala source to /Users/pro/Exercism/scala/grade-school/target/scala-2.13/test-classes ... | ||
[error] /Users/pro/Exercism/scala/grade-school/src/test/scala/GradeSchoolTest.scala:8:15: overloaded method should with alternatives: | ||
[error] (endWithWord: org.scalatest.words.EndWithWord)(implicit ev: GradeSchoolTest.this.school.DB <:< String): GradeSchoolTest.this.ResultOfEndWithWordForString <and> | ||
[error] (startWithWord: org.scalatest.words.StartWithWord)(implicit ev: GradeSchoolTest.this.school.DB <:< String): GradeSchoolTest.this.ResultOfStartWithWordForString <and> | ||
[error] (includeWord: org.scalatest.words.IncludeWord)(implicit ev: GradeSchoolTest.this.school.DB <:< String): GradeSchoolTest.this.ResultOfIncludeWordForString <and> | ||
[error] (notExist: org.scalatest.words.ResultOfNotExist)(implicit existence: org.scalatest.enablers.Existence[GradeSchoolTest.this.school.DB]): org.scalatest.Assertion <and> | ||
[error] (existWord: org.scalatest.words.ExistWord)(implicit existence: org.scalatest.enablers.Existence[GradeSchoolTest.this.school.DB]): org.scalatest.Assertion <and> | ||
[error] (containWord: org.scalatest.words.ContainWord)org.scalatest.words.ResultOfContainWord[GradeSchoolTest.this.school.DB] <and> | ||
[error] (haveWord: org.scalatest.words.HaveWord)GradeSchoolTest.this.ResultOfHaveWordForExtent[GradeSchoolTest.this.school.DB] <and> | ||
[error] (beWord: org.scalatest.words.BeWord)GradeSchoolTest.this.ResultOfBeWordForAny[GradeSchoolTest.this.school.DB] <and> | ||
[error] (inv: org.scalactic.TripleEqualsSupport.TripleEqualsInvocationOnSpread[GradeSchoolTest.this.school.DB])(implicit ev: Numeric[GradeSchoolTest.this.school.DB]): org.scalatest.Assertion <and> | ||
[error] [U](inv: org.scalactic.TripleEqualsSupport.TripleEqualsInvocation[U])(implicit constraint: org.scalactic.CanEqual[GradeSchoolTest.this.school.DB,U]): org.scalatest.Assertion <and> | ||
[error] (notWord: org.scalatest.words.NotWord)org.scalatest.words.ResultOfNotWordForAny[GradeSchoolTest.this.school.DB] <and> | ||
[error] [TYPECLASS1[_], TYPECLASS2[_]](rightMatcherFactory2: org.scalatest.matchers.MatcherFactory2[GradeSchoolTest.this.school.DB,TYPECLASS1,TYPECLASS2])(implicit typeClass1: TYPECLASS1[GradeSchoolTest.this.school.DB], typeClass2: TYPECLASS2[GradeSchoolTest.this.school.DB]): org.scalatest.Assertion <and> | ||
[error] [TYPECLASS1[_]](rightMatcherFactory1: org.scalatest.matchers.MatcherFactory1[GradeSchoolTest.this.school.DB,TYPECLASS1])(implicit typeClass1: TYPECLASS1[GradeSchoolTest.this.school.DB]): org.scalatest.Assertion <and> | ||
[error] (rightMatcherX1: org.scalatest.matchers.Matcher[GradeSchoolTest.this.school.DB])org.scalatest.Assertion | ||
[error] cannot be applied to (scala.collection.immutable.Map[Nothing,Nothing]) | ||
[error] school.db should (Map()) | ||
[error] ^ | ||
[error] one error found | ||
[error] (Compile / compileIncremental) Compilation failed | ||
[error] Total time: 2 s, completed Feb 21, 2021, 2:37:03 PM | ||
/tmp/exercise/src/test/scala/GradeSchoolTest.scala:8: error: value should is not a member of Map[String,Int] | ||
school.db should be (Map()) | ||
^ | ||
/tmp/exercise/src/test/scala/GradeSchoolTest.scala:8: error: not found: value be | ||
school.db should be (Map()) | ||
^ | ||
/tmp/exercise/src/test/scala/GradeSchoolTest.scala:14: error: value should is not a member of Map[String,Int] | ||
school.db should be (Map(2 -> Seq("Aimee"))) | ||
^ | ||
/tmp/exercise/src/test/scala/GradeSchoolTest.scala:14: error: not found: value be | ||
school.db should be (Map(2 -> Seq("Aimee"))) | ||
^ | ||
/tmp/exercise/src/test/scala/GradeSchoolTest.scala:22: error: value should is not a member of Map[String,Int] | ||
school.db should be (Map(2 -> Seq("James", "Blair", "Paul"))) | ||
^ | ||
/tmp/exercise/src/test/scala/GradeSchoolTest.scala:22: error: not found: value be | ||
school.db should be (Map(2 -> Seq("James", "Blair", "Paul"))) | ||
^ | ||
/tmp/exercise/src/test/scala/GradeSchoolTest.scala:29: error: value should is not a member of Map[String,Int] | ||
school.db should be (Map(3 -> Seq("Chelsea"), 7 -> Seq("Logan"))) | ||
^ | ||
/tmp/exercise/src/test/scala/GradeSchoolTest.scala:29: error: not found: value be | ||
school.db should be (Map(3 -> Seq("Chelsea"), 7 -> Seq("Logan"))) | ||
^ | ||
/tmp/exercise/src/test/scala/GradeSchoolTest.scala:37: error: value should is not a member of Seq[String] | ||
school.grade(5) should be (Seq("Franklin", "Bradley")) | ||
^ | ||
/tmp/exercise/src/test/scala/GradeSchoolTest.scala:37: error: not found: value be | ||
school.grade(5) should be (Seq("Franklin", "Bradley")) | ||
^ | ||
/tmp/exercise/src/test/scala/GradeSchoolTest.scala:42: error: value should is not a member of Seq[String] | ||
school.grade(1) should be (Seq()) | ||
^ | ||
/tmp/exercise/src/test/scala/GradeSchoolTest.scala:42: error: not found: value be | ||
school.grade(1) should be (Seq()) | ||
^ | ||
/tmp/exercise/src/test/scala/GradeSchoolTest.scala:56: error: value should is not a member of Map[Int,Seq[String]] | ||
school.sorted should be (sorted) | ||
^ | ||
/tmp/exercise/src/test/scala/GradeSchoolTest.scala:56: error: not found: value be | ||
school.sorted should be (sorted) | ||
^ | ||
/tmp/exercise/src/test/scala/GradeSchoolTest.scala:57: error: value should is not a member of List[Int] | ||
school.sorted.keys.toList should be (Seq(3, 4, 6)) | ||
^ | ||
/tmp/exercise/src/test/scala/GradeSchoolTest.scala:57: error: not found: value be | ||
school.sorted.keys.toList should be (Seq(3, 4, 6)) | ||
^ | ||
16 errors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
scalaVersion := "2.12.8" | ||
scalaVersion := "2.13.6" | ||
|
||
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.1" % "test" | ||
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test" |
This file was deleted.
Oops, something went wrong.
5 changes: 3 additions & 2 deletions
5
tests/example-all-fail/src/test/scala/ExampleAllFailTest.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
scalaVersion := "2.12.8" | ||
scalaVersion := "2.13.6" | ||
|
||
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.1" % "test" | ||
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"message":"[error] /solution/src/test/scala/ExampleEmptyFileTest.scala:7:5: not found: value Leap\n[error] Leap.leapYear(2015) should be (false)\n[error] ^\n[error] /solution/src/test/scala/ExampleEmptyFileTest.scala:12:5: not found: value Leap\n[error] Leap.leapYear(1996) should be (true)\n[error] ^\n[error] /solution/src/test/scala/ExampleEmptyFileTest.scala:17:5: not found: value Leap\n[error] Leap.leapYear(2100) should be (false)\n[error] ^\n[error] /solution/src/test/scala/ExampleEmptyFileTest.scala:22:5: not found: value Leap\n[error] Leap.leapYear(2000) should be (true)\n[error] ^\n[error] four errors found\n[error] (Test / compileIncremental) Compilation failed\n[error] \n","version":2,"status":"error"} | ||
{"message":"/solution/src/test/scala/ExampleEmptyFileTest.scala:8: error: not found: value Leap\n Leap.leapYear(2015) should be (false)\n ^\n/solution/src/test/scala/ExampleEmptyFileTest.scala:13: error: not found: value Leap\n Leap.leapYear(1996) should be (true)\n ^\n/solution/src/test/scala/ExampleEmptyFileTest.scala:18: error: not found: value Leap\n Leap.leapYear(2100) should be (false)\n ^\n/solution/src/test/scala/ExampleEmptyFileTest.scala:23: error: not found: value Leap\n Leap.leapYear(2000) should be (true)\n ^\n4 errors\n","version":2,"status":"error"} |
This file was deleted.
Oops, something went wrong.
5 changes: 3 additions & 2 deletions
5
tests/example-empty-file/src/test/scala/ExampleEmptyFileTest.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
scalaVersion := "2.12.8" | ||
scalaVersion := "2.13.6" | ||
|
||
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.1" % "test" | ||
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test" |
This file was deleted.
Oops, something went wrong.
5 changes: 3 additions & 2 deletions
5
tests/example-partial-fail/src/test/scala/ExamplePartialFailTest.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
scalaVersion := "2.12.8" | ||
scalaVersion := "2.13.6" | ||
|
||
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.1" % "test" | ||
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test" |
This file was deleted.
Oops, something went wrong.
5 changes: 3 additions & 2 deletions
5
tests/example-success/src/test/scala/ExampleSuccessTest.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
scalaVersion := "2.12.8" | ||
scalaVersion := "2.13.6" | ||
|
||
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.1" % "test" | ||
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"message":"[error] /solution/src/main/scala/ExampleSyntaxError.scala:1:1: expected class or object definition\n[error] objeTTTWE @#Leap\n[error] ^\n[error] one error found\n[error] (Compile / compileIncremental) Compilation failed\n[error] \n","version":2,"status":"error"} | ||
{"message":"/solution/src/main/scala/ExampleSyntaxError.scala:1: error: expected class or object definition\nobjeTTTWE @#Leap\n^\n1 error\n","version":2,"status":"error"} |
This file was deleted.
Oops, something went wrong.
5 changes: 3 additions & 2 deletions
5
tests/example-syntax-error/src/test/scala/ExampleSyntaxErrorTest.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
scalaVersion := "2.13.6" | ||
|
||
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test" |
Oops, something went wrong.