Skip to content

Commit

Permalink
Akka 2.7 dependency (#4162)
Browse files Browse the repository at this point in the history
  • Loading branch information
patriknw authored Sep 22, 2022
1 parent 4de906e commit fb68933
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 20 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@ jobs:
matrix:
SCALA_VERSION: [2.12, 2.13]
JABBA_JDK: [8, 11, 17]
AKKA_VERSION: [master, default, 2.6.18]
exclude:
# 2.5 is not compatible with JDK 17
- JABBA_JDK: 17
AKKA_VERSION: default
AKKA_VERSION: [main, default, 2.6.18]

steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ You may also check out these [other resources](https://akka.io/get-involved/).

Depending on which version (or sometimes module) you want to work on, you should target a specific branch as explained below:

* `main` – active development branch of akka-http 10.2.x
* `main` – active development branch of akka-http 10.4.x
* `release-10.2` – branch for fixes to akka-http 10.2.x
* `release-10.1` – branch for fixes to akka-http 10.1.x

## Tags
Expand Down
4 changes: 2 additions & 2 deletions LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Business Source License 1.1
Parameters

Licensor: Lightbend, Inc.
Licensed Work: Akka HTTP 10.3.x
Licensed Work: Akka HTTP 10.4.x
The Licensed Work is (c) 2022 Lightbend Inc.
Additional Use Grant:
If you develop an application using a version of Play Framework that
Expand All @@ -15,7 +15,7 @@ Additional Use Grant:
Connecting to a Play Framework websocket and/or Play Framework
request/response bodies for server and play-ws client.

Change Date: TBD ( 3 years after 10.3.0 release )
Change Date: TBD ( 3 years after 10.4.0 release )

Change License: Apache License, Version 2.0

Expand Down
5 changes: 2 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ lazy val httpCore = project("akka-http-core")
"akka-stream-testkit",
"test",
akka =
if (System.getProperty("akka.http.test-against-akka-main", "false") == "true") AkkaDependency.masterSnapshot
if (System.getProperty("akka.http.test-against-akka-main", "false") == "true") AkkaDependency.mainSnapshot
else AkkaDependency.default
)
.settings(Dependencies.httpCore)
Expand Down Expand Up @@ -443,8 +443,7 @@ lazy val docs = project("docs")
"project.name" -> "Akka HTTP",
"canonical.base_url" -> "https://doc.akka.io/docs/akka-http/current",
"akka.version" -> AkkaDependency.docs.version,
"akka.minimum.version25" -> AkkaDependency.minimumExpectedAkkaVersion,
"akka.minimum.version26" -> AkkaDependency.minimumExpectedAkka26Version,
"akka.minimum.version" -> AkkaDependency.minimumExpectedAkkaVersion,
"jackson.xml.version" -> Dependencies.jacksonXmlVersion,
"scalafix.version" -> _root_.scalafix.sbt.BuildInfo.scalafixVersion, // grab from scalafix plugin directly
"extref.akka-docs.base_url" -> s"https://doc.akka.io/docs/akka/${AkkaDependency.docs.link}/%s",
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/paradox/compatibility-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ of your libraries: `Detected java.lang.NoSuchMethodError error, which MAY be cau

### Compatibility with Akka

Akka HTTP 10.2.x is (binary) compatible with Akka >= $akka.minimum.version25$ and Akka >= $akka.minimum.version26$ and future Akka 2.x versions that are released during the lifetime of Akka HTTP 10.2.x.
Akka HTTP 10.4.x is (binary) compatible with Akka >= $akka.minimum.version$ and future Akka 2.x versions that are released during the lifetime of Akka HTTP 10.4.x.
To facilitate supporting multiple minor versions of Akka we do not depend on `akka-stream`
explicitly but mark it as a `provided` dependency in our build. That means that you will *always* have to add
a manual dependency to `akka-stream`.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/paradox/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ come from Play and want to try Akka HTTP, we collected a @ref[side-by-side compa
## Using Akka HTTP

Akka HTTP is provided as independent modules from Akka itself under its own release cycle. Akka HTTP is @ref[compatible](compatibility-guidelines.md)
with Akka 2.5, Akka 2.6 and any later 2.x versions released during the lifetime of Akka HTTP 10.2.x. The modules, however, do *not* depend on `akka-actor` or `akka-stream`, so the user is required to
with Akka >= $akka.minimum.version$ and future Akka 2.x versions that are released during the lifetime of Akka HTTP 10.4.x. The modules, however, do *not* depend on `akka-actor` or `akka-stream`, so the user is required to
choose an Akka version to run against and add a manual dependency to `akka-stream` of the chosen version.

@@dependency [sbt,Gradle,Maven] {
Expand Down
1 change: 1 addition & 0 deletions docs/src/main/paradox/migration-guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

@@@ index

* [migration-guide-10.4.x](migration-guide-10.4.x.md)
* [migration-guide-10.2.x](migration-guide-10.2.x.md)
* [migration-guide-10.1.x](migration-guide-10.1.x.md)
* [migration-guide-10.0.x](migration-guide-10.0.x.md)
Expand Down
32 changes: 32 additions & 0 deletions docs/src/main/paradox/migration-guide/migration-guide-10.4.x.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Migration Guide to and within Akka HTTP 10.4.x

The license for using Akka HTTP in production has been changed to Business Source License v1.1.
[Why We Are Changing the License for Akka](https://www.lightbend.com/blog/why-we-are-changing-the-license-for-akka)
explains the reasons and a [detailed FAQ](https://www.lightbend.com/akka/license-faq) is available to answer many of
the questions that you may have about the license change.

## General Notes

See the general @ref[compatibility guidelines](../compatibility-guidelines.md).

Under these guidelines, minor version updates are supposed to be binary compatible and drop-in replacements
for former versions under the condition that user code only uses public, stable, non-deprecated API. Especially
libraries should make sure not to depend on deprecated API to be compatible with both 10.2.x and 10.4.x.

If you find an unexpected incompatibility please let us know, so we can check whether the incompatibility is accidental,
so we might still be able to fix it.

No configuration changes are needed for updating an application from Akka HTTP 10.2.x to 10.4.x.

No deprecated features or APIs have been removed in Akka HTTP 10.4.x.

## Dependency updates

### Akka

Akka HTTP 10.4.x requires Akka version >= 2.7.0.

### Jackson

The Jackson dependency has been updated to 2.13.4 in Akka HTTP 10.4.0. That bump includes many fixes and changes to
Jackson, but it should not introduce any incompatibility in serialized format.
13 changes: 6 additions & 7 deletions project/AkkaDependency.scala
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ object AkkaDependency {
Sources(akkaSources)
case None =>
Option(System.getProperty("akka.http.build.akka.version")) match {
case Some("master") => masterSnapshot
case Some("release-2.5") =>
case Some("main") | Some("master") => mainSnapshot
case Some("release-2.6") =>
// Don't 'downgrade' building even if akka.sources asks for it
// (typically for the docs that require 2.6)
if (defaultVersion.startsWith("2.5")) Artifact(determineLatestSnapshot("2.5"), true)
if (defaultVersion.startsWith("2.6")) Artifact(determineLatestSnapshot("2.6"), true)
else Artifact(defaultVersion)
case Some("default") => Artifact(defaultVersion)
case Some(other) => Artifact(other, true)
Expand All @@ -44,12 +44,11 @@ object AkkaDependency {
}

// Default version updated only when needed, https://doc.akka.io//docs/akka/current/project/downstream-upgrade-strategy.html
val minimumExpectedAkkaVersion = "2.5.32"
val minimumExpectedAkkaVersion = "2.7.0-M1"
val default = akkaDependency(defaultVersion = minimumExpectedAkkaVersion)
val minimumExpectedAkka26Version = "2.6.8"
val docs = akkaDependency(defaultVersion = minimumExpectedAkka26Version)
val docs = akkaDependency(defaultVersion = minimumExpectedAkkaVersion)

lazy val masterSnapshot = Artifact(determineLatestSnapshot(), true)
lazy val mainSnapshot = Artifact(determineLatestSnapshot(), true)

val akkaVersion: String = default match {
case Artifact(version, _) => version
Expand Down

0 comments on commit fb68933

Please sign in to comment.