Skip to content

Commit

Permalink
pekko 1.1 (#29)
Browse files Browse the repository at this point in the history
* pekko 1.1

* remove ByteStringInputStream

* Update build.sbt

* Update build.sbt
  • Loading branch information
pjfanning authored Oct 1, 2024
1 parent 18c0b5a commit 8c49511
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 88 deletions.
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ lazy val commonSettings =
lazy val library =
new {
object Version {
val pekko = "1.0.3"
val pekkoHttp = "1.0.1"
val pekko = "1.1.1"
val pekkoHttp = "1.1.0"
val argonaut = "6.3.10"
val avro4s = "4.1.2"
val circe = "0.14.10"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import org.apache.pekko.http.scaladsl.unmarshalling.{
Unmarshaller
}
import org.apache.pekko.http.scaladsl.util.FastFuture
import org.apache.pekko.pekkohttpavro4s.ByteStringInputStream
import org.apache.pekko.stream.scaladsl.{ Flow, Source }
import org.apache.pekko.util.ByteString
import com.sksamuel.avro4s.{
Expand Down Expand Up @@ -113,7 +112,7 @@ trait AvroSupport {
if (bs.isEmpty) throw Unmarshaller.NoContentException
AvroInputStream
.json[A]
.from(ByteStringInputStream(bs))
.from(bs.asInputStream)
.build(schema)
.iterator
.next()
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import org.apache.pekko.http.scaladsl.model.{
import org.apache.pekko.http.scaladsl.model.MediaTypes.`application/json`
import org.apache.pekko.http.scaladsl.unmarshalling._
import org.apache.pekko.http.scaladsl.util.FastFuture
import org.apache.pekko.pekkohttpplayjson.ByteStringInputStream
import org.apache.pekko.stream.scaladsl.{ Flow, Source }
import org.apache.pekko.util.ByteString
import play.api.libs.json.{ JsError, JsResultException, JsValue, Json, Reads, Writes }
Expand Down Expand Up @@ -141,7 +140,7 @@ trait PlayJsonSupport {
* unmarshaller for any `A` value
*/
implicit def fromByteStringUnmarshaller[A: Reads]: Unmarshaller[ByteString, A] =
Unmarshaller(ec => bs => Future(Json.parse(ByteStringInputStream(bs)).as[A])(ec))
Unmarshaller(ec => bs => Future(Json.parse(bs.asInputStream).as[A])(ec))

/**
* HTTP entity => `Source[A, _]`
Expand Down

This file was deleted.

0 comments on commit 8c49511

Please sign in to comment.