Skip to content

Commit

Permalink
Merge pull request #63 from http4s/merge-0.24-20220618
Browse files Browse the repository at this point in the history
Merge 0.24.0-M1 -> 0.25
  • Loading branch information
rossabaker authored Jun 19, 2022
2 parents 6f7e79f + 321f6f4 commit 29bae19
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 7 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ name: Continuous Integration

on:
pull_request:
branches: ['**', '!update/**']
branches: ['**', '!update/**', '!pr/**']
push:
branches: ['**', '!update/**']
branches: ['**', '!update/**', '!pr/**']
tags: [v*]

env:
Expand All @@ -29,10 +29,12 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
scala: [2.13.8, 3.1.2]
scala: [2.12.16, 2.13.8, 3.1.2]
java: [temurin@11, temurin@17]
project: [rootJVM]
exclude:
- scala: 2.12.16
java: temurin@17
- scala: 3.1.2
java: temurin@17
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -187,6 +189,16 @@ jobs:
~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Download target directories (2.12.16, rootJVM)
uses: actions/download-artifact@v2
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.16-rootJVM

- name: Inflate target directories (2.12.16, rootJVM)
run: |
tar xf targets.tar
rm targets.tar
- name: Download target directories (2.13.8, rootJVM)
uses: actions/download-artifact@v2
with:
Expand Down
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# http4s-servlet

Runs http4s apps as Java servlets. Provides components for the [http4s-jetty][http4s-jetty] and [http4s-tomcat][http4s-tomcat]

[http4s-jetty]: https://github.com/http4s/http4s-jetty

## SBT coordinates

```scala
libraryDependencies ++= Seq(
"org.http4s" %% "http4s-servlet" % http4sScalatagsV
)
```

## Compatibility

| http4s-servlet | http4s-core | servlet-api | Scala 2.12 | Scala 2.13 | Scala 3 | Status |
|:---------------|:------------|:------------|------------|------------|---------|:----------|
| 0.23.x | 0.23.x | 3.1 |||| Stable |
| 0.24.x | 0.23.x | 4.0 |||| Milestone |
| 0.25.x | 0.23.x | 5.0 |||| Milestone |

[http4s-jetty]: https://github.com/http4s/http4s-jetty/
[http4s-tomcat]: https://github.com/http4s/http4s-tomcat/
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ThisBuild / developers := List(
ThisBuild / tlSitePublishBranch := Some("main")

val Scala213 = "2.13.8"
ThisBuild / crossScalaVersions := Seq(Scala213, "3.1.2")
ThisBuild / crossScalaVersions := Seq("2.12.16", Scala213, "3.1.2")
ThisBuild / scalaVersion := Scala213 // the default Scala

// Jetty 10+, for testing, requires Java 11.
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.4")
addSbtPlugin("org.http4s" % "sbt-http4s-org" % "0.14.2")
addSbtPlugin("org.http4s" % "sbt-http4s-org" % "0.14.3")
4 changes: 2 additions & 2 deletions servlet/src/main/scala/org/http4s/servlet/ServletIo.scala
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ final case class NonBlockingServletIo[F[_]](chunkSize: Int)(implicit F: Async[F]

def unsafeRunAndForget[A](fa: F[A]): Unit =
dispatcher.unsafeRunAndForget(
fa.onError(t => F.delay(logger.error(t)("Error in servlet read listener")))
fa.onError { case t => F.delay(logger.error(t)("Error in servlet read listener")) }
)
})))

Expand Down Expand Up @@ -208,7 +208,7 @@ final case class NonBlockingServletIo[F[_]](chunkSize: Int)(implicit F: Async[F]

def unsafeRunAndForget[A](fa: F[A]): Unit =
dispatcher.unsafeRunAndForget(
fa.onError(t => F.delay(logger.error(t)("Error in servlet write listener")))
fa.onError { case t => F.delay(logger.error(t)("Error in servlet write listener")) }
)
}))

Expand Down

0 comments on commit 29bae19

Please sign in to comment.