From 49df811995df6e8acc20e9d974c25ab77750942b Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Thu, 17 Dec 2020 11:27:35 +0100 Subject: [PATCH 1/2] Fix scalafmt error --- .../shared/src/test/scala/play/api/libs/json/MacroSpec.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/play-json/shared/src/test/scala/play/api/libs/json/MacroSpec.scala b/play-json/shared/src/test/scala/play/api/libs/json/MacroSpec.scala index 8ada78ee9..2bf8fd996 100644 --- a/play-json/shared/src/test/scala/play/api/libs/json/MacroSpec.scala +++ b/play-json/shared/src/test/scala/play/api/libs/json/MacroSpec.scala @@ -149,8 +149,8 @@ class MacroSpec extends AnyWordSpec with Matchers with org.scalatestplus.scalach val expected = Leaf2(1) val expectedJs = Json.obj("_type" -> "play.api.libs.json.MacroSpec.Leaf2", "value" -> 1) - Json.toJson[TreeValue](expected) mustEqual expectedJs - expectedJs.validate[TreeValue] mustEqual JsSuccess(expected) + Json.toJson[TreeValue](expected).mustEqual(expectedJs) + expectedJs.validate[TreeValue].mustEqual(JsSuccess(expected)) } } From 56695454a6073a8404d2d17ac9fb18caf076e74b Mon Sep 17 00:00:00 2001 From: Dale Wijnand Date: Mon, 4 Jan 2021 09:11:21 +0000 Subject: [PATCH 2/2] Remove a corrupt scalactic_2.13-3.1.2.jar. Hitting this in CI in the PR to fix Scalafmt: [error] Caused by: java.io.IOException: Error accessing /home/travis/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scalactic/scalactic_2.13/3.1.2/scalactic_2.13-3.1.2.jar [error] at scala.reflect.io.FileZipArchive.scala$reflect$io$FileZipArchive$$openZipFile(ZipArchive.scala:155) [error] at scala.reflect.io.FileZipArchive.root$lzycompute(ZipArchive.scala:193) [error] at scala.reflect.io.FileZipArchive.root(ZipArchive.scala:190) [error] at scala.reflect.io.FileZipArchive.allDirs$lzycompute(ZipArchive.scala:226) [error] at scala.reflect.io.FileZipArchive.allDirs(ZipArchive.scala:226) [error] at scala.tools.nsc.classpath.ZipArchiveFileLookup.findDirEntry(ZipArchiveFileLookup.scala:79) [error] at scala.tools.nsc.classpath.ZipArchiveFileLookup.list(ZipArchiveFileLookup.scala:66) [error] at scala.tools.nsc.classpath.ZipArchiveFileLookup.list$(ZipArchiveFileLookup.scala:65) [error] at scala.tools.nsc.classpath.ZipAndJarClassPathFactory$ZipArchiveClassPath.list(ZipAndJarFileLookupFactory.scala:57) [error] at scala.tools.nsc.classpath.AggregateClassPath.$anonfun$list$3(AggregateClassPath.scala:92) [error] at scala.collection.immutable.Vector.foreach(Vector.scala:1794) [error] at scala.tools.nsc.classpath.AggregateClassPath.list(AggregateClassPath.scala:88) [error] at scala.tools.nsc.util.ClassPath.list(ClassPath.scala:36) [error] at scala.tools.nsc.util.ClassPath.list$(ClassPath.scala:36) [error] at scala.tools.nsc.classpath.AggregateClassPath.list(AggregateClassPath.scala:31) [error] at scala.tools.nsc.symtab.SymbolLoaders$PackageLoader.doComplete(SymbolLoaders.scala:286) [error] at scala.tools.nsc.symtab.SymbolLoaders$SymbolLoader.$anonfun$complete$2(SymbolLoaders.scala:238) [error] at scala.tools.nsc.symtab.SymbolLoaders$SymbolLoader.complete(SymbolLoaders.scala:236) [error] at scala.reflect.internal.Symbols$Symbol.completeInfo(Symbols.scala:1541) [error] at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1513) [error] at scala.reflect.internal.Mirrors$RootsBase.init(Mirrors.scala:262) [error] at scala.tools.nsc.Global.rootMirror$lzycompute(Global.scala:74) [error] at scala.tools.nsc.Global.rootMirror(Global.scala:72) [error] at scala.tools.nsc.Global.rootMirror(Global.scala:44) [error] at scala.reflect.internal.Definitions$DefinitionsClass.ObjectClass$lzycompute(Definitions.scala:288) [error] at scala.reflect.internal.Definitions$DefinitionsClass.ObjectClass(Definitions.scala:288) [error] at scala.reflect.internal.Definitions$DefinitionsClass.init(Definitions.scala:1585) [error] at scala.tools.nsc.Global$Run.(Global.scala:1204) [error] at xsbt.ZincCompiler$ZincRun.(CallbackGlobal.scala:80) --- build.sbt | 2 +- scripts/test-code.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 50fc4b290..4dc6ef247 100644 --- a/build.sbt +++ b/build.sbt @@ -138,7 +138,7 @@ lazy val `play-json` = crossProject(JVMPlatform, JSPlatform) .settings( commonSettings ++ playJsonMimaSettings ++ Seq( libraryDependencies ++= jsonDependencies(scalaVersion.value) ++ Seq( - "org.scalatest" %%% "scalatest" % "3.1.2" % Test, + "org.scalatest" %%% "scalatest" % "3.1.2" % Test, // 3.1.2 is the last version that uses Scala.js 1.0.x "org.scalatestplus" %%% "scalacheck-1-14" % "3.1.2.0" % Test, "org.scalacheck" %%% "scalacheck" % "1.14.3" % Test, "com.chuusai" %% "shapeless" % "2.3.3" % Test, diff --git a/scripts/test-code.sh b/scripts/test-code.sh index 09cb8b7d7..23ae63869 100755 --- a/scripts/test-code.sh +++ b/scripts/test-code.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +rm /home/travis/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scalactic/scalactic_2.13/3.1.2/scalactic_2.13-3.1.2.jar || true + echo SCALA_VERSION=$SCALA_VERSION sbt -DscalaJSStage=full ++$SCALA_VERSION test publishLocal || exit 1 sbt ++$SCALA_VERSION docs/test || exit 2