From 48c5a1f1e101129947502aa47789369bce3ed475 Mon Sep 17 00:00:00 2001 From: Adam Fraser Date: Wed, 11 Oct 2023 13:25:38 -0700 Subject: [PATCH 1/5] remove unnecessary dependency --- project/plugins.sbt | 1 - 1 file changed, 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 0882f2c22c..837a8921d5 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -4,7 +4,6 @@ addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.6") addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.3") addSbtPlugin("io.spray" % "sbt-revolver" % "0.10.0") addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.17.0") -addSbtPlugin("ch.epfl.scala" % "sbt-scala3-migrate" % "0.6.1") addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.3.10") addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0") From b4b9ec4de72518dde5d70b893dc892451b4d5670 Mon Sep 17 00:00:00 2001 From: Adam Fraser Date: Wed, 11 Oct 2023 13:40:33 -0700 Subject: [PATCH 2/5] fix compilation errors --- zio-http/src/main/scala/zio/http/Header.scala | 2 +- zio-http/src/main/scala/zio/http/Path.scala | 2 +- .../main/scala/zio/http/netty/client/NettyClientDriver.scala | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/zio-http/src/main/scala/zio/http/Header.scala b/zio-http/src/main/scala/zio/http/Header.scala index bfd2bf6b9d..16a9640d9b 100644 --- a/zio-http/src/main/scala/zio/http/Header.scala +++ b/zio-http/src/main/scala/zio/http/Header.scala @@ -4325,7 +4325,7 @@ object Header { def parse(value: String): Either[String, WWWAuthenticate] = Try { - val challengeRegEx(scheme, challenge) = value + val challengeRegEx(scheme, challenge) = (value: @unchecked) val params = auth .findAllMatchIn(challenge) .map { m => diff --git a/zio-http/src/main/scala/zio/http/Path.scala b/zio-http/src/main/scala/zio/http/Path.scala index f362d42e4c..81c7f4f68a 100644 --- a/zio-http/src/main/scala/zio/http/Path.scala +++ b/zio-http/src/main/scala/zio/http/Path.scala @@ -26,7 +26,7 @@ import zio.{Chunk, ChunkBuilder} * whether there are leading and trailing slashes in the path. This allows for a * combination of precision and performance and supports a rich API. */ -final case class Path private (flags: Path.Flags, segments: Chunk[String]) { self => +final case class Path private[http] (flags: Path.Flags, segments: Chunk[String]) { self => import Path.{Flag, Flags} /** diff --git a/zio-http/src/main/scala/zio/http/netty/client/NettyClientDriver.scala b/zio-http/src/main/scala/zio/http/netty/client/NettyClientDriver.scala index 4f7a863968..bd6da32226 100644 --- a/zio-http/src/main/scala/zio/http/netty/client/NettyClientDriver.scala +++ b/zio-http/src/main/scala/zio/http/netty/client/NettyClientDriver.scala @@ -31,7 +31,7 @@ import io.netty.channel.{Channel, ChannelFactory, ChannelHandler, EventLoopGroup import io.netty.handler.codec.http.websocketx.{WebSocketClientProtocolHandler, WebSocketFrame => JWebSocketFrame} import io.netty.handler.codec.http.{FullHttpRequest, HttpObjectAggregator} -final case class NettyClientDriver private ( +final case class NettyClientDriver private[netty] ( channelFactory: ChannelFactory[Channel], eventLoopGroup: EventLoopGroup, nettyRuntime: NettyRuntime, From e5115f3b78c0a0bb5ceeef65fb0484d0141bcb02 Mon Sep 17 00:00:00 2001 From: Adam Fraser Date: Wed, 11 Oct 2023 13:45:20 -0700 Subject: [PATCH 3/5] format --- zio-http/src/main/scala/zio/http/Header.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zio-http/src/main/scala/zio/http/Header.scala b/zio-http/src/main/scala/zio/http/Header.scala index 16a9640d9b..e47b3476a2 100644 --- a/zio-http/src/main/scala/zio/http/Header.scala +++ b/zio-http/src/main/scala/zio/http/Header.scala @@ -4325,7 +4325,7 @@ object Header { def parse(value: String): Either[String, WWWAuthenticate] = Try { - val challengeRegEx(scheme, challenge) = (value: @unchecked) + val challengeRegEx(scheme, challenge) = value: @unchecked val params = auth .findAllMatchIn(challenge) .map { m => From 8c9f296d8071041f9107d38a93fa0f5f648db7ba Mon Sep 17 00:00:00 2001 From: Adam Fraser Date: Wed, 11 Oct 2023 13:52:34 -0700 Subject: [PATCH 4/5] fix tests --- zio-http/src/test/scala/zio/http/FormSpec.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zio-http/src/test/scala/zio/http/FormSpec.scala b/zio-http/src/test/scala/zio/http/FormSpec.scala index e66b7290c8..9a7ec202ab 100644 --- a/zio-http/src/test/scala/zio/http/FormSpec.scala +++ b/zio-http/src/test/scala/zio/http/FormSpec.scala @@ -116,7 +116,7 @@ object FormSpec extends ZIOHttpSpec { form <- Form.fromMultipartBytes(multipartFormBytes1) encoding = form.multipartBytes(boundary) bytes <- encoding.runCollect - (text: FormField.Text) :: (image1: FormField.Binary) :: (image2: FormField.Binary) :: Nil = form.formData.toList + (text: FormField.Text) :: (image1: FormField.Binary) :: (image2: FormField.Binary) :: Nil = form.formData.toList: @unchecked } yield assert(bytes)(equalTo(multipartFormBytes1)) && assert(form.formData.size)(equalTo(3)) && assert(text.name)(equalTo("submit-name")) && @@ -197,7 +197,7 @@ object FormSpec extends ZIOHttpSpec { .runCollect .map { formData => val (text: FormField.Text) :: (image1: FormField.Binary) :: (image2: FormField.Binary) :: Nil = - formData.toList + formData.toList: @unchecked assert(formData.size)(equalTo(3)) && assert(text.name)(equalTo("submit-name")) && assert(text.value)(equalTo("Larry")) && From f85bdf681919786c314b47094190d547e58e60e2 Mon Sep 17 00:00:00 2001 From: Adam Fraser Date: Wed, 11 Oct 2023 13:55:50 -0700 Subject: [PATCH 5/5] format --- zio-http/src/test/scala/zio/http/FormSpec.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zio-http/src/test/scala/zio/http/FormSpec.scala b/zio-http/src/test/scala/zio/http/FormSpec.scala index 9a7ec202ab..5c9c05fa1e 100644 --- a/zio-http/src/test/scala/zio/http/FormSpec.scala +++ b/zio-http/src/test/scala/zio/http/FormSpec.scala @@ -116,7 +116,8 @@ object FormSpec extends ZIOHttpSpec { form <- Form.fromMultipartBytes(multipartFormBytes1) encoding = form.multipartBytes(boundary) bytes <- encoding.runCollect - (text: FormField.Text) :: (image1: FormField.Binary) :: (image2: FormField.Binary) :: Nil = form.formData.toList: @unchecked + (text: FormField.Text) :: (image1: FormField.Binary) :: (image2: FormField.Binary) :: Nil = + form.formData.toList: @unchecked } yield assert(bytes)(equalTo(multipartFormBytes1)) && assert(form.formData.size)(equalTo(3)) && assert(text.name)(equalTo("submit-name")) &&