From 3f7baf2b0dd923bc29b74889ea3aeb82278dcac4 Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Mon, 25 Nov 2024 12:59:28 +0000 Subject: [PATCH 01/39] Upgrade version and fix complication --- build.sbt | 34 +++++++++---------- .../main/scala/SlickMigrationManager.scala | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/build.sbt b/build.sbt index 00ea644..88f58ab 100644 --- a/build.sbt +++ b/build.sbt @@ -1,7 +1,7 @@ val repoKind = SettingKey[String]("repo-kind", "Maven repository kind (\"snapshots\" or \"releases\")") -lazy val slickVersion = "3.3.3" +lazy val slickVersion = "3.5.2" lazy val scala212 = "2.12.11" lazy val scala213 = "2.13.8" @@ -16,7 +16,7 @@ lazy val coreDependencies = libraryDependencies ++= List( lazy val slickDependencies = List( "com.typesafe.slick" %% "slick" % slickVersion, "com.typesafe.slick" %% "slick-codegen" % slickVersion, - "io.github.nafg" %% "slick-migration-api" % "0.8.0", + "io.github.nafg" %% "slick-migration-api" % "0.10.0", "org.scala-lang.modules" %% "scala-collection-compat" % "2.8.1" ) @@ -42,28 +42,28 @@ lazy val commonSettings = Seq( scalaVersion := scala213, scalacOptions += "-deprecation", scalacOptions += "-feature", - resolvers += Resolver.jcenterRepo, + resolvers ++= Seq(Resolver.jcenterRepo, "asana-oss-cache" at "https://asana-oss-cache.s3.us-east-1.amazonaws.com/maven/release/"), publishMavenStyle := true, publishArtifact in Test := false, repoKind := { if (version.value.trim.endsWith("SNAPSHOT")) "snapshots" - else "releases" }, + else "releases" }, publishTo := { repoKind.value match { case "snapshots" => Some("snapshots" at - "https://oss.sonatype.org/content/repositories/snapshots") + "https://oss.sonatype.org/content/repositories/snapshots") case "releases" => Some("releases" at - "https://oss.sonatype.org/service/local/staging/deploy/maven2") + "https://oss.sonatype.org/service/local/staging/deploy/maven2") }}, credentials += Credentials(Path.userHome / ".ivy2" / ".credentials"), pomExtra := ( git@github.com:lastland/scala-forklift.git scm:git:git@github.com:lastland/scala-forklift.git - + - - lastland - Yao Li - + + lastland + Yao Li + )) // Derby is running is secured mode since version 10.12.1.1, so security manager must be disabled for tests @@ -80,16 +80,16 @@ lazy val root = Project( lazy val coreProject = Project( "scala-forklift-core", file("core")).settings( commonSettings:_*).settings {Seq( - crossScalaVersions := supportedScalaVersions, - coreDependencies - )} + crossScalaVersions := supportedScalaVersions, + coreDependencies +)} lazy val slickMigrationProject = Project( "scala-forklift-slick", file("migrations/slick")).dependsOn( coreProject).settings(commonSettings:_*).settings { Seq( - crossScalaVersions := supportedScalaVersions, - libraryDependencies ++= slickDependenciesWithTests - )} + crossScalaVersions := supportedScalaVersions, + libraryDependencies ++= slickDependenciesWithTests +)} lazy val plainMigrationProject = Project( "scala-forklift-plain", file("migrations/plain")).dependsOn( diff --git a/migrations/slick/src/main/scala/SlickMigrationManager.scala b/migrations/slick/src/main/scala/SlickMigrationManager.scala index 8f6c823..acfe1a1 100644 --- a/migrations/slick/src/main/scala/SlickMigrationManager.scala +++ b/migrations/slick/src/main/scala/SlickMigrationManager.scala @@ -5,7 +5,7 @@ import scala.concurrent.duration._ import scala.concurrent.Future import scala.concurrent.Await import scala.concurrent.ExecutionContext.Implicits.global -import slick.backend.DatabaseConfig +import slick.basic.DatabaseConfig import slick.jdbc.JdbcProfile import slick.jdbc.meta.MTable import com.liyaos.forklift.core.Migration From 6f53d445231874dd37b93bbe9b268e54170435e4 Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Mon, 25 Nov 2024 13:00:55 +0000 Subject: [PATCH 02/39] Fix warnings --- migrations/slick/src/main/scala/Commands.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/migrations/slick/src/main/scala/Commands.scala b/migrations/slick/src/main/scala/Commands.scala index 3de4d05..f227a3c 100644 --- a/migrations/slick/src/main/scala/Commands.scala +++ b/migrations/slick/src/main/scala/Commands.scala @@ -118,16 +118,16 @@ trait SlickMigrationCommands notYetAppliedMigrations.map { migration => migration match { case m: SqlMigrationInterface[_] => - println(migration.id + " SqlMigration:") + println(s"${migration.id} SqlMigration:") println("\t" + m.queries.map(_.getDumpInfo.mainInfo).mkString("\n\t")) case m: SqlResourceMigrationInterface[_] => - println(migration.id + " SqlResourceMigration:") + println(s"${migration.id} SqlResourceMigration:") println(m.sqlQueries) case m: DBIOMigration[_] => - println(migration.id + " DBIOMigration:") + println(s"${migration.id} DBIOMigration:") println("\t" + m.code) case m: APIMigration[_] => - println(migration.id + " APIMigration:") + println(s"${migration.id} APIMigration:") println("\t" + m.migration.sql) } println("") From f582aa3e2244a790b5a54e7e41275c6f510cdeea Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Mon, 25 Nov 2024 16:43:51 +0000 Subject: [PATCH 03/39] Update tests for scala 2.13 --- build.sbt | 4 ++-- migrations/slick/src/main/scala/Codegen.scala | 2 +- migrations/slick/src/test/scala/UnitTests/ConfigFile.scala | 2 +- .../src/test/scala/UnitTests/SlickMigrationManagerTests.scala | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build.sbt b/build.sbt index 88f58ab..6d6d011 100644 --- a/build.sbt +++ b/build.sbt @@ -1,7 +1,7 @@ val repoKind = SettingKey[String]("repo-kind", "Maven repository kind (\"snapshots\" or \"releases\")") -lazy val slickVersion = "3.5.2" +lazy val slickVersion = "3.4.1" lazy val scala212 = "2.12.11" lazy val scala213 = "2.13.8" @@ -21,7 +21,7 @@ lazy val slickDependencies = List( ) lazy val slickDependenciesWithTests = slickDependencies ++ List( - "org.scalatest" %% "scalatest" % "3.2.12", + "org.scalatest" %% "scalatest" % "3.0.9", "com.lihaoyi" %% "ammonite-ops" % "2.4.1", "commons-io" % "commons-io" % "2.6", "com.typesafe.slick" %% "slick-hikaricp" % slickVersion, diff --git a/migrations/slick/src/main/scala/Codegen.scala b/migrations/slick/src/main/scala/Codegen.scala index de1df9d..415372d 100644 --- a/migrations/slick/src/main/scala/Codegen.scala +++ b/migrations/slick/src/main/scala/Codegen.scala @@ -95,7 +95,7 @@ object Glob{ case Some(lists) => val filtered = lists.filter{ c => filter(c) }.toList val childDirs = lists.filter{ c => c.isDirectory && !c.getName.startsWith(".") } - return ( (acc ::: filtered) /: childDirs){ (a, dir) => recursive(dir, a)} + return childDirs.foldLeft(acc ::: filtered){ (a, dir) => recursive(dir, a)} } dirs.flatMap{ d => recursive(new File(d), Nil)} } diff --git a/migrations/slick/src/test/scala/UnitTests/ConfigFile.scala b/migrations/slick/src/test/scala/UnitTests/ConfigFile.scala index da410d1..8b83828 100644 --- a/migrations/slick/src/test/scala/UnitTests/ConfigFile.scala +++ b/migrations/slick/src/test/scala/UnitTests/ConfigFile.scala @@ -79,7 +79,7 @@ trait SQLiteConfigFile extends ConfigFile with Tables { trait MySQLConfigFile extends ConfigFile with Tables { val user = "root" val driver = "slick.jdbc.MySQLProfile$" - val dbDriver = "com.mysql.jdbc.Driver" + val dbDriver = "com.mysql.cj.jdbc.Driver" val dbUrl = s"jdbc:mysql://localhost/circle_test?useSSL=false" val profile = slick.jdbc.MySQLProfile diff --git a/migrations/slick/src/test/scala/UnitTests/SlickMigrationManagerTests.scala b/migrations/slick/src/test/scala/UnitTests/SlickMigrationManagerTests.scala index 46795ba..0074bc5 100644 --- a/migrations/slick/src/test/scala/UnitTests/SlickMigrationManagerTests.scala +++ b/migrations/slick/src/test/scala/UnitTests/SlickMigrationManagerTests.scala @@ -9,7 +9,7 @@ import scala.concurrent.Await import scala.concurrent.ExecutionContext.Implicits.global import scala.language.postfixOps import slick.jdbc.meta.MTable -import slick.driver.JdbcProfile +import slick.jdbc.JdbcProfile trait MigrationTests extends FlatSpec with PrivateMethodTester { this: ConfigFile with Tables => From 22da3be8aa38cf8c224dfaa2d095ff54b4da4c60 Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Mon, 25 Nov 2024 16:52:12 +0000 Subject: [PATCH 04/39] Upgrade sbt version in CI pipeline --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 06cf8de..61443ae 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,7 +14,7 @@ jobs: POSTGRES_USER: circleci POSTGRES_DB: circle_test environment: - SBT_VERSION: 1.3.7 + SBT_VERSION: 1.10.3 steps: - run: echo 'export ARTIFACT_BUILD=$CIRCLE_PROJECT_REPONAME-$CIRCLE_BUILD_NUM.zip' >> $BASH_ENV - run: From eab012742793c9a12543b0c5ced682a074961aef Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Tue, 26 Nov 2024 11:01:47 +0000 Subject: [PATCH 05/39] Update download of sbt version --- .circleci/config.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 61443ae..29d07f2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,9 +21,11 @@ jobs: name: Get sbt binary command: | apt update && apt install -y curl - curl -L -o sbt-$SBT_VERSION.deb https://dl.bintray.com/sbt/debian/sbt-$SBT_VERSION.deb - sudo dpkg -i sbt-$SBT_VERSION.deb - rm sbt-$SBT_VERSION.deb + curl -L -o sbt-$SBT_VERSION.tgz https://github.com/sbt/sbt/releases/download/v$SBT_VERSION/sbt-$SBT_VERSION.tgz + tar -xvf sbt-$SBT_VERSION.tgz + cd sbt/bin + sudo chmod +x sbt + ./sbt sudo apt-get update sudo apt-get install -y sbt python-pip git pip install awscli @@ -33,7 +35,7 @@ jobs: # Read about caching dependencies: https://circleci.com/docs/2.0/caching/ key: sbt-cache - run: - name: Crossompile scala-forklift + name: Crosscompile scala-forklift command: sbt +compile - run: name: Compile tests From 956959d055d90f81bdf907815ac0b403a849099b Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Tue, 26 Nov 2024 11:06:50 +0000 Subject: [PATCH 06/39] Update version in build properties --- example/project/build.properties | 2 +- project/build.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/example/project/build.properties b/example/project/build.properties index a82bb05..bc73906 100644 --- a/example/project/build.properties +++ b/example/project/build.properties @@ -1 +1 @@ -sbt.version=1.3.7 +sbt.version=1.10.3 diff --git a/project/build.properties b/project/build.properties index a82bb05..bc73906 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.3.7 +sbt.version=1.10.3 From a97b7b6a3b7893c708a2b08bd391182675f47717 Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Tue, 26 Nov 2024 11:24:46 +0000 Subject: [PATCH 07/39] Remove the installation of sbt as it is already installed --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 29d07f2..294c20a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -25,9 +25,9 @@ jobs: tar -xvf sbt-$SBT_VERSION.tgz cd sbt/bin sudo chmod +x sbt - ./sbt + export PATH=$PATH:$(pwd) sudo apt-get update - sudo apt-get install -y sbt python-pip git + sudo apt-get install -y python-pip git pip install awscli sudo apt-get clean && sudo apt-get autoclean - checkout From 8dec704d82a8366578c46f9da76f1d316e96cc33 Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Tue, 26 Nov 2024 11:27:44 +0000 Subject: [PATCH 08/39] Use python3 for pip installation --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 294c20a..e1c9c4e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -27,7 +27,7 @@ jobs: sudo chmod +x sbt export PATH=$PATH:$(pwd) sudo apt-get update - sudo apt-get install -y python-pip git + sudo apt-get install -y python3-pip git pip install awscli sudo apt-get clean && sudo apt-get autoclean - checkout From de8902bc4870d2423e7fa05dbbec9c5593bc19ff Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Tue, 26 Nov 2024 11:32:45 +0000 Subject: [PATCH 09/39] Explore what is inside the scala-forklift directory --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index e1c9c4e..3731134 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -30,6 +30,7 @@ jobs: sudo apt-get install -y python3-pip git pip install awscli sudo apt-get clean && sudo apt-get autoclean + - run: ls ~/scala-forklift - checkout - restore_cache: # Read about caching dependencies: https://circleci.com/docs/2.0/caching/ From c832482ed9c797b61d78bec79b23d2de79bab3ef Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Tue, 26 Nov 2024 11:36:31 +0000 Subject: [PATCH 10/39] Install sbt in home rather than work-directory --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3731134..001d866 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,6 +21,7 @@ jobs: name: Get sbt binary command: | apt update && apt install -y curl + cd .. curl -L -o sbt-$SBT_VERSION.tgz https://github.com/sbt/sbt/releases/download/v$SBT_VERSION/sbt-$SBT_VERSION.tgz tar -xvf sbt-$SBT_VERSION.tgz cd sbt/bin @@ -30,6 +31,7 @@ jobs: sudo apt-get install -y python3-pip git pip install awscli sudo apt-get clean && sudo apt-get autoclean + cd scala-forklift/ - run: ls ~/scala-forklift - checkout - restore_cache: From f416cf73f4e15e0f60978f7bba32dfd9ca9371f7 Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Tue, 26 Nov 2024 11:38:38 +0000 Subject: [PATCH 11/39] Give path with relative full path --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 001d866..35163df 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -31,7 +31,7 @@ jobs: sudo apt-get install -y python3-pip git pip install awscli sudo apt-get clean && sudo apt-get autoclean - cd scala-forklift/ + cd ~/scala-forklift - run: ls ~/scala-forklift - checkout - restore_cache: From eb70ebe64000c933cdf673276ade0463e940506d Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Tue, 26 Nov 2024 12:14:04 +0000 Subject: [PATCH 12/39] Fix deprecated in syntax --- build.sbt | 2 +- migrations/slick/build.sbt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index 6d6d011..674f61a 100644 --- a/build.sbt +++ b/build.sbt @@ -44,7 +44,7 @@ lazy val commonSettings = Seq( scalacOptions += "-feature", resolvers ++= Seq(Resolver.jcenterRepo, "asana-oss-cache" at "https://asana-oss-cache.s3.us-east-1.amazonaws.com/maven/release/"), publishMavenStyle := true, - publishArtifact in Test := false, + Test / publishArtifact := false, repoKind := { if (version.value.trim.endsWith("SNAPSHOT")) "snapshots" else "releases" }, publishTo := { repoKind.value match { diff --git a/migrations/slick/build.sbt b/migrations/slick/build.sbt index 3b9bf54..94cff74 100644 --- a/migrations/slick/build.sbt +++ b/migrations/slick/build.sbt @@ -1,3 +1,3 @@ name := "scala-forklift-slick" -parallelExecution in Test := false +Test / parallelExecution := false From b469e5c3231fd72898a92140f39ebfd9e61f9452 Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Tue, 26 Nov 2024 12:23:57 +0000 Subject: [PATCH 13/39] Upgrade slick to 3.5.x --- build.sbt | 2 +- version.sbt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index 674f61a..008bbcf 100644 --- a/build.sbt +++ b/build.sbt @@ -1,7 +1,7 @@ val repoKind = SettingKey[String]("repo-kind", "Maven repository kind (\"snapshots\" or \"releases\")") -lazy val slickVersion = "3.4.1" +lazy val slickVersion = "3.5.2" lazy val scala212 = "2.12.11" lazy val scala213 = "2.13.8" diff --git a/version.sbt b/version.sbt index 8ed576b..eb12e8f 100644 --- a/version.sbt +++ b/version.sbt @@ -1 +1 @@ -version in ThisBuild := "0.3.2" +ThisBuild / version := "0.3.2" From adc0cf15da6cfa0a29d70b88012c1fd2a1667876 Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Tue, 26 Nov 2024 12:27:09 +0000 Subject: [PATCH 14/39] Upgrade scala 2.13.x version --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 008bbcf..a3b3560 100644 --- a/build.sbt +++ b/build.sbt @@ -4,7 +4,7 @@ val repoKind = SettingKey[String]("repo-kind", lazy val slickVersion = "3.5.2" lazy val scala212 = "2.12.11" -lazy val scala213 = "2.13.8" +lazy val scala213 = "2.13.14" lazy val supportedScalaVersions = List(scala212, scala213) lazy val coreDependencies = libraryDependencies ++= List( From 3a421cd562f9af67ac3cd721ea2f16e834e504d7 Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Tue, 26 Nov 2024 12:35:06 +0000 Subject: [PATCH 15/39] Upgrade java version used by circle ci --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 35163df..749e141 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ jobs: build: working_directory: ~/scala-forklift docker: - - image: circleci/openjdk:8 + - image: circleci/openjdk:11 - image: circleci/mysql:5.7.29 environment: MYSQL_DATABASE: circle_test From fc50b0a81dbf3a9563608d78a862dc3d7fca4095 Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Tue, 26 Nov 2024 12:42:10 +0000 Subject: [PATCH 16/39] Separate python dependencies in circle config --- .circleci/config.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 749e141..5cf221c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,19 +18,22 @@ jobs: steps: - run: echo 'export ARTIFACT_BUILD=$CIRCLE_PROJECT_REPONAME-$CIRCLE_BUILD_NUM.zip' >> $BASH_ENV - run: - name: Get sbt binary + name: Install python dependencies command: | apt update && apt install -y curl + sudo apt-get update + sudo apt-get install -y python3-pip git + pip install awscli + sudo apt-get clean && sudo apt-get autoclean + - run: + name: Get sbt binary + command: | cd .. curl -L -o sbt-$SBT_VERSION.tgz https://github.com/sbt/sbt/releases/download/v$SBT_VERSION/sbt-$SBT_VERSION.tgz tar -xvf sbt-$SBT_VERSION.tgz cd sbt/bin sudo chmod +x sbt export PATH=$PATH:$(pwd) - sudo apt-get update - sudo apt-get install -y python3-pip git - pip install awscli - sudo apt-get clean && sudo apt-get autoclean cd ~/scala-forklift - run: ls ~/scala-forklift - checkout From 35ea7f609070d9ba8a1efb848d52a1583d64af5c Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Tue, 26 Nov 2024 12:46:14 +0000 Subject: [PATCH 17/39] Update pip call to use pip3 --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5cf221c..36a9040 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,7 +23,7 @@ jobs: apt update && apt install -y curl sudo apt-get update sudo apt-get install -y python3-pip git - pip install awscli + pip3 install awscli sudo apt-get clean && sudo apt-get autoclean - run: name: Get sbt binary From b0c93ba44e17a6857e059a04f72ef9448a633a4d Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Tue, 26 Nov 2024 13:24:25 +0000 Subject: [PATCH 18/39] Upgrade derby version --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index a3b3560..142fef1 100644 --- a/build.sbt +++ b/build.sbt @@ -30,7 +30,7 @@ lazy val slickDependenciesWithTests = slickDependencies ++ List( "mysql" % "mysql-connector-java" % "8.0.30", "org.postgresql" % "postgresql" % "42.5.0", "org.hsqldb" % "hsqldb" % "2.7.0", - "org.apache.derby" % "derby" % "10.15.2.0", + "org.apache.derby" % "derby" % "10.17.1.0", "ch.qos.logback" % "logback-classic" % "1.2.11" ).map(_ % "test") From e8bc3f9d7a78d390d35482193883ed675865dce5 Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Tue, 26 Nov 2024 13:35:24 +0000 Subject: [PATCH 19/39] Use old mySQL table configuration --- .circleci/config.yml | 3 +-- migrations/slick/src/test/scala/UnitTests/ConfigFile.scala | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 36a9040..9f1ba94 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -26,7 +26,7 @@ jobs: pip3 install awscli sudo apt-get clean && sudo apt-get autoclean - run: - name: Get sbt binary + name: Setup sbt command: | cd .. curl -L -o sbt-$SBT_VERSION.tgz https://github.com/sbt/sbt/releases/download/v$SBT_VERSION/sbt-$SBT_VERSION.tgz @@ -35,7 +35,6 @@ jobs: sudo chmod +x sbt export PATH=$PATH:$(pwd) cd ~/scala-forklift - - run: ls ~/scala-forklift - checkout - restore_cache: # Read about caching dependencies: https://circleci.com/docs/2.0/caching/ diff --git a/migrations/slick/src/test/scala/UnitTests/ConfigFile.scala b/migrations/slick/src/test/scala/UnitTests/ConfigFile.scala index 8b83828..da410d1 100644 --- a/migrations/slick/src/test/scala/UnitTests/ConfigFile.scala +++ b/migrations/slick/src/test/scala/UnitTests/ConfigFile.scala @@ -79,7 +79,7 @@ trait SQLiteConfigFile extends ConfigFile with Tables { trait MySQLConfigFile extends ConfigFile with Tables { val user = "root" val driver = "slick.jdbc.MySQLProfile$" - val dbDriver = "com.mysql.cj.jdbc.Driver" + val dbDriver = "com.mysql.jdbc.Driver" val dbUrl = s"jdbc:mysql://localhost/circle_test?useSSL=false" val profile = slick.jdbc.MySQLProfile From 6b98453e39d2894f317664c9749da74ab33dcf7b Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Tue, 26 Nov 2024 13:48:14 +0000 Subject: [PATCH 20/39] Upgrade mysql version --- .circleci/config.yml | 6 +++--- .../src/test/scala/SubProjectsTests/CommandsTests.scala | 4 ++-- migrations/slick/src/test/scala/UnitTests/ConfigFile.scala | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9f1ba94..464e97d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,13 +3,13 @@ jobs: build: working_directory: ~/scala-forklift docker: - - image: circleci/openjdk:11 - - image: circleci/mysql:5.7.29 + - image: cimg/openjdk:11 + - image: cimg/mysql:8.0 environment: MYSQL_DATABASE: circle_test MYSQL_USER: root MYSQL_ALLOW_EMPTY_PASSWORD: true - - image: circleci/postgres:9.6.9 + - image: cimg/postgres:9.6.9 environment: POSTGRES_USER: circleci POSTGRES_DB: circle_test diff --git a/migrations/slick/src/test/scala/SubProjectsTests/CommandsTests.scala b/migrations/slick/src/test/scala/SubProjectsTests/CommandsTests.scala index 271487d..4bc47df 100644 --- a/migrations/slick/src/test/scala/SubProjectsTests/CommandsTests.scala +++ b/migrations/slick/src/test/scala/SubProjectsTests/CommandsTests.scala @@ -14,8 +14,8 @@ class CommandsTest extends FlatSpec implicit def pathToString(path: Path) = path.toString - val unhandled = testDir/'migrations/'src_migrations/'main/'scala - val handled = testDir/'migrations/'src/'main/'scala/'migrations + val unhandled = testDir/Symbol("migrations/src_migrations/main/scala") + val handled = testDir/Symbol("migrations/src/main/scala/migrations") before { dir.setup() diff --git a/migrations/slick/src/test/scala/UnitTests/ConfigFile.scala b/migrations/slick/src/test/scala/UnitTests/ConfigFile.scala index da410d1..8b83828 100644 --- a/migrations/slick/src/test/scala/UnitTests/ConfigFile.scala +++ b/migrations/slick/src/test/scala/UnitTests/ConfigFile.scala @@ -79,7 +79,7 @@ trait SQLiteConfigFile extends ConfigFile with Tables { trait MySQLConfigFile extends ConfigFile with Tables { val user = "root" val driver = "slick.jdbc.MySQLProfile$" - val dbDriver = "com.mysql.jdbc.Driver" + val dbDriver = "com.mysql.cj.jdbc.Driver" val dbUrl = s"jdbc:mysql://localhost/circle_test?useSSL=false" val profile = slick.jdbc.MySQLProfile From 462bcefb7c0514eb2cc8488470e49235cf348251 Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Tue, 26 Nov 2024 13:55:39 +0000 Subject: [PATCH 21/39] Fix java upgrade to 11 --- .circleci/config.yml | 2 +- .../slick/src/test/scala/SubProjectsTests/CommandsTests.scala | 4 ++-- migrations/slick/src/test/scala/UnitTests/ConfigFile.scala | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 464e97d..a408420 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ jobs: build: working_directory: ~/scala-forklift docker: - - image: cimg/openjdk:11 + - image: cimg/openjdk:11.0.25 - image: cimg/mysql:8.0 environment: MYSQL_DATABASE: circle_test diff --git a/migrations/slick/src/test/scala/SubProjectsTests/CommandsTests.scala b/migrations/slick/src/test/scala/SubProjectsTests/CommandsTests.scala index 4bc47df..0df35ab 100644 --- a/migrations/slick/src/test/scala/SubProjectsTests/CommandsTests.scala +++ b/migrations/slick/src/test/scala/SubProjectsTests/CommandsTests.scala @@ -12,7 +12,7 @@ class CommandsTest extends FlatSpec val dir = TestDir.createTestDir(wd) val testDir = dir.testPath - implicit def pathToString(path: Path) = path.toString + implicit def pathToString(path: Path): String = path.toString val unhandled = testDir/Symbol("migrations/src_migrations/main/scala") val handled = testDir/Symbol("migrations/src/main/scala/migrations") @@ -63,7 +63,7 @@ class CommandsTest extends FlatSpec %sbt("mg init", "mg update", "mg apply") %sbt("mg codegen", "mg update", "mg apply") val file = new File( - testDir/'generated_code/'src/'main/'scala/'datamodel/'v1/'schema/"schema.scala") + testDir/Symbol("generated_code/src/main/scala/datamodel/v1/schema/schema.scala") assert(file.exists) } diff --git a/migrations/slick/src/test/scala/UnitTests/ConfigFile.scala b/migrations/slick/src/test/scala/UnitTests/ConfigFile.scala index 8b83828..cf19d20 100644 --- a/migrations/slick/src/test/scala/UnitTests/ConfigFile.scala +++ b/migrations/slick/src/test/scala/UnitTests/ConfigFile.scala @@ -33,7 +33,7 @@ trait ConfigFile { protected def migrationsMap = { val tmpDir = tmp.dir() - val handled = tmpDir/'main/'scala + val handled = tmpDir/Symbol("main/scala") mkdir! handled val migrationsMap = new HashMap[String, Object] migrationsMap.put("slick", slickMap) From 8e4878e76eac8fc990f64f1babe7adf703f7bff4 Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Tue, 26 Nov 2024 13:59:06 +0000 Subject: [PATCH 22/39] Upgrade postgres version --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a408420..142640e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,7 +9,7 @@ jobs: MYSQL_DATABASE: circle_test MYSQL_USER: root MYSQL_ALLOW_EMPTY_PASSWORD: true - - image: cimg/postgres:9.6.9 + - image: cimg/postgres:9.6.23 environment: POSTGRES_USER: circleci POSTGRES_DB: circle_test From 0cc9b22de83decf6344d07aab28290b980062114 Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Tue, 26 Nov 2024 14:04:21 +0000 Subject: [PATCH 23/39] Fix build and remove deprecated MYSQL user --- .circleci/config.yml | 1 - .../slick/src/test/scala/SubProjectsTests/CommandsTests.scala | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 142640e..5a195bb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,7 +7,6 @@ jobs: - image: cimg/mysql:8.0 environment: MYSQL_DATABASE: circle_test - MYSQL_USER: root MYSQL_ALLOW_EMPTY_PASSWORD: true - image: cimg/postgres:9.6.23 environment: diff --git a/migrations/slick/src/test/scala/SubProjectsTests/CommandsTests.scala b/migrations/slick/src/test/scala/SubProjectsTests/CommandsTests.scala index 0df35ab..4dee25e 100644 --- a/migrations/slick/src/test/scala/SubProjectsTests/CommandsTests.scala +++ b/migrations/slick/src/test/scala/SubProjectsTests/CommandsTests.scala @@ -63,7 +63,7 @@ class CommandsTest extends FlatSpec %sbt("mg init", "mg update", "mg apply") %sbt("mg codegen", "mg update", "mg apply") val file = new File( - testDir/Symbol("generated_code/src/main/scala/datamodel/v1/schema/schema.scala") + testDir/Symbol("generated_code/src/main/scala/datamodel/v1/schema/schema.scala")) assert(file.exists) } From 8ddf89a4701e1353065c1a0774fa44ada734c921 Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Tue, 26 Nov 2024 14:11:41 +0000 Subject: [PATCH 24/39] Fix Symbol usages --- .../src/test/scala/SubProjectsTests/CommandsTests.scala | 6 +++--- migrations/slick/src/test/scala/UnitTests/ConfigFile.scala | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/migrations/slick/src/test/scala/SubProjectsTests/CommandsTests.scala b/migrations/slick/src/test/scala/SubProjectsTests/CommandsTests.scala index 4dee25e..66d88ff 100644 --- a/migrations/slick/src/test/scala/SubProjectsTests/CommandsTests.scala +++ b/migrations/slick/src/test/scala/SubProjectsTests/CommandsTests.scala @@ -14,8 +14,8 @@ class CommandsTest extends FlatSpec implicit def pathToString(path: Path): String = path.toString - val unhandled = testDir/Symbol("migrations/src_migrations/main/scala") - val handled = testDir/Symbol("migrations/src/main/scala/migrations") + val unhandled = testDir/Symbol("migrations")/Symbol("src_migrations")/Symbol("main")/Symbol("scala") + val handled = testDir/Symbol("migrations")/Symbol("src")/Symbol("main")/Symbol("scala")/Symbol("migrations") before { dir.setup() @@ -63,7 +63,7 @@ class CommandsTest extends FlatSpec %sbt("mg init", "mg update", "mg apply") %sbt("mg codegen", "mg update", "mg apply") val file = new File( - testDir/Symbol("generated_code/src/main/scala/datamodel/v1/schema/schema.scala")) + testDir/Symbol("generated_code")/Symbol("src")/Symbol("main")/Symbol("scala")/Symbol("datamodel")/Symbol("v1")/Symbol("schema")/Symbol("schema.scala")) assert(file.exists) } diff --git a/migrations/slick/src/test/scala/UnitTests/ConfigFile.scala b/migrations/slick/src/test/scala/UnitTests/ConfigFile.scala index cf19d20..072d201 100644 --- a/migrations/slick/src/test/scala/UnitTests/ConfigFile.scala +++ b/migrations/slick/src/test/scala/UnitTests/ConfigFile.scala @@ -33,7 +33,7 @@ trait ConfigFile { protected def migrationsMap = { val tmpDir = tmp.dir() - val handled = tmpDir/Symbol("main/scala") + val handled = tmpDir/Symbol("main")/Symbol("scala") mkdir! handled val migrationsMap = new HashMap[String, Object] migrationsMap.put("slick", slickMap) From bade212962ab65354c198cc65f19861a031b3bce Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Wed, 27 Nov 2024 13:55:28 +0000 Subject: [PATCH 25/39] Explicitly importing HikariCP --- build.sbt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index 142fef1..73bcc97 100644 --- a/build.sbt +++ b/build.sbt @@ -9,7 +9,7 @@ lazy val supportedScalaVersions = List(scala212, scala213) lazy val coreDependencies = libraryDependencies ++= List( "org.scala-lang" % "scala-compiler" % scalaVersion.value, - "com.typesafe" % "config" % "1.4.2", + "com.typesafe" % "config" % "1.4.3", "org.eclipse.jgit" % "org.eclipse.jgit" % "4.0.1.201506240215-r" ) @@ -26,7 +26,8 @@ lazy val slickDependenciesWithTests = slickDependencies ++ List( "commons-io" % "commons-io" % "2.6", "com.typesafe.slick" %% "slick-hikaricp" % slickVersion, "com.h2database" % "h2" % "2.1.214", - "org.xerial" % "sqlite-jdbc" % "3.8.11.2",// 3.30.1 crashes SQLiteCommandTests + "com.zaxxer" % "HikariCP" % "6.2.1", + "org.xerial" % "sqlite-jdbc" % "3.47.1.0",// 3.30.1 crashes SQLiteCommandTests "mysql" % "mysql-connector-java" % "8.0.30", "org.postgresql" % "postgresql" % "42.5.0", "org.hsqldb" % "hsqldb" % "2.7.0", From 57b817530457ee485e0a0cf56cbd7726f49c46f3 Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Wed, 27 Nov 2024 14:38:52 +0000 Subject: [PATCH 26/39] Fix the example build --- build.sbt | 2 +- circle.yml | 2 +- example/build.sbt | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build.sbt b/build.sbt index 73bcc97..f18e41a 100644 --- a/build.sbt +++ b/build.sbt @@ -25,7 +25,7 @@ lazy val slickDependenciesWithTests = slickDependencies ++ List( "com.lihaoyi" %% "ammonite-ops" % "2.4.1", "commons-io" % "commons-io" % "2.6", "com.typesafe.slick" %% "slick-hikaricp" % slickVersion, - "com.h2database" % "h2" % "2.1.214", + "com.h2database" % "h2" % "2.3.232", "com.zaxxer" % "HikariCP" % "6.2.1", "org.xerial" % "sqlite-jdbc" % "3.47.1.0",// 3.30.1 crashes SQLiteCommandTests "mysql" % "mysql-connector-java" % "8.0.30", diff --git a/circle.yml b/circle.yml index f07583f..c5caa33 100644 --- a/circle.yml +++ b/circle.yml @@ -2,7 +2,7 @@ machine: environment: JAVA_OPTS: "-Xms256m -Xmx512m" java: - version: oraclejdk8 + version: oraclejdk11 python: version: 2.7.9 dependencies: diff --git a/example/build.sbt b/example/build.sbt index fb6fcca..f39daff 100644 --- a/example/build.sbt +++ b/example/build.sbt @@ -5,9 +5,9 @@ addCommandAlias("mgm", "migration_manager/run") addCommandAlias("mg", "migrations/run") -lazy val slickVersion = "3.3.2" +lazy val slickVersion = "3.5.2" -lazy val forkliftVersion = "0.3.2-SNAPSHOT" +lazy val forkliftVersion = "0.3.2" lazy val commonSettings = Seq( organization := "com.liyaos", @@ -15,7 +15,7 @@ lazy val commonSettings = Seq( scalaVersion := "2.13.1", scalacOptions += "-deprecation", scalacOptions += "-feature", - resolvers += Resolver.sonatypeRepo("snapshots"), + resolvers += Resolver.Resolver.sonatypeOssRepos("snapshots"), resolvers += Resolver.jcenterRepo, ) @@ -29,8 +29,8 @@ lazy val slickDependencies = List( ) lazy val dbDependencies = List( - "com.typesafe.slick" %% "slick-hikaricp" % slickVersion - ,"com.h2database" % "h2" % "1.4.200" + "com.typesafe.slick" %% "slick-hikaricp" % slickVersion, + "com.h2database" % "h2" % "2.3.232" ) lazy val forkliftDependencies = List( From 81bfa8a4a5d3ea65ea1e40661f30116a855ebae0 Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Wed, 27 Nov 2024 14:42:55 +0000 Subject: [PATCH 27/39] Fix incorrect resolver initialization --- example/build.sbt | 2 +- migrations/slick/src/test/scala/UnitTests/ConfigFile.scala | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/example/build.sbt b/example/build.sbt index f39daff..698dc02 100644 --- a/example/build.sbt +++ b/example/build.sbt @@ -15,7 +15,7 @@ lazy val commonSettings = Seq( scalaVersion := "2.13.1", scalacOptions += "-deprecation", scalacOptions += "-feature", - resolvers += Resolver.Resolver.sonatypeOssRepos("snapshots"), + resolvers += Resolver.sonatypeOssRepos("snapshots"), resolvers += Resolver.jcenterRepo, ) diff --git a/migrations/slick/src/test/scala/UnitTests/ConfigFile.scala b/migrations/slick/src/test/scala/UnitTests/ConfigFile.scala index 072d201..1f7ef8f 100644 --- a/migrations/slick/src/test/scala/UnitTests/ConfigFile.scala +++ b/migrations/slick/src/test/scala/UnitTests/ConfigFile.scala @@ -10,7 +10,7 @@ import slick.jdbc.JdbcProfile trait ConfigFile { this: Tables => val path = System.getProperty("user.dir") - val timeout = new Integer(5000) + val timeout = Integer.valueOf(5000) val driver: String val dbDriver: String val dbUrl: String @@ -118,7 +118,7 @@ trait DerbyConfigFile extends ConfigFile with Tables { val driver = "slick.jdbc.DerbyProfile$" val dbDriver = "org.apache.derby.jdbc.EmbeddedDriver" val dbUrl = s"jdbc:derby:$path/target/test-${Instant.now.toEpochMilli}.derby.db;create=true" - override val timeout = new Integer(10000) + override val timeout = Integer.valueOf(10000) val profile = slick.jdbc.DerbyProfile } From 88b9514688bdb8aaacec1f4d1da177b6e2a64168 Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Wed, 27 Nov 2024 14:53:55 +0000 Subject: [PATCH 28/39] Change the resolver import change in the example --- example/build.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example/build.sbt b/example/build.sbt index 698dc02..40849f5 100644 --- a/example/build.sbt +++ b/example/build.sbt @@ -15,8 +15,8 @@ lazy val commonSettings = Seq( scalaVersion := "2.13.1", scalacOptions += "-deprecation", scalacOptions += "-feature", - resolvers += Resolver.sonatypeOssRepos("snapshots"), - resolvers += Resolver.jcenterRepo, + resolvers += Resolver.sonatypeRepos("snapshots"), + resolvers ++= Seq(Resolver.jcenterRepo, "asana-oss-cache" at "https://asana-oss-cache.s3.us-east-1.amazonaws.com/maven/release/"), ) From 16d97309d771d16ab5f4842a5ac035677341ede4 Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Wed, 27 Nov 2024 14:59:52 +0000 Subject: [PATCH 29/39] Fix resolver combination --- example/build.sbt | 2 +- .../scala/SubProjectsTests/MigrationDatabaseTests.scala | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/example/build.sbt b/example/build.sbt index 40849f5..f8dcad4 100644 --- a/example/build.sbt +++ b/example/build.sbt @@ -15,7 +15,7 @@ lazy val commonSettings = Seq( scalaVersion := "2.13.1", scalacOptions += "-deprecation", scalacOptions += "-feature", - resolvers += Resolver.sonatypeRepos("snapshots"), + resolvers ++= Resolver.sonatypeOssRepos("snapshots", resolvers ++= Seq(Resolver.jcenterRepo, "asana-oss-cache" at "https://asana-oss-cache.s3.us-east-1.amazonaws.com/maven/release/"), ) diff --git a/migrations/slick/src/test/scala/SubProjectsTests/MigrationDatabaseTests.scala b/migrations/slick/src/test/scala/SubProjectsTests/MigrationDatabaseTests.scala index 3b570a8..d2fa1a6 100644 --- a/migrations/slick/src/test/scala/SubProjectsTests/MigrationDatabaseTests.scala +++ b/migrations/slick/src/test/scala/SubProjectsTests/MigrationDatabaseTests.scala @@ -22,9 +22,9 @@ class MigrationDatabaseTest extends FlatSpec dir.setup() rm(objDir) implicit val wd = dir.path - %%git 'init - %%git('config, "user.email", "test@test.com") - %%git('config, "user.name", "Testser") + %%git Symbol("init") + %%git(Symbol("config"), "user.email", "test@test.com") + %%git(Symbol("config"), "user.name", "Testser") for (file <- filesToWrite) { write(file, "dummy file") } From 44953707dfcd8bbb73e1e78812ede57a0abe57dc Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Wed, 27 Nov 2024 15:20:59 +0000 Subject: [PATCH 30/39] Test out of curiosity to only run 2.13 tests --- .circleci/config.yml | 5 ----- build.sbt | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5a195bb..2582d0b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -46,11 +46,6 @@ jobs: command: | sbt +test:compile sbt +publishLocal - - run: - name: Test scala-forklift scala 2.12 - command: sbt '++ 2.12.11; test:test' - environment: - JAVA_OPTS: "-Xms256m -Xmx512m" - run: name: Test scala-forklift scala 2.13 command: sbt '++ 2.13.1; test:test' diff --git a/build.sbt b/build.sbt index f18e41a..8b04469 100644 --- a/build.sbt +++ b/build.sbt @@ -28,7 +28,7 @@ lazy val slickDependenciesWithTests = slickDependencies ++ List( "com.h2database" % "h2" % "2.3.232", "com.zaxxer" % "HikariCP" % "6.2.1", "org.xerial" % "sqlite-jdbc" % "3.47.1.0",// 3.30.1 crashes SQLiteCommandTests - "mysql" % "mysql-connector-java" % "8.0.30", + "mysql" % "mysql-connector-java" % "8.0.33", "org.postgresql" % "postgresql" % "42.5.0", "org.hsqldb" % "hsqldb" % "2.7.0", "org.apache.derby" % "derby" % "10.17.1.0", From 6c9ab10061dd59e23eb6df1f9c3a000f927e8916 Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Wed, 27 Nov 2024 15:29:43 +0000 Subject: [PATCH 31/39] Change Derby version to version supported by slick --- .circleci/config.yml | 5 +++++ build.sbt | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2582d0b..5a195bb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -46,6 +46,11 @@ jobs: command: | sbt +test:compile sbt +publishLocal + - run: + name: Test scala-forklift scala 2.12 + command: sbt '++ 2.12.11; test:test' + environment: + JAVA_OPTS: "-Xms256m -Xmx512m" - run: name: Test scala-forklift scala 2.13 command: sbt '++ 2.13.1; test:test' diff --git a/build.sbt b/build.sbt index 8b04469..2bd030f 100644 --- a/build.sbt +++ b/build.sbt @@ -25,13 +25,13 @@ lazy val slickDependenciesWithTests = slickDependencies ++ List( "com.lihaoyi" %% "ammonite-ops" % "2.4.1", "commons-io" % "commons-io" % "2.6", "com.typesafe.slick" %% "slick-hikaricp" % slickVersion, - "com.h2database" % "h2" % "2.3.232", + "com.h2database" % "h2" % "1.4.200", "com.zaxxer" % "HikariCP" % "6.2.1", "org.xerial" % "sqlite-jdbc" % "3.47.1.0",// 3.30.1 crashes SQLiteCommandTests "mysql" % "mysql-connector-java" % "8.0.33", "org.postgresql" % "postgresql" % "42.5.0", - "org.hsqldb" % "hsqldb" % "2.7.0", - "org.apache.derby" % "derby" % "10.17.1.0", + "org.hsqldb" % "hsqldb" % "2.5.2", + "org.apache.derby" % "derby" % "10.14.2.0", "ch.qos.logback" % "logback-classic" % "1.2.11" ).map(_ % "test") From 5ac3f11196132bcc0dd9de3b927b1e571c8b137b Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Wed, 27 Nov 2024 15:44:46 +0000 Subject: [PATCH 32/39] Fix missing closing symbol --- build.sbt | 4 ++-- example/build.sbt | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/build.sbt b/build.sbt index 2bd030f..9fb3a15 100644 --- a/build.sbt +++ b/build.sbt @@ -25,8 +25,8 @@ lazy val slickDependenciesWithTests = slickDependencies ++ List( "com.lihaoyi" %% "ammonite-ops" % "2.4.1", "commons-io" % "commons-io" % "2.6", "com.typesafe.slick" %% "slick-hikaricp" % slickVersion, - "com.h2database" % "h2" % "1.4.200", - "com.zaxxer" % "HikariCP" % "6.2.1", + "com.h2database" % "h2" % "2.7.2", + "com.zaxxer" % "HikariCP" % "5.1.0", "org.xerial" % "sqlite-jdbc" % "3.47.1.0",// 3.30.1 crashes SQLiteCommandTests "mysql" % "mysql-connector-java" % "8.0.33", "org.postgresql" % "postgresql" % "42.5.0", diff --git a/example/build.sbt b/example/build.sbt index f8dcad4..b7da47a 100644 --- a/example/build.sbt +++ b/example/build.sbt @@ -15,9 +15,8 @@ lazy val commonSettings = Seq( scalaVersion := "2.13.1", scalacOptions += "-deprecation", scalacOptions += "-feature", - resolvers ++= Resolver.sonatypeOssRepos("snapshots", + resolvers ++= Resolver.sonatypeOssRepos("snapshots"), resolvers ++= Seq(Resolver.jcenterRepo, "asana-oss-cache" at "https://asana-oss-cache.s3.us-east-1.amazonaws.com/maven/release/"), - ) lazy val loggingDependencies = List( From 4473f4d27a1ba176a162475a71100f9b1aa70101 Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Wed, 27 Nov 2024 15:50:47 +0000 Subject: [PATCH 33/39] Upgrade test package versions --- build.sbt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build.sbt b/build.sbt index 9fb3a15..926e98d 100644 --- a/build.sbt +++ b/build.sbt @@ -25,13 +25,13 @@ lazy val slickDependenciesWithTests = slickDependencies ++ List( "com.lihaoyi" %% "ammonite-ops" % "2.4.1", "commons-io" % "commons-io" % "2.6", "com.typesafe.slick" %% "slick-hikaricp" % slickVersion, - "com.h2database" % "h2" % "2.7.2", + "com.h2database" % "h2" % "2.1.214", "com.zaxxer" % "HikariCP" % "5.1.0", "org.xerial" % "sqlite-jdbc" % "3.47.1.0",// 3.30.1 crashes SQLiteCommandTests - "mysql" % "mysql-connector-java" % "8.0.33", + "mysql" % "mysql-connector-java" % "8.0.30", "org.postgresql" % "postgresql" % "42.5.0", - "org.hsqldb" % "hsqldb" % "2.5.2", - "org.apache.derby" % "derby" % "10.14.2.0", + "org.hsqldb" % "hsqldb" % "2.7.0", + "org.apache.derby" % "derby" % "10.17.1.0", "ch.qos.logback" % "logback-classic" % "1.2.11" ).map(_ % "test") From 31e5189ebb5b4401c629853a460859a1eaa3f0b4 Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Wed, 27 Nov 2024 15:57:17 +0000 Subject: [PATCH 34/39] Fix scala version in circle command --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5a195bb..a0c84bd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -53,7 +53,7 @@ jobs: JAVA_OPTS: "-Xms256m -Xmx512m" - run: name: Test scala-forklift scala 2.13 - command: sbt '++ 2.13.1; test:test' + command: sbt '++ 2.13.14; test:test' environment: JAVA_OPTS: "-Xms256m -Xmx512m" - save_cache: From 0938b84cfbcceed344492769fd6b268ffaa5b305 Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Wed, 27 Nov 2024 16:01:06 +0000 Subject: [PATCH 35/39] Fix snapshot version --- example/build.sbt | 4 ++-- version.sbt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/example/build.sbt b/example/build.sbt index b7da47a..064babb 100644 --- a/example/build.sbt +++ b/example/build.sbt @@ -7,12 +7,12 @@ addCommandAlias("mg", "migrations/run") lazy val slickVersion = "3.5.2" -lazy val forkliftVersion = "0.3.2" +lazy val forkliftVersion = "0.3.3-SNAPSHOT" lazy val commonSettings = Seq( organization := "com.liyaos", version := "2.0", - scalaVersion := "2.13.1", + scalaVersion := "2.13.14", scalacOptions += "-deprecation", scalacOptions += "-feature", resolvers ++= Resolver.sonatypeOssRepos("snapshots"), diff --git a/version.sbt b/version.sbt index eb12e8f..e33dfa6 100644 --- a/version.sbt +++ b/version.sbt @@ -1 +1 @@ -ThisBuild / version := "0.3.2" +ThisBuild / version := "0.3.3" From 568770bd7c53020e351ffd6d49da466b09729bee Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Wed, 27 Nov 2024 16:11:24 +0000 Subject: [PATCH 36/39] Upgrade the mysql-connector-j library --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 926e98d..b45f383 100644 --- a/build.sbt +++ b/build.sbt @@ -28,7 +28,7 @@ lazy val slickDependenciesWithTests = slickDependencies ++ List( "com.h2database" % "h2" % "2.1.214", "com.zaxxer" % "HikariCP" % "5.1.0", "org.xerial" % "sqlite-jdbc" % "3.47.1.0",// 3.30.1 crashes SQLiteCommandTests - "mysql" % "mysql-connector-java" % "8.0.30", + "com.mysql" % "mysql-connector-j" % "8.0.33", "org.postgresql" % "postgresql" % "42.5.0", "org.hsqldb" % "hsqldb" % "2.7.0", "org.apache.derby" % "derby" % "10.17.1.0", From 62726e002fe038b2b78044950491ed4a340d75f3 Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Wed, 27 Nov 2024 16:19:38 +0000 Subject: [PATCH 37/39] Update logger version --- example/build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/build.sbt b/example/build.sbt index 064babb..2c1d28a 100644 --- a/example/build.sbt +++ b/example/build.sbt @@ -20,7 +20,7 @@ lazy val commonSettings = Seq( ) lazy val loggingDependencies = List( - "org.slf4j" % "slf4j-nop" % "1.6.4" // <- disables logging + "org.slf4j" % "slf4j-nop" % "2.0.16" // <- disables logging ) lazy val slickDependencies = List( From b2e1e32c3d1aeb0b53e6e162f42e19b2be8f9c5d Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Thu, 28 Nov 2024 10:27:00 +0000 Subject: [PATCH 38/39] Upgrade jgit for eclipse --- build.sbt | 3 +-- example/build.sbt | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index b45f383..f1e0ab3 100644 --- a/build.sbt +++ b/build.sbt @@ -10,7 +10,7 @@ lazy val supportedScalaVersions = List(scala212, scala213) lazy val coreDependencies = libraryDependencies ++= List( "org.scala-lang" % "scala-compiler" % scalaVersion.value, "com.typesafe" % "config" % "1.4.3", - "org.eclipse.jgit" % "org.eclipse.jgit" % "4.0.1.201506240215-r" + "org.eclipse.jgit" % "org.eclipse.jgit" % "7.0.0.202409031743-r" ) lazy val slickDependencies = List( @@ -26,7 +26,6 @@ lazy val slickDependenciesWithTests = slickDependencies ++ List( "commons-io" % "commons-io" % "2.6", "com.typesafe.slick" %% "slick-hikaricp" % slickVersion, "com.h2database" % "h2" % "2.1.214", - "com.zaxxer" % "HikariCP" % "5.1.0", "org.xerial" % "sqlite-jdbc" % "3.47.1.0",// 3.30.1 crashes SQLiteCommandTests "com.mysql" % "mysql-connector-j" % "8.0.33", "org.postgresql" % "postgresql" % "42.5.0", diff --git a/example/build.sbt b/example/build.sbt index 2c1d28a..8595b0c 100644 --- a/example/build.sbt +++ b/example/build.sbt @@ -16,7 +16,7 @@ lazy val commonSettings = Seq( scalacOptions += "-deprecation", scalacOptions += "-feature", resolvers ++= Resolver.sonatypeOssRepos("snapshots"), - resolvers ++= Seq(Resolver.jcenterRepo, "asana-oss-cache" at "https://asana-oss-cache.s3.us-east-1.amazonaws.com/maven/release/"), + resolvers += Resolver.jcenterRepo, ) lazy val loggingDependencies = List( From b066c2159e1d052fc98ec5322897cf8ffe7e8f9c Mon Sep 17 00:00:00 2001 From: Asta Lara Magnusdottir Date: Fri, 29 Nov 2024 15:34:53 +0000 Subject: [PATCH 39/39] Fix slick-migration-api path --- build.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index f1e0ab3..c0f40b6 100644 --- a/build.sbt +++ b/build.sbt @@ -16,7 +16,7 @@ lazy val coreDependencies = libraryDependencies ++= List( lazy val slickDependencies = List( "com.typesafe.slick" %% "slick" % slickVersion, "com.typesafe.slick" %% "slick-codegen" % slickVersion, - "io.github.nafg" %% "slick-migration-api" % "0.10.0", + "io.github.nafg.slick-migration-api" %% "slick-migration-api" % "0.10.0", "org.scala-lang.modules" %% "scala-collection-compat" % "2.8.1" ) @@ -42,7 +42,7 @@ lazy val commonSettings = Seq( scalaVersion := scala213, scalacOptions += "-deprecation", scalacOptions += "-feature", - resolvers ++= Seq(Resolver.jcenterRepo, "asana-oss-cache" at "https://asana-oss-cache.s3.us-east-1.amazonaws.com/maven/release/"), + resolvers += Resolver.jcenterRepo, publishMavenStyle := true, Test / publishArtifact := false, repoKind := { if (version.value.trim.endsWith("SNAPSHOT")) "snapshots"