Skip to content

Commit f2b677d

Browse files
authored
remove scala 2.12 support (#1986)
* remove scala 2.12 support * move around some source because we don't need as many source dirs * move more files * remove annotations * remove annotations * Create remove-scala-2.12-support.excludes * remove some scala-2.12 refs * remove compat.PartialFunction * Update remove-scala-2.12-support.excludes
1 parent 0f6def6 commit f2b677d

File tree

120 files changed

+31
-3597
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+31
-3597
lines changed

.github/workflows/dependency-graph.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ jobs:
3939
- uses: scalacenter/sbt-dependency-submission@64084844d2b0a9b6c3765f33acde2fbe3f5ae7d3 # v3.1.0
4040
with:
4141
configs-ignore: provided optional test TestJdk9 compile-internal runtime-internal pr-validation multi-jvm scala-tool scala-doc-tool
42-
modules-ignore: pekko-bench-jmh_2.12 pekko-docs_2.12 pekko-bench-jmh_2.13 pekko-docs_2.13 pekko-bench-jmh_3 pekko-docs_3
42+
modules-ignore: pekko-bench-jmh_2.13 pekko-docs_2.13 pekko-bench-jmh_3 pekko-docs_3

.github/workflows/nightly-builds.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ jobs:
114114
# No need to specify the full Scala version. Only the Scala
115115
# binary version is required and Pekko build will set the right
116116
# full version from it.
117-
scalaVersion: ["2.12.x", "2.13.x", "3.3.x"]
117+
scalaVersion: ["2.13.x", "3.3.x"]
118118
javaVersion: [17, 21]
119119
env:
120120
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ Pekko uses [MiMa](https://github.com/lightbend/mima) to validate the binary comp
236236
PR fails due to binary compatibility issues, you may see an error like this:
237237
238238
```
239-
[info] stream: found 1 potential binary incompatibilities while checking against org.apache.pekko:pekko-stream_2.12:2.4.2 (filtered 222)
239+
[info] stream: found 1 potential binary incompatibilities while checking against org.apache.pekko:pekko-stream_2.13:2.4.2 (filtered 222)
240240
[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
241241
[error] filter with: ProblemFilters.exclude[ReversedMissingMethodProblem]("org.apache.pekko.stream.scaladsl.FlowOps.foldAsync")
242242
```

LICENSE

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ Copyright (c) 2003-2011, LAMP/EPFL
212212

213213
pekko-actor contains code from scala-collection-compat in the `org.apache.pekko.util.ccompat` package
214214
which has released under an Apache 2.0 license.
215-
- actor/src/main/scala-2.12/org/apache/pekko/util/ccompat/package.scala
215+
- actor/src/main/scala/org/apache/pekko/util/ccompat/package.scala
216216

217217
Scala (https://www.scala-lang.org)
218218

@@ -222,7 +222,6 @@ Copyright EPFL and Lightbend, Inc.
222222

223223
pekko-actor contains code from scala-library in the `org.apache.pekko.util.ccompat` package
224224
and in `org.apache.pekko.util.Helpers.scala` which was released under an Apache 2.0 license.
225-
- actor/src/main/scala-2.12/org/apache/pekko/util/ccompat/package.scala
226225
- actor/src/main/scala/org/apache/pekko/util/Helpers.scala
227226

228227
Scala (https://www.scala-lang.org)

actor-tests/src/test/scala/org/apache/pekko/dispatch/SameThreadExecutionContextSpec.scala

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,8 @@ class SameThreadExecutionContextSpec extends PekkoSpec with Matchers {
2929

3030
"return a Scala specific version" in {
3131
val ec = SameThreadExecutionContext()
32-
if (util.Properties.versionNumberString.startsWith("2.12")) {
33-
ec.getClass.getName should startWith("org.apache.pekko.dispatch.internal.SameThreadExecutionContext")
34-
} else {
35-
// in 2.13 and higher parasitic is available
36-
ec.getClass.getName should ===("scala.concurrent.ExecutionContext$parasitic$")
37-
}
32+
// in Scala 2.13 and higher parasitic is available
33+
ec.getClass.getName should ===("scala.concurrent.ExecutionContext$parasitic$")
3834
}
3935

4036
"should run follow up future operations in the same dispatcher" in {

actor-tests/src/test/scala/org/apache/pekko/util/Scala212CompatTest.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
package org.apache.pekko.util
1919

2020
import org.apache.pekko
21-
import pekko.util.ccompat._
2221
import pekko.util.OptionConverters._
2322

2423
import java.util._
@@ -32,7 +31,6 @@ import scala.annotation.nowarn
3231
* Remove this once Scala 2.12 support is dropped since all methods are in Scala 2.13+ stdlib
3332
*/
3433

35-
@ccompatUsedUntil213
3634
@nowarn("msg=deprecated")
3735
object Scala212CompatTest {
3836

actor-typed/src/main/scala-2.12/org/apache/pekko/actor/typed/internal/receptionist/Platform.scala

Lines changed: 0 additions & 26 deletions
This file was deleted.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
# Remove deprecated method in Scheduler
19+
ProblemFilters.exclude[MissingClassProblem]("org.apache.pekko.compat.PartialFunction")
20+
ProblemFilters.exclude[MissingClassProblem]("org.apache.pekko.compat.PartialFunction$")
21+
ProblemFilters.exclude[MissingClassProblem]("org.apache.pekko.util.ccompat.ccompatUsedUntil213")

actor/src/main/scala-2.12/org/apache/pekko/compat/Future.scala

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)