Skip to content

Commit

Permalink
Merge branch 'series/0.6.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
mpilquist committed Jul 17, 2024
2 parents 49ba48f + 083dfc4 commit ed236fd
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 15 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ jobs:
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
- name: Install sbt
if: contains(runner.os, 'macos')
run: brew install sbt

- name: Checkout current branch (full)
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -113,6 +117,10 @@ jobs:
java: [temurin@11]
runs-on: ${{ matrix.os }}
steps:
- name: Install sbt
if: contains(runner.os, 'macos')
run: brew install sbt

- name: Checkout current branch (full)
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -230,6 +238,10 @@ jobs:
java: [temurin@11]
runs-on: ${{ matrix.os }}
steps:
- name: Install sbt
if: contains(runner.os, 'macos')
run: brew install sbt

- name: Checkout current branch (full)
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -268,6 +280,10 @@ jobs:
java: [temurin@11]
runs-on: ${{ matrix.os }}
steps:
- name: Install sbt
if: contains(runner.os, 'macos')
run: brew install sbt

- name: Checkout current branch (full)
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -311,6 +327,10 @@ jobs:
java: [temurin@11]
runs-on: ${{ matrix.os }}
steps:
- name: Install sbt
if: contains(runner.os, 'macos')
run: brew install sbt

- name: Checkout current branch (full)
uses: actions/checkout@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
version = "3.8.1"
version = "3.8.2"
runner.dialect = Scala213Source3
project.includePaths = [] # disables formatting
16 changes: 8 additions & 8 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ 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.10.0",
"org.typelevel" %%% "cats-core" % "2.11.0",
"org.typelevel" %%% "cats-effect" % "3.5.4",
"co.fs2" %%% "fs2-core" % fs2Version,
"co.fs2" %%% "fs2-io" % fs2Version,
Expand All @@ -122,15 +122,15 @@ lazy val core = crossProject(JVMPlatform, JSPlatform, NativePlatform)
"org.tpolecat" %%% "sourcepos" % "1.1.0",
"org.typelevel" %%% "twiddles-core" % "0.8.0",
) ++ Seq(
"com.beachape" %%% "enumeratum" % "1.7.3",
"com.beachape" %%% "enumeratum" % "1.7.4",
).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.1"
"io.github.cquiroz" %%% "locales-minimal-en_us-db" % "1.5.3"
),
)

Expand Down Expand Up @@ -183,12 +183,12 @@ lazy val tests = crossProject(JVMPlatform, JSPlatform, NativePlatform)
.settings(
tlFatalWarnings := false,
libraryDependencies ++= Seq(
"org.scalameta" %%% "munit" % "1.0.0-RC1",
"org.scalameta" % "junit-interface" % "1.0.0-RC1",
"org.scalameta" %%% "munit" % "1.0.0",
"org.scalameta" % "junit-interface" % "1.0.0",
"org.typelevel" %%% "scalacheck-effect-munit" % "2.0.0-M2",
"org.typelevel" %%% "munit-cats-effect" % "2.0.0-RC1",
"org.typelevel" %%% "cats-free" % "2.10.0",
"org.typelevel" %%% "cats-laws" % "2.10.0",
"org.typelevel" %%% "munit-cats-effect" % "2.0.0",
"org.typelevel" %%% "cats-free" % "2.11.0",
"org.typelevel" %%% "cats-laws" % "2.11.0",
"org.typelevel" %%% "cats-effect-testkit" % "3.5.4",
"org.typelevel" %%% "discipline-munit" % "2.0.0-M3",
"org.typelevel" %%% "cats-time" % "0.5.1",
Expand Down
16 changes: 14 additions & 2 deletions modules/core/shared/src/main/scala/net/BitVectorSocket.scala
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,20 @@ object BitVectorSocket {
def apply[F[_]: Temporal](
sockets: Resource[F, Socket[F]],
sslOptions: Option[SSLNegotiation.Options[F]],
readTimeout: Duration
): Resource[F, BitVectorSocket[F]] =
readTimeout: Duration
)(implicit ev: Temporal[F]): Resource[F, BitVectorSocket[F]] = {

def fail[A](msg: String): Resource[F, A] =
Resource.eval(ev.raiseError(new SkunkException(message = msg, sql = None)))

def sock: Resource[F, Socket[F]] = {
(Host.fromString(host), Port.fromInt(port)) match {
case (Some(validHost), Some(validPort)) => sg.client(SocketAddress(validHost, validPort), socketOptions)
case (None, _) => fail(s"""Hostname: "$host" is not syntactically valid.""")
case (_, None) => fail(s"Port: $port falls out of the allowed range.")
}
}

for {
sock <- sockets
sockʹ <- sslOptions.fold(sock.pure[Resource[F, *]])(SSLNegotiation.negotiateSSL(sock, _))
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.10.0
sbt.version=1.10.1
6 changes: 3 additions & 3 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ ThisBuild / libraryDependencySchemes ++= Seq(
"org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always
)

addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.7.1")
addSbtPlugin("org.typelevel" % "sbt-typelevel-site" % "0.7.1")
addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.7.2")
addSbtPlugin("org.typelevel" % "sbt-typelevel-site" % "0.7.2")
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.4")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.7")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.12")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.1.0")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.17")
addSbtPlugin("com.armanbilge" % "sbt-scala-native-config-brew-github-actions" % "0.3.0")

0 comments on commit ed236fd

Please sign in to comment.