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

update building infrastructure #201

Merged
merged 2 commits into from
Apr 25, 2024
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ jobs:
strategy:
matrix:
scala:
- 2.13.10
- 2.12.17
- 2.13.13

steps:
- uses: actions/checkout@v2
Expand All @@ -21,7 +20,7 @@ jobs:
- name: scala
uses: olafurpg/setup-scala@v10
with:
java-version: openjdk@1.11
java-version: openjdk@1.17

- name: build ${{ matrix.scala }}
run: sbt ++${{ matrix.scala }} clean coverage test
Expand Down
23 changes: 10 additions & 13 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,18 @@ import Dependencies._
name := "sharding-strategy"

organization := "com.evolutiongaming"

homepage := Some(new URL("http://github.com/evolution-gaming/sharding-strategy"))

startYear := Some(2018)

organizationName := "Evolution"
organizationHomepage := Some(url("https://evolution.com"))
homepage := Some(url("https://github.com/evolution-gaming/sharding-strategy"))
startYear := Some(2018)

organizationHomepage := Some(url("http://evolution.com"))

crossScalaVersions := Seq("2.13.13")
scalaVersion := crossScalaVersions.value.head

crossScalaVersions := Seq("2.13.10", "2.12.17")

scalacOptions -= "-Ywarn-unused:params"

scalacOptions := Seq(
"-release:17",
"-Xsource:3-cross",
)
releaseCrossBuild := true
publishTo := Some(Resolver.evolutionReleases)

libraryDependencies ++= Seq(
Expand All @@ -35,4 +32,4 @@ libraryDependencies ++= Seq(

licenses := Seq(("MIT", url("https://opensource.org/licenses/MIT")))

releaseCrossBuild := true
addCommandAlias("build", "all compile test")
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import sbt._

object Dependencies {

val scalatest = "org.scalatest" %% "scalatest" % "3.2.9"
val scalatest = "org.scalatest" %% "scalatest" % "3.2.11"
val `executor-tools` = "com.evolutiongaming" %% "executor-tools" % "1.0.2"
val `cats-helper` = "com.evolutiongaming" %% "cats-helper" % "3.6.0"
val `ddata-tools` = "com.evolutiongaming" %% "ddata-tools" % "4.0.0"
Expand Down
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.11")

addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.2.7")
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.11")

addSbtPlugin("com.github.sbt" % "sbt-release" % "1.0.15")
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.4.0")

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
package com.evolutiongaming.cluster.sharding

import akka.actor._
import akka.actor.*
import akka.cluster.ddata.Replicator.{WriteConsistency, WriteLocal}
import akka.cluster.ddata._
import akka.cluster.ddata.*
import akka.cluster.sharding.ShardRegion
import akka.cluster.sharding.ShardRegion.ExtractShardId
import cats.effect.syntax.resource._
import cats.effect.syntax.resource.*
import cats.effect.{Ref, Resource, Sync}
import cats.implicits._
import cats.implicits.*
import cats.{Applicative, FlatMap, Monad, Parallel, ~>}
import com.evolutiongaming.catshelper._
import com.evolutiongaming.catshelper.*
import com.evolutiongaming.cluster.ddata.SafeReplicator
import com.evolutiongaming.cluster.sharding.AdaptiveStrategy.Counters

import scala.concurrent.duration._
import scala.concurrent.duration.*
import scala.concurrent.{ExecutionContext, Future}

/**
Expand Down Expand Up @@ -361,7 +361,7 @@ object AdaptiveStrategy {

object Ext extends ExtensionId[Ext] {

def createExtension(system: ExtendedActorSystem) = new Ext {
def createExtension(system: ExtendedActorSystem): Ext = new Ext {
val replicatorRef = {
val settings = ReplicatorSettings(system)
val props = Replicator.props(settings)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ object AddressOf {

def apply(actorSystem: ActorSystem): AddressOf = {
val absoluteAddress = AbsoluteAddress(actorSystem)
region: Region => absoluteAddress(region.path.address)
(region: Region) => absoluteAddress(region.path.address)
}


def const(address: Address): AddressOf = new AddressOf {
def apply(region: Region) = address
def apply(region: Region): Address = address
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.evolutiongaming.cluster.sharding

import akka.actor.ActorRef
import cats.effect.Sync
import cats.implicits._
import cats.implicits.*

import scala.util.Random

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.evolutiongaming.cluster.sharding

import cats.Applicative
import cats.implicits._
import cats.implicits.*

object LeastShardsStrategy {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ package com.evolutiongaming.cluster.sharding

import akka.actor.{ActorRef, ActorRefFactory, ActorSystem, Address, ExtendedActorSystem, Extension, ExtensionId}
import akka.cluster.ddata.Replicator.{ReadConsistency, ReadLocal, WriteConsistency, WriteLocal}
import akka.cluster.ddata._
import akka.cluster.ddata.*
import cats.effect.kernel.Ref
import cats.effect.{Resource, Sync}
import cats.implicits._
import cats.effect.syntax.resource._
import cats.implicits.*
import cats.effect.syntax.resource.*
import cats.{FlatMap, Parallel, ~>}
import com.evolutiongaming.catshelper.{FromFuture, ToFuture}
import com.evolutiongaming.cluster.ddata.SafeReplicator

import scala.concurrent.ExecutionContext
import scala.concurrent.duration._
import scala.concurrent.duration.*
import scala.util.control.NoStackTrace


Expand Down Expand Up @@ -196,7 +196,7 @@ object MappedStrategy {

object Ext extends ExtensionId[Ext] {

def createExtension(system: ExtendedActorSystem) = new Ext {
def createExtension(system: ExtendedActorSystem): Ext = new Ext {
val replicatorRef = {
val settings = ReplicatorSettings(system)
val props = Replicator.props(settings)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.evolutiongaming.cluster.sharding

import cats.Applicative
import cats.implicits._
import cats.implicits.*

object RebalanceAllStrategy {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.evolutiongaming.cluster.sharding

import akka.actor.ActorRef
import cats.Applicative
import cats.implicits._
import cats.implicits.*

object RemoteNodeStrategy {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package com.evolutiongaming.cluster.sharding

import akka.cluster.sharding.ShardCoordinator.ShardAllocationStrategy
import cats.effect.{Clock, Ref, Sync}
import cats.implicits._
import cats.implicits.*
import cats.{Applicative, FlatMap, Monad, ~>}
import com.evolutiongaming.catshelper.ClockHelper._
import com.evolutiongaming.catshelper.ClockHelper.*
import com.evolutiongaming.catshelper.ToFuture

import scala.concurrent.duration.FiniteDuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.evolutiongaming.cluster.sharding

import akka.cluster.sharding.ShardCoordinator.ShardAllocationStrategy
import cats.FlatMap
import cats.implicits._
import cats.implicits.*
import com.evolutiongaming.catshelper.FromFuture

object ShardingStrategyProxy {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.evolutiongaming.cluster.sharding

import akka.actor.Address
import cats.Applicative
import cats.implicits._
import cats.implicits.*

object SingleNodeStrategy {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ class AbsoluteAddressSpec extends AnyFunSuite with ActorSpec with Matchers {

test("AbsoluteAddress") {

def actor() = new Actor {
def receive = PartialFunction.empty
def actor(): Actor = new Actor {
def receive: Actor.Receive = PartialFunction.empty
}

val props = Props(actor())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import akka.actor.Address
import cats.arrow.FunctionK
import cats.effect.{IO, Ref}
import com.evolutiongaming.cluster.sharding.AdaptiveStrategy.Counters
import com.evolutiongaming.cluster.sharding.IOSuite._
import com.evolutiongaming.cluster.sharding.IOSuite.*
import org.scalatest.funsuite.AsyncFunSuite
import org.scalatest.matchers.should.Matchers
import scala.collection.immutable.IndexedSeq
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ package com.evolutiongaming.cluster.sharding

import cats.effect.IO
import com.evolutiongaming.catshelper.FromFuture
import com.evolutiongaming.cluster.sharding.AllocationStrategyHelper._
import com.evolutiongaming.cluster.sharding.IOSuite._
import com.evolutiongaming.cluster.sharding.AllocationStrategyHelper.*
import com.evolutiongaming.cluster.sharding.IOSuite.*
import org.scalatest.funsuite.AsyncFunSuite
import org.scalatest.matchers.should.Matchers
import scala.collection.immutable.IndexedSeq
import cats.effect.unsafe.implicits.global

import scala.concurrent.duration._
import scala.concurrent.duration.*

class AllocationStrategyProxySpec extends AsyncFunSuite with ActorSpec with Matchers {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.evolutiongaming.cluster.sharding

import cats.effect.IO
import cats.implicits._
import com.evolutiongaming.cluster.sharding.IOSuite._
import cats.implicits.*
import com.evolutiongaming.cluster.sharding.IOSuite.*

import scala.collection.immutable.IndexedSeq
import org.scalatest.funsuite.AsyncFunSuite
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import cats.effect.unsafe.implicits.global
import com.evolutiongaming.catshelper.FromFuture
import org.scalatest.Succeeded

import scala.concurrent.duration._
import scala.concurrent.duration.*
import scala.concurrent.{ExecutionContext, ExecutionContextExecutor, Future}

object IOSuite {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.evolutiongaming.cluster.sharding

import akka.actor.Address
import cats.implicits._
import cats.implicits.*

import scala.collection.immutable.IndexedSeq
import org.scalatest.funsuite.AnyFunSuite
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package com.evolutiongaming.cluster.sharding

import akka.actor.Address
import cats.Id
import cats.implicits._
import cats.implicits.*
import cats.catsParallelForId

import scala.collection.immutable.IndexedSeq
import org.scalatest.funsuite.AnyFunSuite
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import akka.actor.{Actor, ActorRef, ActorSystem, Props}
object RegionOf {

def apply(actorSystem: ActorSystem): ActorRef = {
def actor() = new Actor {
def receive = PartialFunction.empty
def actor(): Actor = new Actor {
def receive: Actor.Receive = PartialFunction.empty
}

val props = Props(actor())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.evolutiongaming.cluster.sharding

import akka.actor.Address
import cats.Id
import cats.implicits._
import cats.implicits.*

import scala.collection.immutable.IndexedSeq
import org.scalatest.funsuite.AnyFunSuite
Expand Down
Loading