Skip to content

Commit ed236fd

Browse files
committed
Merge branch 'series/0.6.x'
2 parents 49ba48f + 083dfc4 commit ed236fd

File tree

6 files changed

+47
-15
lines changed

6 files changed

+47
-15
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ jobs:
3434
runs-on: ${{ matrix.os }}
3535
timeout-minutes: 60
3636
steps:
37+
- name: Install sbt
38+
if: contains(runner.os, 'macos')
39+
run: brew install sbt
40+
3741
- name: Checkout current branch (full)
3842
uses: actions/checkout@v4
3943
with:
@@ -113,6 +117,10 @@ jobs:
113117
java: [temurin@11]
114118
runs-on: ${{ matrix.os }}
115119
steps:
120+
- name: Install sbt
121+
if: contains(runner.os, 'macos')
122+
run: brew install sbt
123+
116124
- name: Checkout current branch (full)
117125
uses: actions/checkout@v4
118126
with:
@@ -230,6 +238,10 @@ jobs:
230238
java: [temurin@11]
231239
runs-on: ${{ matrix.os }}
232240
steps:
241+
- name: Install sbt
242+
if: contains(runner.os, 'macos')
243+
run: brew install sbt
244+
233245
- name: Checkout current branch (full)
234246
uses: actions/checkout@v4
235247
with:
@@ -268,6 +280,10 @@ jobs:
268280
java: [temurin@11]
269281
runs-on: ${{ matrix.os }}
270282
steps:
283+
- name: Install sbt
284+
if: contains(runner.os, 'macos')
285+
run: brew install sbt
286+
271287
- name: Checkout current branch (full)
272288
uses: actions/checkout@v4
273289
with:
@@ -311,6 +327,10 @@ jobs:
311327
java: [temurin@11]
312328
runs-on: ${{ matrix.os }}
313329
steps:
330+
- name: Install sbt
331+
if: contains(runner.os, 'macos')
332+
run: brew install sbt
333+
314334
- name: Checkout current branch (full)
315335
uses: actions/checkout@v4
316336
with:

.scalafmt.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
version = "3.8.1"
1+
version = "3.8.2"
22
runner.dialect = Scala213Source3
33
project.includePaths = [] # disables formatting

build.sbt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ lazy val core = crossProject(JVMPlatform, JSPlatform, NativePlatform)
111111
name := "skunk-core",
112112
description := "Tagless, non-blocking data access library for Postgres.",
113113
libraryDependencies ++= Seq(
114-
"org.typelevel" %%% "cats-core" % "2.10.0",
114+
"org.typelevel" %%% "cats-core" % "2.11.0",
115115
"org.typelevel" %%% "cats-effect" % "3.5.4",
116116
"co.fs2" %%% "fs2-core" % fs2Version,
117117
"co.fs2" %%% "fs2-io" % fs2Version,
@@ -122,15 +122,15 @@ lazy val core = crossProject(JVMPlatform, JSPlatform, NativePlatform)
122122
"org.tpolecat" %%% "sourcepos" % "1.1.0",
123123
"org.typelevel" %%% "twiddles-core" % "0.8.0",
124124
) ++ Seq(
125-
"com.beachape" %%% "enumeratum" % "1.7.3",
125+
"com.beachape" %%% "enumeratum" % "1.7.4",
126126
).filterNot(_ => tlIsScala3.value)
127127
).jvmSettings(
128128
libraryDependencies += "com.ongres.scram" % "client" % "2.1",
129129
).platformsSettings(JSPlatform, NativePlatform)(
130130
libraryDependencies ++= Seq(
131131
"com.armanbilge" %%% "saslprep" % "0.1.1",
132132
"io.github.cquiroz" %%% "scala-java-time" % "2.5.0",
133-
"io.github.cquiroz" %%% "locales-minimal-en_us-db" % "1.5.1"
133+
"io.github.cquiroz" %%% "locales-minimal-en_us-db" % "1.5.3"
134134
),
135135
)
136136

@@ -183,12 +183,12 @@ lazy val tests = crossProject(JVMPlatform, JSPlatform, NativePlatform)
183183
.settings(
184184
tlFatalWarnings := false,
185185
libraryDependencies ++= Seq(
186-
"org.scalameta" %%% "munit" % "1.0.0-RC1",
187-
"org.scalameta" % "junit-interface" % "1.0.0-RC1",
186+
"org.scalameta" %%% "munit" % "1.0.0",
187+
"org.scalameta" % "junit-interface" % "1.0.0",
188188
"org.typelevel" %%% "scalacheck-effect-munit" % "2.0.0-M2",
189-
"org.typelevel" %%% "munit-cats-effect" % "2.0.0-RC1",
190-
"org.typelevel" %%% "cats-free" % "2.10.0",
191-
"org.typelevel" %%% "cats-laws" % "2.10.0",
189+
"org.typelevel" %%% "munit-cats-effect" % "2.0.0",
190+
"org.typelevel" %%% "cats-free" % "2.11.0",
191+
"org.typelevel" %%% "cats-laws" % "2.11.0",
192192
"org.typelevel" %%% "cats-effect-testkit" % "3.5.4",
193193
"org.typelevel" %%% "discipline-munit" % "2.0.0-M3",
194194
"org.typelevel" %%% "cats-time" % "0.5.1",

modules/core/shared/src/main/scala/net/BitVectorSocket.scala

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,20 @@ object BitVectorSocket {
6969
def apply[F[_]: Temporal](
7070
sockets: Resource[F, Socket[F]],
7171
sslOptions: Option[SSLNegotiation.Options[F]],
72-
readTimeout: Duration
73-
): Resource[F, BitVectorSocket[F]] =
72+
readTimeout: Duration
73+
)(implicit ev: Temporal[F]): Resource[F, BitVectorSocket[F]] = {
74+
75+
def fail[A](msg: String): Resource[F, A] =
76+
Resource.eval(ev.raiseError(new SkunkException(message = msg, sql = None)))
77+
78+
def sock: Resource[F, Socket[F]] = {
79+
(Host.fromString(host), Port.fromInt(port)) match {
80+
case (Some(validHost), Some(validPort)) => sg.client(SocketAddress(validHost, validPort), socketOptions)
81+
case (None, _) => fail(s"""Hostname: "$host" is not syntactically valid.""")
82+
case (_, None) => fail(s"Port: $port falls out of the allowed range.")
83+
}
84+
}
85+
7486
for {
7587
sock <- sockets
7688
sockʹ <- sslOptions.fold(sock.pure[Resource[F, *]])(SSLNegotiation.negotiateSSL(sock, _))

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.10.0
1+
sbt.version=1.10.1

project/plugins.sbt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ ThisBuild / libraryDependencySchemes ++= Seq(
33
"org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always
44
)
55

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

0 commit comments

Comments
 (0)