Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
58d1d97
Add support for unix domain sockets
mpilquist Mar 25, 2025
c521068
WIP: Attempt to test unix domain socket support
mpilquist Mar 25, 2025
7a54717
Try to fix GHA by switching to ubuntu-22.04 image
mpilquist Mar 25, 2025
1edf156
Don't use File.separator
mpilquist Mar 25, 2025
0e8733f
Revert GHA base image change
mpilquist Mar 25, 2025
c037c5c
Merge branch 'main' into topic/peer
mpilquist Mar 25, 2025
a4dfb7c
Bump to JDK 17
mpilquist Mar 25, 2025
bdd4bec
Debug tests
mpilquist Apr 5, 2025
ba0777a
Debug
mpilquist Apr 5, 2025
f8c03e2
Debug
mpilquist Apr 5, 2025
35c387b
Debug
mpilquist Apr 5, 2025
7b0df14
Debug
mpilquist Apr 5, 2025
d8c4989
Debug
mpilquist Apr 5, 2025
e5d258c
Debug
mpilquist Apr 5, 2025
5c52e14
Debug
mpilquist Apr 5, 2025
bc2d336
Ignore exception when terminating socket
mpilquist Apr 5, 2025
67993c1
Ensure site coverage runs with J17
mpilquist Apr 5, 2025
eae043c
Exclude unix domain socket test from Mac and Windows builds
mpilquist Apr 5, 2025
7ca500b
Cleanup
mpilquist Apr 5, 2025
374c70d
Cleanup
mpilquist Apr 5, 2025
07661bc
Update to fs2 3.13.0-M1
mpilquist Apr 23, 2025
968395f
Adjust exceptions thrown from host/port conversions
mpilquist Apr 23, 2025
ffeee5c
Bump to fs2 3.13.0-M2
mpilquist Apr 23, 2025
ce8b2d9
Bump to fs2 3.13.0-M2
mpilquist Apr 23, 2025
5b68226
Update to latest fs2
mpilquist Jun 27, 2025
6805072
Merge branch 'main' into topic/peer
mpilquist Jun 27, 2025
7b733ad
Merge branch 'main' into topic/peer
mpilquist Jun 27, 2025
f5e6fe4
Merge branch 'main' into topic/peer
mpilquist Sep 15, 2025
b51f59c
Prepare for Native 0.5 - update dependencies
keynmol Sep 15, 2025
3ff8ac9
Merge branch 'topic/peer' into scala-native-0.5/prep
keynmol Sep 15, 2025
3d56fb3
Merge pull request #1218 from keynmol/scala-native-0.5/prep
mpilquist Sep 15, 2025
d73862b
Bump cats-parse
mpilquist Sep 18, 2025
f355ffd
Bump circe-core
mpilquist Sep 18, 2025
0bcc75d
Fix artifact resolution
mpilquist Sep 18, 2025
718a636
Update workflow
mpilquist Sep 18, 2025
2c2db11
Disable tracing on native to avoid NPE
mpilquist Sep 20, 2025
b6e0544
Use munit.internal.PlatformCompat
mpilquist Sep 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 36 additions & 36 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
name: Test
strategy:
matrix:
os: [ubuntu-latest]
os: [ubuntu-22.04]
scala: [2.13, 3]
java: [temurin@11]
java: [temurin@17]
project: [skunkJS, skunkJVM, skunkNative]
runs-on: ${{ matrix.os }}
timeout-minutes: 60
Expand All @@ -42,17 +42,17 @@ jobs:
- name: Setup sbt
uses: sbt/setup-sbt@v1

- name: Setup Java (temurin@11)
id: setup-java-temurin-11
if: matrix.java == 'temurin@11'
- name: Setup Java (temurin@17)
id: setup-java-temurin-17
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
java-version: 17
cache: sbt

- name: sbt update
if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false'
if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false'
run: sbt +update

- name: Start up Postgres
Expand All @@ -69,7 +69,7 @@ jobs:
run: sbt githubWorkflowCheck

- name: Check headers
if: matrix.java == 'temurin@11' && matrix.os == 'ubuntu-latest'
if: matrix.java == 'temurin@17' && matrix.os == 'ubuntu-22.04'
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' headerCheckAll

- name: scalaJSLink
Expand All @@ -84,11 +84,11 @@ jobs:
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' test

- name: Check binary compatibility
if: matrix.java == 'temurin@11' && matrix.os == 'ubuntu-latest'
if: matrix.java == 'temurin@17' && matrix.os == 'ubuntu-22.04'
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' mimaReportBinaryIssues

- name: Generate API documentation
if: matrix.java == 'temurin@11' && matrix.os == 'ubuntu-latest'
if: matrix.java == 'temurin@17' && matrix.os == 'ubuntu-22.04'
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' doc

- name: Make target directories
Expand All @@ -112,8 +112,8 @@ jobs:
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/series/0.6.x')
strategy:
matrix:
os: [ubuntu-latest]
java: [temurin@11]
os: [ubuntu-22.04]
java: [temurin@17]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
Expand All @@ -124,17 +124,17 @@ jobs:
- name: Setup sbt
uses: sbt/setup-sbt@v1

- name: Setup Java (temurin@11)
id: setup-java-temurin-11
if: matrix.java == 'temurin@11'
- name: Setup Java (temurin@17)
id: setup-java-temurin-17
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
java-version: 17
cache: sbt

- name: sbt update
if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false'
if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false'
run: sbt +update

- name: Start up Postgres
Expand Down Expand Up @@ -233,7 +233,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-22.04]
java: [temurin@11]
java: [temurin@17]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
Expand All @@ -244,17 +244,17 @@ jobs:
- name: Setup sbt
uses: sbt/setup-sbt@v1

- name: Setup Java (temurin@11)
id: setup-java-temurin-11
if: matrix.java == 'temurin@11'
- name: Setup Java (temurin@17)
id: setup-java-temurin-17
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
java-version: 17
cache: sbt

- name: sbt update
if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false'
if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false'
run: sbt +update

- name: Start up Postgres
Expand All @@ -266,15 +266,15 @@ jobs:
- name: Submit Dependencies
uses: scalacenter/sbt-dependency-submission@v2
with:
modules-ignore: skunk_2.13 skunk_3 docs_2.13 docs_3 skunk_2.13 skunk_3 skunk_2.13 skunk_3 tests_sjs1_2.13 tests_sjs1_3 tests_2.13 tests_3 example_2.13 example_3 tests_native0.4_2.13 tests_native0.4_3 bench_2.13 bench_3
modules-ignore: skunk_2.13 skunk_3 docs_2.13 docs_3 skunk_2.13 skunk_3 skunk_2.13 skunk_3 tests_sjs1_2.13 tests_sjs1_3 tests_2.13 tests_3 example_2.13 example_3 tests_native0.5_2.13 tests_native0.5_3 bench_2.13 bench_3
configs-ignore: test scala-tool scala-doc-tool test-internal

site:
name: Generate Site
strategy:
matrix:
os: [ubuntu-22.04]
java: [temurin@11]
java: [temurin@17]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
Expand All @@ -285,17 +285,17 @@ jobs:
- name: Setup sbt
uses: sbt/setup-sbt@v1

- name: Setup Java (temurin@11)
id: setup-java-temurin-11
if: matrix.java == 'temurin@11'
- name: Setup Java (temurin@17)
id: setup-java-temurin-17
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
java-version: 17
cache: sbt

- name: sbt update
if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false'
if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false'
run: sbt +update

- name: Start up Postgres
Expand All @@ -320,7 +320,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-22.04]
java: [temurin@11]
java: [temurin@17]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
Expand All @@ -331,17 +331,17 @@ jobs:
- name: Setup sbt
uses: sbt/setup-sbt@v1

- name: Setup Java (temurin@11)
id: setup-java-temurin-11
if: matrix.java == 'temurin@11'
- name: Setup Java (temurin@17)
id: setup-java-temurin-17
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
java-version: 17
cache: sbt

- name: sbt update
if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false'
if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false'
run: sbt +update

- name: Start up Postgres
Expand Down
75 changes: 42 additions & 33 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ ThisBuild / developers := List(
ThisBuild / tlCiReleaseBranches += "series/0.6.x"
ThisBuild / tlCiScalafmtCheck := false
ThisBuild / tlSitePublishBranch := Some("series/0.6.x")
ThisBuild / githubWorkflowOSes := Seq("ubuntu-latest")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't need this (anymore?)

ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("11"))
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("17"))
ThisBuild / tlJdkRelease := Some(8)

ThisBuild / resolvers += Resolver.sonatypeCentralSnapshots
ThisBuild / githubWorkflowBuildPreamble ++= nativeBrewInstallWorkflowSteps.value
ThisBuild / nativeBrewInstallCond := Some("matrix.project == 'skunkNative'")

Expand All @@ -38,6 +37,7 @@ ThisBuild / githubWorkflowAddedJobs +=
id = "coverage",
name = s"Generate coverage report (2.13 JVM only)",
scalas = Nil,
javas = githubWorkflowJavaVersions.value.toList,
sbtStepPreamble = Nil,
steps = githubWorkflowJobSetup.value.toList ++
List(
Expand All @@ -58,11 +58,16 @@ ThisBuild / mimaBinaryIssueFilters ++= List(

ThisBuild / tlFatalWarnings := false

ThisBuild / resolvers += Resolver.sonatypeCentralSnapshots

ThisBuild / libraryDependencySchemes +=
"org.scala-native" %% "test-interface_native0.5" % VersionScheme.Always

// This is used in a couple places
lazy val fs2Version = "3.12.2"
lazy val fs2Version = "3.13.0-M7"
lazy val openTelemetryVersion = "1.52.0"
lazy val otel4sVersion = "0.13.1"
lazy val refinedVersion = "0.11.0"
lazy val otel4sVersion = "0.14-eadbb3d-SNAPSHOT"
lazy val refinedVersion = "0.11.3"

// Global Settings
lazy val commonSettings = Seq(
Expand Down Expand Up @@ -107,26 +112,26 @@ lazy val core = crossProject(JVMPlatform, JSPlatform, NativePlatform)
name := "skunk-core",
description := "Tagless, non-blocking data access library for Postgres.",
libraryDependencies ++= Seq(
"org.typelevel" %%% "cats-core" % "2.11.0",
"org.typelevel" %%% "cats-effect" % "3.6.3",
"org.typelevel" %%% "cats-core" % "2.13.0",
"org.typelevel" %%% "cats-effect" % "3.7.0-RC1",
"co.fs2" %%% "fs2-core" % fs2Version,
"co.fs2" %%% "fs2-io" % fs2Version,
"org.scodec" %%% "scodec-bits" % "1.1.38",
"org.scodec" %%% "scodec-core" % (if (tlIsScala3.value) "2.2.2" else "1.11.10"),
"org.scodec" %%% "scodec-cats" % "1.2.0",
"org.scodec" %%% "scodec-bits" % "1.2.4",
"org.scodec" %%% "scodec-core" % (if (tlIsScala3.value) "2.3.3" else "1.11.11"),
"org.scodec" %%% "scodec-cats" % "1.3.0-RC1",
"org.typelevel" %%% "otel4s-core-trace" % otel4sVersion,
"org.tpolecat" %%% "sourcepos" % "1.1.0",
"org.typelevel" %%% "twiddles-core" % "0.8.0",
"org.tpolecat" %%% "sourcepos" % "1.2.0",
"org.typelevel" %%% "twiddles-core" % "0.9.0",
) ++ Seq(
"com.beachape" %%% "enumeratum" % "1.7.4",
"com.beachape" %%% "enumeratum" % "1.9.0",
).filterNot(_ => tlIsScala3.value)
).jvmSettings(
libraryDependencies += "com.ongres.scram" % "client" % "2.1",
).platformsSettings(JSPlatform, NativePlatform)(
libraryDependencies ++= Seq(
"com.armanbilge" %%% "saslprep" % "0.1.1",
"io.github.cquiroz" %%% "scala-java-time" % "2.5.0",
"io.github.cquiroz" %%% "locales-minimal-en_us-db" % "1.5.3"
"com.armanbilge" %%% "saslprep" % "0.1.2",
"io.github.cquiroz" %%% "scala-java-time" % "2.6.0",
"io.github.cquiroz" %%% "locales-minimal-en_us-db" % "1.5.4"
),
)

Expand All @@ -152,8 +157,8 @@ lazy val circe = crossProject(JVMPlatform, JSPlatform, NativePlatform)
.settings(
name := "skunk-circe",
libraryDependencies ++= Seq(
"io.circe" %%% "circe-core" % "0.14.8",
"io.circe" %%% "circe-jawn" % "0.14.8"
"io.circe" %%% "circe-core" % "0.14.14",
"io.circe" %%% "circe-jawn" % "0.14.14"
)
)

Expand All @@ -166,7 +171,7 @@ lazy val postgis = crossProject(JVMPlatform, JSPlatform, NativePlatform)
.settings(
name := "skunk-postgis",
libraryDependencies ++= Seq(
"org.typelevel" %%% "cats-parse" % "1.0.0"
"org.typelevel" %%% "cats-parse" % "1.1.0"
),
)

Expand All @@ -178,25 +183,29 @@ lazy val tests = crossProject(JVMPlatform, JSPlatform, NativePlatform)
.settings(commonSettings)
.settings(
libraryDependencies ++= Seq(
"org.scalameta" %%% "munit" % "1.0.0",
"org.scalameta" % "junit-interface" % "1.1.1",
"org.typelevel" %%% "scalacheck-effect-munit" % "2.0.0-M2",
"org.typelevel" %%% "munit-cats-effect" % "2.1.0",
"org.typelevel" %%% "cats-free" % "2.11.0",
"org.typelevel" %%% "cats-laws" % "2.11.0",
"org.typelevel" %%% "cats-effect-testkit" % "3.6.3",
"org.typelevel" %%% "discipline-munit" % "2.0.0-M3",
"org.typelevel" %%% "cats-time" % "0.5.1",
"org.typelevel" %%% "scalacheck-effect-munit" % "2.1.0-RC1",
"org.typelevel" %%% "munit-cats-effect" % "2.2.0-RC1",
"org.typelevel" %%% "cats-free" % "2.13.0",
"org.typelevel" %%% "cats-laws" % "2.13.0",
"org.typelevel" %%% "cats-effect-testkit" % "3.7.0-RC1",
"org.typelevel" %%% "discipline-munit" % "2.0.0",
"org.typelevel" %%% "cats-time" % "0.6.0",
"eu.timepit" %%% "refined-cats" % refinedVersion,
"org.typelevel" %%% "otel4s-sdk-trace" % otel4sVersion,
"org.typelevel" %%% "otel4s-sdk-exporter-trace" % otel4sVersion,
),
testFrameworks += new TestFramework("munit.Framework"),
testOptions += {
if(System.getProperty("os.arch").startsWith("aarch64")) {
Tests.Argument(TestFrameworks.MUnit, "--exclude-tags=X86ArchOnly")
} else Tests.Argument()
}
var excludedTags = List.empty[String]
if (System.getProperty("os.arch").startsWith("aarch64"))
excludedTags = "X86ArchOnly" :: excludedTags
if (!System.getProperty("os.name").contains("linux"))
excludedTags = "LinuxOnly" :: excludedTags
if (excludedTags.nonEmpty)
Tests.Argument(TestFrameworks.MUnit, "--exclude-tags=" + excludedTags.mkString(","))
else Tests.Argument()
},
Test / baseDirectory := (ThisBuild / Test / run / baseDirectory).value
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make forked tests working directory be root of build instead of root of submodule

)
.jvmSettings(
Test / fork := true,
Expand Down
11 changes: 10 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ services:
POSTGRES_PASSWORD: banana
POSTGRES_HOST_AUTH_METHOD: password
POSTGRES_INITDB_ARGS: --auth-host=password
# for testing domain sockets
unixsockets:
image: postgres:11
environment:
POSTGRES_DB: world
POSTGRES_USER: jimmy
POSTGRES_PASSWORD: banana
volumes:
- ./test-unix-socket:/var/run/postgresql
# for testing redshift connections
redshift:
image: guildeducation/docker-amazon-redshift
Expand All @@ -65,4 +74,4 @@ services:
- 4317:4317
- 4318:4318
environment:
COLLECTOR_OTLP_ENABLED: "true"
COLLECTOR_OTLP_ENABLED: "true"
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ private[message] trait PasswordMessagePlatform {
// First round
if (EVP_DigestInit_ex(ctx, `type`, null) != 1)
throw new RuntimeException("EVP_DigestInit_ex")
if (EVP_DigestUpdate(ctx, password.getBytes.atUnsafe(0), password.length.toULong) != 1)
if (EVP_DigestUpdate(ctx, password.getBytes.atUnsafe(0), password.length.toCSize) != 1)
throw new RuntimeException("EVP_DigestUpdate")
if (EVP_DigestUpdate(ctx, user.getBytes.atUnsafe(0), user.length.toULong) != 1)
if (EVP_DigestUpdate(ctx, user.getBytes.atUnsafe(0), user.length.toCSize) != 1)
throw new RuntimeException("EVP_DigestUpdate")
if (EVP_DigestFinal_ex(ctx, md.atUnsafe(0), size) != 1)
throw new RuntimeException("EVP_DigestFinal_ex")
Expand All @@ -48,9 +48,9 @@ private[message] trait PasswordMessagePlatform {
// Second round
if (EVP_DigestInit_ex(ctx, `type`, null) != 1)
throw new RuntimeException("EVP_DigestInit_ex")
if (EVP_DigestUpdate(ctx, hex.getBytes.atUnsafe(0), 32.toULong) != 1)
if (EVP_DigestUpdate(ctx, hex.getBytes.atUnsafe(0), 32.toCSize) != 1)
throw new RuntimeException("EVP_DigestUpdate")
if (EVP_DigestUpdate(ctx, salt.atUnsafe(0), salt.length.toULong) != 1)
if (EVP_DigestUpdate(ctx, salt.atUnsafe(0), salt.length.toCSize) != 1)
throw new RuntimeException("EVP_DigestUpdate")
if (EVP_DigestFinal_ex(ctx, md.atUnsafe(0), size) != 1)
throw new RuntimeException("EVP_DigestFinal_ex")
Expand Down
Loading