Skip to content

Commit 4d4e9fb

Browse files
maxerothanmsmiechmr-git
authored
add Scala 3 support (#158)
* add Scala 3 support * update akka to latest - 2.6.21 --------- Co-authored-by: msmiech <[email protected]> Co-authored-by: Mareks Rampāns <[email protected]>
1 parent 69d8e8d commit 4d4e9fb

File tree

12 files changed

+42
-28
lines changed

12 files changed

+42
-28
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ jobs:
1010
strategy:
1111
matrix:
1212
scala:
13-
- 2.13.7
14-
- 2.12.15
13+
- 2.13.14
14+
- 2.12.19
15+
- 3.3.3
1516

1617
steps:
1718
- uses: actions/checkout@v2

.github/workflows/release.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Publish Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
branches: [master]
7+
8+
jobs:
9+
release:
10+
uses: evolution-gaming/scala-github-actions/.github/workflows/release.yml@v1
11+
secrets: inherit

build.sbt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ lazy val commonSettings = Seq(
55
organizationName := "Evolution",
66
organizationHomepage := Some(url("http://evolution.com")),
77
scalaVersion := crossScalaVersions.value.head,
8-
crossScalaVersions := Seq("2.13.7", "2.12.15"),
8+
crossScalaVersions := Seq("2.13.14", "2.12.19", "3.3.3"),
99
Compile / doc / scalacOptions += "-no-link-warnings",
1010
publishTo := Some(Resolver.evolutionReleases),
1111
licenses := Seq(("MIT", url("https://opensource.org/licenses/MIT"))),
@@ -25,10 +25,10 @@ lazy val sequentially = (project
2525
settings (name := "sequentially")
2626
settings commonSettings
2727
settings (libraryDependencies ++= Seq(
28-
"com.typesafe.akka" %% "akka-stream" % "2.6.19",
29-
"com.typesafe.akka" %% "akka-testkit" % "2.6.19" % Test,
30-
"com.evolutiongaming" %% "executor-tools" % "1.0.3",
31-
"com.evolutiongaming" %% "future-helper" % "1.0.6",
28+
"com.typesafe.akka" %% "akka-stream" % "2.6.21",
29+
"com.typesafe.akka" %% "akka-testkit" % "2.6.21" % Test,
30+
"com.evolutiongaming" %% "executor-tools" % "1.0.4",
31+
"com.evolutiongaming" %% "future-helper" % "1.0.7",
3232
"org.scalatest" %% "scalatest" % "3.2.10" % Test)))
3333

3434
lazy val benchmark = (project
@@ -44,5 +44,7 @@ lazy val `sequentially-metrics` = (project
4444
settings commonSettings
4545
dependsOn sequentially
4646
settings (libraryDependencies ++= Seq(
47-
"com.evolutiongaming" %% "prometheus-tools" % "1.0.7"
47+
"com.evolutiongaming" %% "prometheus-tools" % "1.0.8"
4848
)))
49+
50+
addCommandAlias("check", "show version")

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.6.2
1+
sbt.version=1.10.0

project/plugins.sbt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
addSbtPlugin("com.evolution" % "sbt-artifactory-plugin" % "0.0.2")
22

3-
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.3")
3+
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.12")
44

5-
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.1")
5+
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.11")
66

7-
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0")
7+
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.4.0")
88

99
addSbtPlugin("com.evolution" % "sbt-scalac-opts-plugin" % "0.0.9")
1010

sequentially/src/main/scala/com/evolutiongaming/concurrent/sequentially/SequentiallyHandler.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import com.evolutiongaming.concurrent.sequentially.Sequentially.{BufferSize, Sub
77
import com.evolutiongaming.concurrent.sequentially.SourceQueueHelper._
88
import com.evolutiongaming.concurrent.{AvailableProcessors, CurrentThreadExecutionContext}
99

10-
import scala.concurrent.{Future, Promise}
10+
import scala.concurrent.{ExecutionContext, Future, Promise}
1111
import scala.util.control.NonFatal
1212
import scala.util.{Failure, Success}
1313

@@ -97,7 +97,7 @@ object SequentiallyHandler {
9797

9898
private object Now extends SequentiallyHandler[Any] {
9999

100-
private implicit val ec = CurrentThreadExecutionContext
100+
private implicit val ec: ExecutionContext = CurrentThreadExecutionContext
101101

102102
def handler[KK <: Any, T](key: KK)(task: => Future[() => Future[T]]): Future[T] = {
103103
try {

sequentially/src/test/scala/com/evolutiongaming/concurrent/sequentially/AsyncHandlerMapSpec.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ import com.evolutiongaming.concurrent.CurrentThreadExecutionContext
55
import com.evolutiongaming.concurrent.FutureHelper._
66

77
import scala.concurrent.duration._
8-
import scala.concurrent.{Await, Future, Promise}
8+
import scala.concurrent.{Await, ExecutionContext, Future, Promise}
99
import scala.util.control.NoStackTrace
1010
import scala.util.{Failure, Success}
1111
import org.scalatest.matchers.should.Matchers
1212
import org.scalatest.wordspec.AnyWordSpec
1313

1414
class AsyncHandlerMapSpec extends AnyWordSpec with Matchers with ActorSpec {
1515

16-
implicit val ec = CurrentThreadExecutionContext
16+
implicit val ec: ExecutionContext = CurrentThreadExecutionContext
1717

1818
type K = Int
1919
type V = Int
@@ -158,7 +158,7 @@ class AsyncHandlerMapSpec extends AnyWordSpec with Matchers with ActorSpec {
158158
}
159159
}
160160

161-
private implicit val materializer = Materializer(system)
161+
private implicit val materializer: Materializer = Materializer(system)
162162

163163
private trait Scope {
164164
val key: K = 0

sequentially/src/test/scala/com/evolutiongaming/concurrent/sequentially/AsyncMapSpec.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ package com.evolutiongaming.concurrent.sequentially
33
import com.evolutiongaming.concurrent.CurrentThreadExecutionContext
44
import com.evolutiongaming.concurrent.FutureHelper._
55

6-
import scala.concurrent.Promise
6+
import scala.concurrent.{ExecutionContext, Promise}
77
import scala.util.Success
88
import org.scalatest.matchers.should.Matchers
99
import org.scalatest.wordspec.AnyWordSpec
1010

1111
class AsyncMapSpec extends AnyWordSpec with Matchers {
1212

13-
implicit val ec = CurrentThreadExecutionContext
13+
implicit val ec: ExecutionContext = CurrentThreadExecutionContext
1414

1515
"AsyncMap" should {
1616

sequentially/src/test/scala/com/evolutiongaming/concurrent/sequentially/SequentiallyAsyncSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class SequentiallyAsyncSpec extends AnyWordSpec with ActorSpec with Matchers {
9191
bufferSize: Int = Int.MaxValue,
9292
overflowStrategy: OverflowStrategy = OverflowStrategy.backpressure) {
9393

94-
implicit val materializer = Materializer(system)
94+
implicit val materializer: Materializer = Materializer(system)
9595

9696
val sequentially = SequentiallyAsync[Int](bufferSize = bufferSize, overflowStrategy = overflowStrategy)
9797

sequentially/src/test/scala/com/evolutiongaming/concurrent/sequentially/SequentiallyHandlerSpec.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import com.evolutiongaming.concurrent.CurrentThreadExecutionContext
55
import com.evolutiongaming.concurrent.FutureHelper._
66

77
import scala.concurrent.duration._
8-
import scala.concurrent.{Await, Future, Promise, TimeoutException}
8+
import scala.concurrent.{Await, ExecutionContext, Future, Promise, TimeoutException}
99
import scala.util.control.NoStackTrace
1010
import org.scalatest.matchers.should.Matchers
1111
import org.scalatest.wordspec.AnyWordSpec
@@ -106,8 +106,8 @@ class SequentiallyHandlerSpec extends AnyWordSpec with ActorSpec with Matchers {
106106
}
107107
}
108108

109-
implicit val materializer = Materializer(system)
110-
implicit val ec = CurrentThreadExecutionContext
109+
implicit val materializer: Materializer = Materializer(system)
110+
implicit val ec: ExecutionContext = CurrentThreadExecutionContext
111111

112112
private trait Scope {
113113

0 commit comments

Comments
 (0)