From ddd1ba554567f1e8b2c2dd2271c1e01a8b13f0b0 Mon Sep 17 00:00:00 2001 From: Tomer Ghelber Date: Sat, 7 Dec 2019 02:05:19 +0200 Subject: [PATCH 01/14] Update safety.sbt --- project/safety.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/safety.sbt b/project/safety.sbt index f476b72..5417714 100644 --- a/project/safety.sbt +++ b/project/safety.sbt @@ -1 +1 @@ -addSbtPlugin("com.leobenkel" % "safety_plugin" % "0.1.4") +addSbtPlugin("com.leobenkel" % "safety_plugin" % "0.1.3+9-fd0ea554-SNAPSHOT") From cf92c93146beb8888af43d886927fd3625d6f643 Mon Sep 17 00:00:00 2001 From: Tomer Ghelber Date: Sat, 7 Dec 2019 02:06:34 +0200 Subject: [PATCH 02/14] Update safetyPlugin.json --- safetyPlugin.json | 1 + 1 file changed, 1 insertion(+) diff --git a/safetyPlugin.json b/safetyPlugin.json index 534b9ea..5d5616b 100644 --- a/safetyPlugin.json +++ b/safetyPlugin.json @@ -1,6 +1,7 @@ { "sbtVersion": "1.3.4", "scalaVersions": [ + "2.13.1", "2.12.8" ], "modules": { From 38930d5c6b142cedb94f3f036890804d666f7252 Mon Sep 17 00:00:00 2001 From: Tomer Ghelber Date: Sat, 7 Dec 2019 02:07:10 +0200 Subject: [PATCH 03/14] Update build.sbt --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 5944bc0..d7fb1db 100644 --- a/build.sbt +++ b/build.sbt @@ -1,6 +1,6 @@ name := "mathimatica-parser" -scalaVersion := "2.12.8" +scalaVersion := "2.13.1" libraryDependencies += "org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.2" libraryDependencies += "com.typesafe.scala-logging" %% "scala-logging" % "3.9.2" From 34d4809896f663f8593965cba99664a5eaa3e4d4 Mon Sep 17 00:00:00 2001 From: Tomer Ghelber Date: Sat, 7 Dec 2019 02:07:58 +0200 Subject: [PATCH 04/14] Update .travis.yml --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 53b5661..ec962ca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ language: scala scala: + - 2.13.1 - 2.12.8 before_cache: From a03fa34470b6750d7789b0e19a8482d2c6d6fff7 Mon Sep 17 00:00:00 2001 From: Tomer Ghelber Date: Tue, 10 Dec 2019 20:08:36 +0000 Subject: [PATCH 05/14] Update safety.sbt New version of safety_plugin --- project/safety.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/safety.sbt b/project/safety.sbt index 5417714..fff9b42 100644 --- a/project/safety.sbt +++ b/project/safety.sbt @@ -1 +1 @@ -addSbtPlugin("com.leobenkel" % "safety_plugin" % "0.1.3+9-fd0ea554-SNAPSHOT") +addSbtPlugin("com.leobenkel" % "safety_plugin" % "0.1.5") From bbf6d817fb4f36ef6f4441347eaa69678dc8b306 Mon Sep 17 00:00:00 2001 From: Tomer Ghelber Date: Tue, 10 Dec 2019 22:58:01 +0200 Subject: [PATCH 06/14] Char + String is deprecated - using implicit string --- .../scala/com/github/tomerghelber/mathematica/package.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/scala/com/github/tomerghelber/mathematica/package.scala b/src/test/scala/com/github/tomerghelber/mathematica/package.scala index f022b63..c5ac670 100644 --- a/src/test/scala/com/github/tomerghelber/mathematica/package.scala +++ b/src/test/scala/com/github/tomerghelber/mathematica/package.scala @@ -24,11 +24,11 @@ package object mathematica { .map(_.replaceAll("\\\\", "\\\\") .replaceAll("\"", "\\\"")) val stringStringGen: Gen[String] = stringWithoutWrappersGen.map(s => "\"" + s + "\"") - val symbolStringGen: Gen[String] = for (head <- Gen.alphaChar; last <- Gen.alphaNumStr) yield { head + last } + val symbolStringGen: Gen[String] = for (head <- Gen.alphaChar; last <- Gen.alphaNumStr) yield { s"$head$last" } private val integerGen: Gen[Int] = Gen.chooseNum(Int.MinValue, Int.MaxValue) private val longGen: Gen[Long] = Gen.chooseNum(Long.MinValue, Long.MaxValue) val integerStringGen: Gen[String] = longGen.map(_.toString) - val rationalStringGen: Gen[String] = for(q <-longGen; p <-longGen if p != 0) yield { q + "/" + p} + val rationalStringGen: Gen[String] = for(q <-longGen; p <-longGen if p != 0) yield { s"$q/$p" } val floatStringGen: Gen[String] = Gen.chooseNum(Double.MinValue, Double.MaxValue).map(_.toString) val scientificNotationGen: Gen[String] = Gen.chooseNum(Double.MinValue, Double.MaxValue).map(BigDecimal(_).toString) val numberStringGen: Gen[String] = Gen.oneOf(integerStringGen, rationalStringGen, floatStringGen, From f6252db0404cf93688e64b2d2b67e572dbd4194d Mon Sep 17 00:00:00 2001 From: Tomer Ghelber Date: Tue, 10 Dec 2019 23:01:17 +0200 Subject: [PATCH 07/14] Ordering.Iterable is deprecated - using Ordering.Implicits.seqOrdering --- .../github/tomerghelber/mathematica/normalform/NormalForm.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/com/github/tomerghelber/mathematica/normalform/NormalForm.scala b/src/main/scala/com/github/tomerghelber/mathematica/normalform/NormalForm.scala index d8cc4cc..28a5ea9 100644 --- a/src/main/scala/com/github/tomerghelber/mathematica/normalform/NormalForm.scala +++ b/src/main/scala/com/github/tomerghelber/mathematica/normalform/NormalForm.scala @@ -77,7 +77,7 @@ object NormalForm { } private val normalFormFunctionNodeOrdering = { val functionNameOrdering = TerminalNodeOrdering.on[FunctionNode](_.name) - val functionArgumentsOrdering = Ordering.Iterable(ASTNodeOrdering).on[FunctionNode](_.arguments) + val functionArgumentsOrdering = Ordering.Implicits.seqOrdering(ASTNodeOrdering).on[FunctionNode](_.arguments) functionNameOrdering thenComparing functionArgumentsOrdering } } From 81dd593cfad0513345b4f6d07c99c500ed57dbc9 Mon Sep 17 00:00:00 2001 From: Tomer Ghelber Date: Tue, 10 Dec 2019 23:02:40 +0200 Subject: [PATCH 08/14] Added -deprecation to scalacOptions --- build.sbt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.sbt b/build.sbt index d7fb1db..fbc6be2 100644 --- a/build.sbt +++ b/build.sbt @@ -10,6 +10,8 @@ libraryDependencies += "org.scalatest" %% "scalatest" % "3.1. libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.14.2" % Test libraryDependencies += "org.scalatestplus" %% "scalatestplus-scalacheck" % "3.1.0.0-RC2" % Test +scalacOptions ++= Seq("-deprecation") + // POM settings for Sonatype organization := "com.github.tomerghelber" homepage := Some( From e480ed8616abeccd61962fed1c7a4be778734582 Mon Sep 17 00:00:00 2001 From: Tomer Ghelber Date: Tue, 10 Dec 2019 21:57:39 +0000 Subject: [PATCH 09/14] Update scala.yml Added TRAVIS_SCALA_VERSION --- .github/workflows/scala.yml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/scala.yml b/.github/workflows/scala.yml index b71dce1..f407bbc 100644 --- a/.github/workflows/scala.yml +++ b/.github/workflows/scala.yml @@ -4,6 +4,13 @@ on: [push] jobs: UnitTests: + strategy: + matrix: + scala_version: [2.13.1, 2.13.0, 2.12.8] + + env: + TRAVIS_SCALA_VERSION: ${{ matrix.scala_version }} + runs-on: ubuntu-latest steps: @@ -22,12 +29,19 @@ jobs: key: maven-repo - name: Install - run: sbt compile + run: sbt ++$$TRAVIS_SCALA_VERSION compile - name: Run tests - run: sbt test + run: sbt ++$$TRAVIS_SCALA_VERSION test MutationTests: + strategy: + matrix: + scala_version: [2.13.1, 2.13.0, 2.12.8] + + env: + TRAVIS_SCALA_VERSION: ${{ matrix.scala_version }} + runs-on: ubuntu-latest steps: @@ -46,10 +60,10 @@ jobs: key: maven-repo - name: Install - run: sbt compile + run: sbt ++$$TRAVIS_SCALA_VERSION compile - name: Run mutation tests - run: sbt stryker + run: sbt ++$$TRAVIS_SCALA_VERSION stryker FormattingTests: runs-on: ubuntu-latest From f7432d3e3b3d4cde85eabcaa757655da4b60b92f Mon Sep 17 00:00:00 2001 From: Tomer Ghelber Date: Tue, 10 Dec 2019 22:01:38 +0000 Subject: [PATCH 10/14] Update scala.yml --- .github/workflows/scala.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/scala.yml b/.github/workflows/scala.yml index f407bbc..4834b04 100644 --- a/.github/workflows/scala.yml +++ b/.github/workflows/scala.yml @@ -29,10 +29,10 @@ jobs: key: maven-repo - name: Install - run: sbt ++$$TRAVIS_SCALA_VERSION compile + run: sbt ++$TRAVIS_SCALA_VERSION compile - name: Run tests - run: sbt ++$$TRAVIS_SCALA_VERSION test + run: sbt ++$TRAVIS_SCALA_VERSION test MutationTests: strategy: @@ -60,10 +60,10 @@ jobs: key: maven-repo - name: Install - run: sbt ++$$TRAVIS_SCALA_VERSION compile + run: sbt ++$TRAVIS_SCALA_VERSION compile - name: Run mutation tests - run: sbt ++$$TRAVIS_SCALA_VERSION stryker + run: sbt ++$TRAVIS_SCALA_VERSION stryker FormattingTests: runs-on: ubuntu-latest From 5111bdbcc8c8fea179ae2a9fb1681bd45a949fc5 Mon Sep 17 00:00:00 2001 From: Tomer Ghelber Date: Tue, 10 Dec 2019 22:07:56 +0000 Subject: [PATCH 11/14] Update safetyPlugin.json Added 2.13.0 to accepted --- safetyPlugin.json | 1 + 1 file changed, 1 insertion(+) diff --git a/safetyPlugin.json b/safetyPlugin.json index 5d5616b..fe7dbe3 100644 --- a/safetyPlugin.json +++ b/safetyPlugin.json @@ -2,6 +2,7 @@ "sbtVersion": "1.3.4", "scalaVersions": [ "2.13.1", + "2.13.0", "2.12.8" ], "modules": { From 438cf80b1b3d7511ce3fc6e9a6af9b0ad215dac7 Mon Sep 17 00:00:00 2001 From: Tomer Ghelber Date: Tue, 10 Dec 2019 22:12:16 +0000 Subject: [PATCH 12/14] Update scala.yml --- .github/workflows/scala.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/scala.yml b/.github/workflows/scala.yml index 4834b04..a6cd4bf 100644 --- a/.github/workflows/scala.yml +++ b/.github/workflows/scala.yml @@ -7,9 +7,6 @@ jobs: strategy: matrix: scala_version: [2.13.1, 2.13.0, 2.12.8] - - env: - TRAVIS_SCALA_VERSION: ${{ matrix.scala_version }} runs-on: ubuntu-latest @@ -29,18 +26,15 @@ jobs: key: maven-repo - name: Install - run: sbt ++$TRAVIS_SCALA_VERSION compile + run: sbt ++${{ matrix.scala_version }} compile - name: Run tests - run: sbt ++$TRAVIS_SCALA_VERSION test + run: sbt ++${{ matrix.scala_version }} test MutationTests: strategy: matrix: scala_version: [2.13.1, 2.13.0, 2.12.8] - - env: - TRAVIS_SCALA_VERSION: ${{ matrix.scala_version }} runs-on: ubuntu-latest @@ -60,10 +54,10 @@ jobs: key: maven-repo - name: Install - run: sbt ++$TRAVIS_SCALA_VERSION compile + run: sbt ++${{ matrix.scala_version }} compile - name: Run mutation tests - run: sbt ++$TRAVIS_SCALA_VERSION stryker + run: sbt ++${{ matrix.scala_version }} stryker FormattingTests: runs-on: ubuntu-latest From a6f9557b42799bcf4a7d0e85ba3408d633e5ddc3 Mon Sep 17 00:00:00 2001 From: Tomer Ghelber Date: Tue, 10 Dec 2019 22:17:28 +0000 Subject: [PATCH 13/14] Update scala.yml --- .github/workflows/scala.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/scala.yml b/.github/workflows/scala.yml index a6cd4bf..cab7608 100644 --- a/.github/workflows/scala.yml +++ b/.github/workflows/scala.yml @@ -26,10 +26,10 @@ jobs: key: maven-repo - name: Install - run: sbt ++${{ matrix.scala_version }} compile + run: sbt ++ ${{ matrix.scala_version }} compile - name: Run tests - run: sbt ++${{ matrix.scala_version }} test + run: sbt ++ ${{ matrix.scala_version }} test MutationTests: strategy: @@ -54,10 +54,10 @@ jobs: key: maven-repo - name: Install - run: sbt ++${{ matrix.scala_version }} compile + run: sbt ++ ${{ matrix.scala_version }} compile - name: Run mutation tests - run: sbt ++${{ matrix.scala_version }} stryker + run: sbt ++ ${{ matrix.scala_version }} stryker FormattingTests: runs-on: ubuntu-latest From 8aa06f4c920a388354c471b953fb5ee032055724 Mon Sep 17 00:00:00 2001 From: Tomer Ghelber Date: Tue, 10 Dec 2019 22:19:38 +0000 Subject: [PATCH 14/14] Update scala.yml Revert --- .github/workflows/scala.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/scala.yml b/.github/workflows/scala.yml index cab7608..a5d7005 100644 --- a/.github/workflows/scala.yml +++ b/.github/workflows/scala.yml @@ -4,9 +4,6 @@ on: [push] jobs: UnitTests: - strategy: - matrix: - scala_version: [2.13.1, 2.13.0, 2.12.8] runs-on: ubuntu-latest @@ -26,15 +23,12 @@ jobs: key: maven-repo - name: Install - run: sbt ++ ${{ matrix.scala_version }} compile + run: sbt compile - name: Run tests - run: sbt ++ ${{ matrix.scala_version }} test + run: sbt test MutationTests: - strategy: - matrix: - scala_version: [2.13.1, 2.13.0, 2.12.8] runs-on: ubuntu-latest @@ -54,10 +48,10 @@ jobs: key: maven-repo - name: Install - run: sbt ++ ${{ matrix.scala_version }} compile + run: sbt compile - name: Run mutation tests - run: sbt ++ ${{ matrix.scala_version }} stryker + run: sbt stryker FormattingTests: runs-on: ubuntu-latest