From 9276e8be14e468dafc3b9d2ebf6a5ae1b22ad582 Mon Sep 17 00:00:00 2001 From: tminglei Date: Thu, 4 Jan 2018 15:30:23 +0800 Subject: [PATCH 1/2] tested on postgres 10 and upgrade some addons' dependencies --- .travis.yml | 15 +++++----- .../slickpg/PgPostGISSupportSuite.scala | 4 +-- build.sbt | 30 +++++++++---------- project/build.properties | 2 +- 4 files changed, 26 insertions(+), 25 deletions(-) diff --git a/.travis.yml b/.travis.yml index 725748fc..860d959b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,8 +2,8 @@ dist: trusty sudo: required language: scala scala: - - 2.11.11 - - 2.12.3 + - 2.11.12 + - 2.12.4 jdk: - oraclejdk8 before_install: @@ -13,14 +13,15 @@ before_install: - sudo apt-get -y remove --purge postgresql-9.3 - sudo apt-get -y remove --purge postgresql-9.4 - sudo apt-get -y remove --purge postgresql-9.5 + - sudo apt-get -y remove --purge postgresql-9.6 - sudo apt-get -y autoremove - sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 7FCC7D46ACCC4CF8 - - sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main 9.6" >> /etc/apt/sources.list.d/postgresql.list' + - sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main 10" >> /etc/apt/sources.list.d/postgresql.list' - sudo apt-get update - - sudo apt-get -y install postgresql-9.6 postgresql-contrib-9.6 postgresql-9.6-postgis-2.3 - - sudo sh -c 'echo "local all postgres trust" > /etc/postgresql/9.6/main/pg_hba.conf' - - sudo sh -c 'echo -n "host all all 127.0.0.1/32 trust" >> /etc/postgresql/9.6/main/pg_hba.conf' - - sudo service postgresql restart 9.6 + - sudo apt-get -y install postgresql-10 postgresql-contrib-10 postgresql-10-postgis-2.4 + - sudo sh -c 'echo "local all postgres trust" > /etc/postgresql/10/main/pg_hba.conf' + - sudo sh -c 'echo -n "host all all 127.0.0.1/32 trust" >> /etc/postgresql/10/main/pg_hba.conf' + - sudo service postgresql restart 10 before_script: - psql -c 'create database test;' -U postgres - psql test -c 'CREATE EXTENSION IF NOT EXISTS hstore;' -U postgres diff --git a/addons/jts/src/test/scala/com/github/tminglei/slickpg/PgPostGISSupportSuite.scala b/addons/jts/src/test/scala/com/github/tminglei/slickpg/PgPostGISSupportSuite.scala index afc892ea..fabfe9bb 100644 --- a/addons/jts/src/test/scala/com/github/tminglei/slickpg/PgPostGISSupportSuite.scala +++ b/addons/jts/src/test/scala/com/github/tminglei/slickpg/PgPostGISSupportSuite.scala @@ -540,7 +540,7 @@ class PgPostGISSupportSuite extends FunSuite { val polygon = wktReader.read("POLYGON((175 150, 20 40, 50 60, 125 100, 175 150))") val centroid = wktReader.read("POINT(113.07692307692308 101.28205128205128)") val closetPoint = wktReader.read("POINT(84.89619377162629 86.0553633217993)") - val projectedPoint = wktReader.read("POINT(25.008969098766023 45.006362421852465)") + val projectedPoint = wktReader.read("POINT(25.008969098766034 45.006362421852465)") val longestLine = wktReader.read("LINESTRING(175 150, 75 100)") val shortestLine = wktReader.read("LINESTRING(84.89619377162629 86.0553633217993, 75 100)") @@ -655,7 +655,7 @@ class PgPostGISSupportSuite extends FunSuite { ), // transform GeomTests.filter(_.id === pointbean.id.bind).map(_.geom.transform(26986.bind).asEWKT).result.head.map( - r => assert("SRID=26986;POINT(-3428094.64636768 2715245.01412978)" === r) + r => assert("SRID=26986;POINT(-3428094.64636769 2715245.01412979)" === r) ), // simplify GeomTests.filter(_.id === linebean.id.bind).map(_.geom.simplify(0.5f.bind).asText).result.head.map( diff --git a/build.sbt b/build.sbt index ee163123..b9e2559e 100644 --- a/build.sbt +++ b/build.sbt @@ -4,8 +4,8 @@ lazy val commonSettings = Seq( name := "slick-pg", version := "0.15.3", - scalaVersion := "2.12.3", - crossScalaVersions := Seq("2.12.3", "2.11.11"), + scalaVersion := "2.12.4", + crossScalaVersions := Seq("2.12.4", "2.11.12"), scalacOptions ++= Seq("-deprecation", "-feature", "-language:implicitConversions", "-language:reflectiveCalls", @@ -91,8 +91,8 @@ lazy val slickPgJoda = Project(id = "slick-pg_joda-time", base = file("./addons/ name := "slick-pg_joda-time", description := "Slick extensions for PostgreSQL - joda time module", libraryDependencies := mainDependencies(scalaVersion.value) ++ Seq( - "joda-time" % "joda-time" % "2.9.7", - "org.joda" % "joda-convert" % "1.8.1" + "joda-time" % "joda-time" % "2.9.9", + "org.joda" % "joda-convert" % "1.9.2" ) ) ) dependsOn (slickPgCore) @@ -102,9 +102,9 @@ lazy val slickPgJson4s = Project(id = "slick-pg_json4s", base = file("./addons/j name := "slick-pg_json4s", description := "Slick extensions for PostgreSQL - json4s module", libraryDependencies := mainDependencies(scalaVersion.value) ++ Seq( - "org.json4s" %% "json4s-ast" % "3.5.0", - "org.json4s" %% "json4s-core" % "3.5.0", - "org.json4s" %% "json4s-native" % "3.5.0" % "test" + "org.json4s" %% "json4s-ast" % "3.5.3", + "org.json4s" %% "json4s-core" % "3.5.3", + "org.json4s" %% "json4s-native" % "3.5.3" % "test" ) ) ) dependsOn (slickPgCore) @@ -114,7 +114,7 @@ lazy val slickPgJts = Project(id = "slick-pg_jts", base = file("./addons/jts"), name := "slick-pg_jts", description := "Slick extensions for PostgreSQL - jts module", libraryDependencies := mainDependencies(scalaVersion.value) ++ Seq( - "com.vividsolutions" % "jts" % "1.13" + "com.vividsolutions" % "jts-core" % "1.14.0" ) ) ) dependsOn (slickPgCore) @@ -124,7 +124,7 @@ lazy val slickPgPlayJson = Project(id = "slick-pg_play-json", base = file("./add name := "slick-pg_play-json", description := "Slick extensions for PostgreSQL - play-json module", libraryDependencies := mainDependencies(scalaVersion.value) ++ Seq( - "com.typesafe.play" %% "play-json" % "2.6.0" + "com.typesafe.play" %% "play-json" % "2.6.8" ) ) ) dependsOn (slickPgCore) @@ -134,7 +134,7 @@ lazy val slickPgSprayJson = Project(id = "slick-pg_spray-json", base = file("./a name := "slick-pg_spray-json", description := "Slick extensions for PostgreSQL - spray-json module", libraryDependencies := mainDependencies(scalaVersion.value) ++ Seq( - "io.spray" %% "spray-json" % "1.3.3" + "io.spray" %% "spray-json" % "1.3.4" ) ) ) dependsOn (slickPgCore) @@ -144,9 +144,9 @@ lazy val slickPgCirceJson = Project(id = "slick-pg_circe-json", base = file("./a name := "slick-pg_circe-json", description := "Slick extensions for PostgreSQL - circe module", libraryDependencies := mainDependencies(scalaVersion.value) ++ Seq( - "io.circe" %% "circe-core" % "0.8.0", - "io.circe" %% "circe-generic" % "0.8.0", - "io.circe" %% "circe-parser" % "0.8.0" + "io.circe" %% "circe-core" % "0.9.0", + "io.circe" %% "circe-generic" % "0.9.0", + "io.circe" %% "circe-parser" % "0.9.0" ) ) ) dependsOn (slickPgCore) @@ -156,7 +156,7 @@ lazy val slickPgArgonaut = Project(id = "slick-pg_argonaut", base = file("./addo name := "slick-pg_argonaut", description := "Slick extensions for PostgreSQL - argonaut module", libraryDependencies := mainDependencies(scalaVersion.value) ++ Seq( - "io.argonaut" %% "argonaut" % "6.2" + "io.argonaut" %% "argonaut" % "6.2.1" ) ) ) dependsOn (slickPgCore) @@ -166,7 +166,7 @@ lazy val slickPgJawn = Project(id = "slick-pg_jawn", base = file("./addons/jawn" name := "slick-pg_jawn", description := "Slick extensions for PostgreSQL - jawn module", libraryDependencies := mainDependencies(scalaVersion.value) ++ Seq( - "org.spire-math" %% "jawn-ast" % "0.10.4" + "org.spire-math" %% "jawn-ast" % "0.11.0" ) ) ) dependsOn (slickPgCore) diff --git a/project/build.properties b/project/build.properties index c091b86c..394cb75c 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.16 +sbt.version=1.0.4 From 280adb0ffae9f0022a1ba2c327091333c08eea0e Mon Sep 17 00:00:00 2001 From: tminglei Date: Fri, 5 Jan 2018 18:19:43 +0800 Subject: [PATCH 2/2] jump to v0.15.5 --- README.md | 36 ++++++++++++++++++------------------ build.sbt | 2 +- project/build.properties | 2 +- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index fa830300..46f8096d 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Slick-pg - Pg_trgm -** _Tested on `PostgreSQL` `v9.6` with `Slick` `v3.2.1`._ +** _Tested on `PostgreSQL` `v10` with `Slick` `v3.2.1`._ ** _`Java 8` is required._ @@ -152,7 +152,7 @@ Here's the related technical details: | List[T] | ARRAY | no 3rd party dependencies | | `java.sql` Date
Time
Timestamp
slickpg Interval
Calendar | date
time
timestamp
interval
timestamptz | no 3rd party dependencies | | `java.time` LocalDate
LocalTime
LocalDateTime
Duration
ZonedDateTime
OffsetDateTime | date
time
timestamp
interval
timestamptz
timestamptz | (built-in) no 3rd party dependencies | -| `joda` LocalDate
LocalTime
LocalDateTime
Period
DateTime | date
time
timestamp
interval
timestamptz | `joda-time` v2.9.7 / `joda-convert` v1.8.1 | +| `joda` LocalDate
LocalTime
LocalDateTime
Period
DateTime | date
time
timestamp
interval
timestamptz | `joda-time` v2.9.9 / `joda-convert` v1.9.2 | | `scala` Enumeration | enum | no 3rd party dependencies | | `slickpg` Range[T] | range | no 3rd party dependencies | | `slickpg` LTree | ltree | no 3rd party dependencies | @@ -160,14 +160,14 @@ Here's the related technical details: | `slickpg` InetString | inet | no 3rd party dependencies | | `slickpg` MacAddrString | macaddr | no 3rd party dependencies | | `slickpg` JsonString | json | no 3rd party dependencies | -| `json4s` JValue | json | `json4s` v3.5.0 | -| `play-json` JsValue | json | `play-json` v2.6.0 | -| `spray-json` JsValue | json | `spray-json` v1.3.3 | -| `argonaut json` Json | json | `argonaut` v6.2 | -| `circe json` Json | json | `circe` v0.7.0 | -| `jawn json` Json | json | `jawn` v0.10.4 | +| `json4s` JValue | json | `json4s` v3.5.3 | +| `play-json` JsValue | json | `play-json` v2.6.8 | +| `spray-json` JsValue | json | `spray-json` v1.3.4 | +| `argonaut json` Json | json | `argonaut` v6.2.1 | +| `circe json` Json | json | `circe` v0.9.0 | +| `jawn json` Json | json | `jawn` v0.11.0 | | (TsQuery+TsVector) | `text` search | no 3rd party dependencies | -| `jts` Geometry | `postgis` geometry | `jts` v1.13 | +| `jts` Geometry | `postgis` geometry | `jts` v1.14.0 | _**Warning:** When your work with time data that contain Timezone, be wary of your postgres configuration. By default `ZonedDateTime` in Java 8 contains more information than `timestamptz` in Postgres. As a consequence, when you store a `ZonedDateTime` you are not guaranteed to get the same timezone as the original class instance. Prefer `OffsetDateTime` instead. cf [Issue #248](https://github.com/tminglei/slick-pg/issues/248)_ @@ -194,42 +194,42 @@ Install ------- To use `slick-pg` in [sbt](http://www.scala-sbt.org/ "slick-sbt") project, add the following to your project file: ```scala -libraryDependencies += "com.github.tminglei" %% "slick-pg" % "0.15.3" +libraryDependencies += "com.github.tminglei" %% "slick-pg" % "0.15.4" ``` > If you need `joda-time` support, pls append dependency: ```scala -libraryDependencies += "com.github.tminglei" %% "slick-pg_joda-time" % "0.15.3" +libraryDependencies += "com.github.tminglei" %% "slick-pg_joda-time" % "0.15.4" ``` > If you need `jts` geom support, pls append dependency: ```scala -libraryDependencies += "com.github.tminglei" %% "slick-pg_jts" % "0.15.3" +libraryDependencies += "com.github.tminglei" %% "slick-pg_jts" % "0.15.4" ``` > If you need `json4s` support, pls append dependency: ```scala -libraryDependencies += "com.github.tminglei" %% "slick-pg_json4s" % "0.15.3" +libraryDependencies += "com.github.tminglei" %% "slick-pg_json4s" % "0.15.4" ``` > If you need `play-json` support, pls append dependency: ```scala -libraryDependencies += "com.github.tminglei" %% "slick-pg_play-json" % "0.15.3" +libraryDependencies += "com.github.tminglei" %% "slick-pg_play-json" % "0.15.4" ``` > If you need `spray-json` support, pls append dependency: ```scala -libraryDependencies += "com.github.tminglei" %% "slick-pg_spray-json" % "0.15.3" +libraryDependencies += "com.github.tminglei" %% "slick-pg_spray-json" % "0.15.4" ``` > If you need `argonaut json` support, pls append dependency: ```scala -libraryDependencies += "com.github.tminglei" %% "slick-pg_argonaut" % "0.15.3" +libraryDependencies += "com.github.tminglei" %% "slick-pg_argonaut" % "0.15.4" ``` > If you need `circe json` support, pls append dependency: ```scala -libraryDependencies += "com.github.tminglei" %% "slick-pg_circe-json" % "0.15.3" +libraryDependencies += "com.github.tminglei" %% "slick-pg_circe-json" % "0.15.4" ``` @@ -238,7 +238,7 @@ Or, in [maven](http://maven.apache.org/ "maven") project, you can add `slick-pg` com.github.tminglei slick-pg_2.12 - 0.15.3 + 0.15.4 ... diff --git a/build.sbt b/build.sbt index b9e2559e..868a068d 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ lazy val commonSettings = Seq( organizationName := "slick-pg", organization := "com.github.tminglei", name := "slick-pg", - version := "0.15.3", + version := "0.15.5", scalaVersion := "2.12.4", crossScalaVersions := Seq("2.12.4", "2.11.12"), diff --git a/project/build.properties b/project/build.properties index 394cb75c..c091b86c 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.0.4 +sbt.version=0.13.16