Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename akka package to org.apache.pekko #34

Merged
merged 1 commit into from
Feb 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,16 @@ an error like this:

```
[info] pekko-stream: found 1 potential binary incompatibilities while checking against org.apache.pekko:pekko-stream_2.11:2.4.2 (filtered 222)
[error] * method foldAsync(java.lang.Object,scala.Function2)akka.stream.scaladsl.FlowOps in trait akka.stream.scaladsl.FlowOps is present only in current version
[error] filter with: ProblemFilters.exclude[ReversedMissingMethodProblem]("akka.stream.scaladsl.FlowOps.foldAsync")
[error] * method foldAsync(java.lang.Object,scala.Function2)org.apache.pekko.stream.scaladsl.FlowOps in trait org.apache.pekko.stream.scaladsl.FlowOps is present only in current version
[error] filter with: ProblemFilters.exclude[ReversedMissingMethodProblem]("org.apache.pekko.stream.scaladsl.FlowOps.foldAsync")
```

In such situations it's good to consult with a core team member if the violation can be safely ignored (by adding the above snippet to the project's
`src/main/mima-filters`), or if it would indeed break binary compatibility.

Situations when it may be fine to ignore a MiMa issued warning include:

- if it is touching any class marked as `private[akka]`, `/** INTERNAL API*/` or similar markers
- if it is touching any class marked as `private[pekko]`, `/** INTERNAL API*/` or similar markers
- if it is concerning internal classes (often recognizable by package names like `dungeon`, `impl`, `internal` etc.)
- if it is adding API to classes / traits which are only meant for extension by Pekko itself, i.e. should not be extended by end-users
- if it is touching any class marked with the `@InternalApi`, `@DoNotInherit`, and `@ApiMayChange`. See [API stability annotations and comments](https://doc.akka.io/docs/akka/current/common/binary-compatibility-rules.html#api-stability-annotations-and-comments)
Expand Down
76 changes: 38 additions & 38 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import akka._
import akka.ValidatePullRequest._
import AkkaDependency._
import PekkoDependency._
import Dependencies.{ h2specExe, h2specName }
import com.typesafe.sbt.SbtMultiJvm.MultiJvmKeys.MultiJvm
import java.nio.file.Files
Expand Down Expand Up @@ -35,7 +35,7 @@ inThisBuild(Def.settings(
concurrentRestrictions in Global += Tags.limit(Tags.Test, 1),
onLoad in Global := {
sLog.value.info(
s"Building Pekko HTTP ${version.value} against Pekko ${AkkaDependency.akkaVersion} on Scala ${(httpCore / scalaVersion).value}")
s"Building Pekko HTTP ${version.value} against Pekko ${PekkoDependency.pekkoVersion} on Scala ${(httpCore / scalaVersion).value}")
(onLoad in Global).value
},
scalafixScalaBinaryVersion := scalaBinaryVersion.value))
Expand Down Expand Up @@ -128,7 +128,7 @@ lazy val parsing = project("parsing")
.settings(commonSettings)
.settings(AutomaticModuleName.settings("pekko.http.parsing"))
.settings(MetaInfLicenseNoticeCopy.settings)
.addAkkaModuleDependency("akka-actor", "provided")
.addPekkoModuleDependency("pekko-actor", "provided")
.settings(Dependencies.parsing)
.settings(
scalacOptions --= Seq("-Xfatal-warnings", "-Xlint", "-Ywarn-dead-code"), // disable warnings for parboiled code
Expand All @@ -143,13 +143,13 @@ lazy val httpCore = project("http-core")
.settings(AutomaticModuleName.settings("pekko.http.core"))
.settings(MetaInfLicenseNoticeCopy.settings)
.dependsOn(parsing, httpScalafixRules % ScalafixConfig)
.addAkkaModuleDependency("akka-stream", "provided")
.addAkkaModuleDependency(
"akka-stream-testkit",
.addPekkoModuleDependency("pekko-stream", "provided")
.addPekkoModuleDependency(
"pekko-stream-testkit",
"test",
akka =
if (System.getProperty("akka.http.test-against-akka-main", "false") == "true") AkkaDependency.masterSnapshot
else AkkaDependency.default)
pekko =
if (System.getProperty("pekko.http.test-against-pekko-main", "false") == "true") PekkoDependency.masterSnapshot
else PekkoDependency.default)
.settings(Dependencies.httpCore)
.settings(VersionGenerator.versionSettings)
.settings(scalaMacroSupport)
Expand All @@ -161,7 +161,7 @@ lazy val http = project("http")
.settings(AutomaticModuleName.settings("pekko.http"))
.settings(MetaInfLicenseNoticeCopy.settings)
.dependsOn(httpCore)
.addAkkaModuleDependency("akka-stream", "provided")
.addPekkoModuleDependency("pekko-stream", "provided")
.settings(Dependencies.http)
.settings(
Compile / scalacOptions += "-language:_")
Expand All @@ -181,8 +181,8 @@ lazy val http2Support = project("http2-support")
.settings(AutomaticModuleName.settings("pekko.http.http2"))
.settings(MetaInfLicenseNoticeCopy.settings)
.dependsOn(httpCore, httpTestkit % "test", httpCore % "test->test")
.addAkkaModuleDependency("akka-stream", "provided")
.addAkkaModuleDependency("akka-stream-testkit", "test")
.addPekkoModuleDependency("pekko-stream", "provided")
.addPekkoModuleDependency("pekko-stream-testkit", "test")
.settings(Dependencies.http2)
.settings(Dependencies.http2Support)
.settings {
Expand Down Expand Up @@ -223,14 +223,14 @@ lazy val httpTestkit = project("http-testkit")
.settings(AutomaticModuleName.settings("pekko.http.testkit"))
.settings(MetaInfLicenseNoticeCopy.settings)
.dependsOn(http)
.addAkkaModuleDependency("akka-stream-testkit", "provided")
.addAkkaModuleDependency("akka-testkit", "provided")
.addPekkoModuleDependency("pekko-stream-testkit", "provided")
.addPekkoModuleDependency("pekko-testkit", "provided")
.settings(Dependencies.httpTestkit)
.settings(
// don't ignore Suites which is the default for the junit-interface
testOptions += Tests.Argument(TestFrameworks.JUnit, "--ignore-runners="),
Compile / scalacOptions ++= Seq("-language:_"),
Test / run / mainClass := Some("akka.http.javadsl.SimpleServerApp"))
Test / run / mainClass := Some("org.apache.pekko.http.javadsl.SimpleServerApp"))
.enablePlugins(BootstrapGenjavadoc, MultiNodeScalaTest, ScaladocNoVerificationOfDiagrams)
.enablePlugins(ReproducibleBuildsPlugin)
.disablePlugins(MimaPlugin) // testkit, no bin compat guaranteed
Expand All @@ -247,8 +247,8 @@ lazy val httpTests = project("http-tests")
.configs(MultiJvm)
.settings(headerSettings(MultiJvm))
.settings(ValidatePR / additionalTasks += MultiJvm / headerCheck)
.addAkkaModuleDependency("akka-stream", "provided")
.addAkkaModuleDependency("akka-multi-node-testkit", "test")
.addPekkoModuleDependency("pekko-stream", "provided")
.addPekkoModuleDependency("pekko-multi-node-testkit", "test")
.settings(
// Fix to reenable scala-steward, see https://gitter.im/scala-steward-org/scala-steward?at=6183bb66d78911028a1b7cd8
// Putting that jar file with the complicated name into the git tree directly breaks if something in the environment
Expand All @@ -267,7 +267,7 @@ lazy val httpTests = project("http-tests")
lazy val httpJmhBench = project("http-bench-jmh")
.settings(commonSettings)
.dependsOn(http, http2Support % "compile->compile,test")
.addAkkaModuleDependency("akka-stream")
.addPekkoModuleDependency("pekko-stream")
.enablePlugins(JmhPlugin)
.enablePlugins(NoPublish) // don't release benchs
.disablePlugins(MimaPlugin)
Expand All @@ -282,14 +282,14 @@ lazy val httpXml =
httpMarshallersScalaSubproject("xml")
.settings(AutomaticModuleName.settings("pekko.http.marshallers.scalaxml"))
.settings(MetaInfLicenseNoticeCopy.settings)
.addAkkaModuleDependency("akka-stream", "provided")
.addPekkoModuleDependency("pekko-stream", "provided")
.settings(Dependencies.httpXml)

lazy val httpSprayJson =
httpMarshallersScalaSubproject("spray-json")
.settings(AutomaticModuleName.settings("pekko.http.marshallers.sprayjson"))
.settings(MetaInfLicenseNoticeCopy.settings)
.addAkkaModuleDependency("akka-stream", "provided")
.addPekkoModuleDependency("pekko-stream", "provided")
.settings(Dependencies.httpSprayJson)

lazy val httpMarshallersJava = project("http-marshallers-java")
Expand All @@ -302,8 +302,8 @@ lazy val httpJackson =
httpMarshallersJavaSubproject("jackson")
.settings(AutomaticModuleName.settings("pekko.http.marshallers.jackson"))
.settings(MetaInfLicenseNoticeCopy.settings)
.addAkkaModuleDependency("akka-stream", "provided")
.addAkkaModuleDependency("akka-stream-testkit", "test")
.addPekkoModuleDependency("pekko-stream", "provided")
.addPekkoModuleDependency("pekko-stream-testkit", "test")
.dependsOn(httpTestkit % "test")
.settings(Dependencies.httpJackson)
.enablePlugins(ScaladocNoVerificationOfDiagrams)
Expand All @@ -314,8 +314,8 @@ lazy val httpCaching = project("http-caching")
.settings(commonSettings)
.settings(AutomaticModuleName.settings("pekko.http.caching"))
.settings(MetaInfLicenseNoticeCopy.settings)
.addAkkaModuleDependency("akka-stream", "provided")
.addAkkaModuleDependency("akka-stream-testkit", "provided")
.addPekkoModuleDependency("pekko-stream", "provided")
.addPekkoModuleDependency("pekko-stream-testkit", "provided")
.settings(Dependencies.httpCaching)
.dependsOn(http, httpCore, httpTestkit % "test")
.enablePlugins(BootstrapGenjavadoc)
Expand Down Expand Up @@ -361,7 +361,7 @@ lazy val httpScalafixRules =
lazy val httpScalafixTestInput =
Project(id = "http-scalafix-test-input", base = file("http-scalafix/scalafix-test-input"))
.dependsOn(http)
.addAkkaModuleDependency("akka-stream")
.addPekkoModuleDependency("pekko-stream")
.enablePlugins(NoPublish)
.disablePlugins(MimaPlugin, HeaderPlugin /* because it gets confused about metaheader required for tests */ )
.settings(
Expand All @@ -375,7 +375,7 @@ lazy val httpScalafixTestInput =
lazy val httpScalafixTestOutput =
Project(id = "http-scalafix-test-output", base = file("http-scalafix/scalafix-test-output"))
.dependsOn(http)
.addAkkaModuleDependency("akka-stream")
.addPekkoModuleDependency("pekko-stream")
.enablePlugins(NoPublish)
.disablePlugins(MimaPlugin, HeaderPlugin /* because it gets confused about metaheader required for tests */ )

Expand All @@ -402,11 +402,11 @@ lazy val httpScalafixTests =
lazy val docs = project("docs")
.enablePlugins(ParadoxPlugin, NoPublish, PublishRsyncPlugin)
.disablePlugins(MimaPlugin)
.addAkkaModuleDependency("akka-stream", "provided", AkkaDependency.docs)
.addAkkaModuleDependency("akka-actor-typed", "provided", AkkaDependency.docs)
.addAkkaModuleDependency("akka-multi-node-testkit", "provided", AkkaDependency.docs)
.addAkkaModuleDependency("akka-stream-testkit", "provided", AkkaDependency.docs)
.addAkkaModuleDependency("akka-actor-testkit-typed", "provided", AkkaDependency.docs)
.addPekkoModuleDependency("pekko-stream", "provided", PekkoDependency.docs)
.addPekkoModuleDependency("pekko-actor-typed", "provided", PekkoDependency.docs)
.addPekkoModuleDependency("pekko-multi-node-testkit", "provided", PekkoDependency.docs)
.addPekkoModuleDependency("pekko-stream-testkit", "provided", PekkoDependency.docs)
.addPekkoModuleDependency("pekko-actor-testkit-typed", "provided", PekkoDependency.docs)
.dependsOn(
httpCore, http, httpXml, http2Support, httpMarshallersJava, httpMarshallersScala, httpCaching,
httpTests % "compile;test->test", httpTestkit % "compile;test->test", httpScalafixRules % ScalafixConfig)
Expand Down Expand Up @@ -438,29 +438,29 @@ lazy val docs = project("docs")
Compile / paradoxProperties ++= Map(
"project.name" -> "Apache Pekko HTTP",
"canonical.base_url" -> "https://pekko.apache.org/docs/akka-http/current",
"akka.version" -> AkkaDependency.docs.version,
"akka.minimum.version25" -> AkkaDependency.minimumExpectedAkkaVersion,
"akka.minimum.version26" -> AkkaDependency.minimumExpectedAkka26Version,
"akka.version" -> PekkoDependency.docs.version,
"akka.minimum.version25" -> PekkoDependency.minimumExpectedPekkoVersion,
"akka.minimum.version26" -> PekkoDependency.minimumExpectedPekko26Version,
"jackson.xml.version" -> Dependencies.jacksonXmlVersion,
"scalafix.version" -> _root_.scalafix.sbt.BuildInfo.scalafixVersion, // grab from scalafix plugin directly
"extref.pekko-docs.base_url" -> s"https://pekko.apache.org/docs/pekko/current/%s",
"javadoc.akka.http.base_url" -> {
val v = if (isSnapshot.value) "current" else version.value
s"https://doc.akka.io/japi/akka-http/$v"
},
"javadoc.akka.base_url" -> s"https://doc.akka.io/japi/akka/${AkkaDependency.docs.link}",
"javadoc.akka.base_url" -> s"https://doc.akka.io/japi/akka/${PekkoDependency.docs.link}",
"javadoc.akka.link_style" -> "direct",
"scaladoc.akka.http.base_url" -> {
val v = if (isSnapshot.value) "current" else version.value
s"https://doc.akka.io/api/akka-http/$v"
},
"scaladoc.akka.base_url" -> s"https://doc.akka.io/api/akka/${AkkaDependency.docs.link}",
"scaladoc.akka.base_url" -> s"https://doc.akka.io/api/akka/${PekkoDependency.docs.link}",
"algolia.docsearch.api_key" -> "0ccbb8bf5148554a406fbf07df0a93b9",
"algolia.docsearch.index_name" -> "akka-http",
"google.analytics.account" -> "UA-21117439-1",
"google.analytics.domain.name" -> "akka.io",
"github.base_url" -> GitHub.url(version.value, isSnapshot.value)),
apidocRootPackage := "akka",
apidocRootPackage := "org.apache.pekko",
ValidatePR / additionalTasks += Compile / paradox,
ThisBuild / publishRsyncHost := "akkarepo@gustav.akka.io",
publishRsyncArtifacts := List((Compile / paradox).value -> gustavDir("docs").value))
Expand All @@ -470,7 +470,7 @@ lazy val docs = project("docs")
lazy val compatibilityTests = Project("http-compatibility-tests", file("http-compatibility-tests"))
.enablePlugins(NoPublish)
.disablePlugins(MimaPlugin)
.addAkkaModuleDependency("akka-stream", "provided")
.addPekkoModuleDependency("pekko-stream", "provided")
.settings(
libraryDependencies ++= Seq(
"org.apache.pekko" %% "pekko-http" % MiMa.latest101Version % "provided",
Expand Down
6 changes: 3 additions & 3 deletions docs/src/main/paradox/client-side/client-https-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ The central vehicle for configuring encryption is the @apidoc[HttpsConnectionCon
the static methods on @apidoc[ConnectionContext]:

Scala
: @@snip[ConnectionContext.scala](/http-core/src/main/scala/akka/http/scaladsl/ConnectionContext.scala) { #https-client-context-creation }
: @@snip[ConnectionContext.scala](/http-core/src/main/scala/org/apache/pekko/http/scaladsl/ConnectionContext.scala) { #https-client-context-creation }

Java
: @@snip [ConnectionContext.scala](/http-core/src/main/scala/akka/http/javadsl/ConnectionContext.scala) { #https-client-context-creation }
: @@snip [ConnectionContext.scala](/http-core/src/main/scala/org/apache/pekko/http/javadsl/ConnectionContext.scala) { #https-client-context-creation }

In addition to the `outgoingConnection`, `newHostConnectionPool` and `cachedHostConnectionPool` methods the
@scala[@scaladoc[akka.http.scaladsl.Http](akka.http.scaladsl.Http$)]@java[@javadoc[akka.http.javadsl.Http](akka.http.javadsl.Http)]
@scala[@scaladoc[org.apache.pekko.http.scaladsl.Http](akka.http.scaladsl.Http$)]@java[@javadoc[org.apache.pekko.http.javadsl.Http](akka.http.javadsl.Http)]
extension also defines `outgoingConnectionHttps`, `newHostConnectionPoolHttps` and
`cachedHostConnectionPoolHttps`. These methods work identically to their counterparts without the `-Https` suffix,
with the exception that all connections will always be encrypted.
Expand Down
6 changes: 3 additions & 3 deletions docs/src/main/paradox/client-side/client-transport.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

The client side infrastructure has support to plug different transport mechanisms underneath (the API may still change in the future). A client side
transport is represented by an instance of
@scala[@scaladoc[akka.http.scaladsl.ClientTransport](akka.http.scaladsl.ClientTransport)]@java[@javadoc[akka.http.javadsl.ClientTransport](akka.http.javadsl.ClientTransport)]:
@scala[@scaladoc[org.apache.pekko.http.scaladsl.ClientTransport](akka.http.scaladsl.ClientTransport)]@java[@javadoc[org.apache.pekko.http.javadsl.ClientTransport](akka.http.javadsl.ClientTransport)]:

Scala
: @@snip [ClientTransport.scala](/http-core/src/main/scala/akka/http/scaladsl/ClientTransport.scala) { #client-transport-definition }
: @@snip [ClientTransport.scala](/http-core/src/main/scala/org/apache/pekko/http/scaladsl/ClientTransport.scala) { #client-transport-definition }

Java
: @@snip [ClientTransport.scala](/http-core/src/main/scala/akka/http/javadsl/ClientTransport.scala) { #client-transport-definition }
: @@snip [ClientTransport.scala](/http-core/src/main/scala/org/apache/pekko/http/javadsl/ClientTransport.scala) { #client-transport-definition }

A transport implementation defines how the client infrastructure should communicate with a given host.

Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/paradox/client-side/connection-level.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ On the client-side the stand-alone HTTP layer forms a `BidiStage` stage that "up
It is defined like this:

@@@ div { .group-scala }
@@snip [Http.scala](/http-core/src/main/scala/akka/http/scaladsl/Http.scala) { #client-layer }
@@snip [Http.scala](/http-core/src/main/scala/org/apache/pekko/http/scaladsl/Http.scala) { #client-layer }
@@@
@@@ div { .group-java }
```java
Expand Down
6 changes: 3 additions & 3 deletions docs/src/main/paradox/client-side/host-level.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The best way to get a hold of a connection pool to a given target endpoint is th
method, which returns a @apidoc[Flow] that can be "baked" into an application-level stream setup. This flow is also called
a "pool client flow".

The connection pool underlying a pool client flow is cached. For every @apidoc[akka.actor.ActorSystem], target endpoint and pool
The connection pool underlying a pool client flow is cached. For every @apidoc[org.apache.pekko.actor.ActorSystem], target endpoint and pool
configuration there will never be more than a single pool live at any time.

Also, the HTTP layer transparently manages idle shutdown and restarting of connection pools as configured.
Expand Down Expand Up @@ -140,14 +140,14 @@ shutdown of a specific pool by calling `shutdown()` on the `HostConnectionPool`
flow materializes into. This `shutdown()` call produces a @scala[`Future[Unit]`]@java[`CompletionStage<Done>`] which is fulfilled when the pool
termination has been completed.

It's also possible to trigger the immediate termination of *all* connection pools in the @apidoc[akka.actor.ActorSystem] at the same
It's also possible to trigger the immediate termination of *all* connection pools in the @apidoc[org.apache.pekko.actor.ActorSystem] at the same
time by calling @scala[`Http().shutdownAllConnectionPools()`]@java[`Http.get(system).shutdownAllConnectionPools()`].
This call too produces a @scala[`Future[Unit]`]@java[`CompletionStage<Done>`] which is fulfilled when all pools have terminated.

@scala[`Http().addClientPoolsToCoordinatedShutdown()`]@java[`Http.get(system).addClientPoolsToCoordinatedShutdown()`] will add the client connection pool shutdown to Apache Pekko's @extref[coordinated shutdown](pekko-docs:coordinated-shutdown.html) so it will be called before the actor system disappears.

@@@ note
When encountering unexpected @apidoc[akka.stream.AbruptTerminationException] exceptions during @apidoc[akka.actor.ActorSystem] **shutdown**
When encountering unexpected @apidoc[org.apache.pekko.stream.AbruptTerminationException] exceptions during @apidoc[org.apache.pekko.actor.ActorSystem] **shutdown**
please make sure that active connections are shut down before shutting down the entire system, this can be done by
calling the @scala[`Http().shutdownAllConnectionPools()`]@java[`Http.get(system).shutdownAllConnectionPools()`] method,
and only once its @scala[`Future`]@java[`CompletionStage`] completes, shutting down the actor system.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/paradox/client-side/http2.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ slower to respond to. For HTTP/2 it is therefore important to have a way to corr
it was made for. This can be achieved through a @apidoc[RequestResponseAssociation] set on the request, Apache Pekko HTTP will pass
such association objects on to the response.

In this sample the built-in @scala[`akka.http.scaladsl.model.ResponsePromise`]@java[`akka.http.javadsl.model.ResponseFuture`] `RequestResponseAssociation` is used to return
In this sample the built-in @scala[`org.apache.pekko.http.scaladsl.model.ResponsePromise`]@java[`org.apache.pekko.http.javadsl.model.ResponseFuture`] `RequestResponseAssociation` is used to return
a @scala[`Future`]@java[`CompletionStage`] for the response:

Scala
Expand Down
Loading