-
Notifications
You must be signed in to change notification settings - Fork 12
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
Give some love to the project #150
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
import BuildConfig._ | ||
import BuildConfig.* | ||
|
||
val scala212 = "2.12.19" | ||
val scala213 = "2.13.14" | ||
val scala3 = "3.3.3" | ||
Global / onChangedBuildSource := ReloadOnSourceChanges | ||
|
||
val scala212 = "2.12.20" | ||
val scala213 = "2.13.15" | ||
val scala3 = "3.3.4" | ||
|
||
val allScalaVersions = List(scala212, scala213, scala3) | ||
val documentationScalaVersion = scala213 | ||
|
@@ -14,8 +16,8 @@ ThisBuild / projectStableVersion := { | |
else (ThisBuild / version).value | ||
} | ||
|
||
ThisBuild / organization := "dev.vhonta" | ||
ThisBuild / versionScheme := Some("early-semver") | ||
ThisBuild / organization := "dev.vhonta" | ||
ThisBuild / versionScheme := Some("early-semver") | ||
ThisBuild / sonatypeCredentialHost := "s01.oss.sonatype.org" | ||
ThisBuild / sonatypeRepository := "https://s01.oss.sonatype.org/service/local" | ||
|
||
|
@@ -39,7 +41,7 @@ val publishSettings = Seq( | |
id = "vitaliihonta", | ||
name = "Vitalii Honta", | ||
email = "[email protected]", | ||
url = new URL("https://github.com/vitaliihonta") | ||
url = url("https://github.com/vitaliihonta") | ||
) | ||
) | ||
) | ||
|
@@ -55,6 +57,8 @@ lazy val coverageSettings = Seq( | |
) | ||
|
||
lazy val baseProjectSettings = Seq( | ||
scalaVersion := scala213, | ||
crossScalaVersions := allScalaVersions, | ||
scalacOptions ++= { | ||
Comment on lines
+60
to
+61
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added this because the scala version used by default in each module was a bit chaotic. You can see that by running |
||
val baseOptions = Seq( | ||
"-language:implicitConversions", | ||
|
@@ -92,6 +96,9 @@ val baseLibSettings = baseSettings ++ publishSettings | |
lazy val root = project | ||
.in(file(".")) | ||
.settings(baseSettings, noPublishSettings, unidocSettings) | ||
.settings( | ||
crossScalaVersions := Nil | ||
) // https://www.scala-sbt.org/1.x/docs/Cross-Build.html#Cross+building+a+project+statefully, | ||
.settings( | ||
name := "zio-temporal-root", | ||
scalaVersion := scala213 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,6 @@ trait ZSearchAttributeMetaEnumInstances { | |
|
||
/** Provides an attribute meta for old [[scala.Enumeration]] | ||
*/ | ||
def enumeration(enum: Enumeration): ZSearchAttributeMeta.Of[enum.Value, ZSearchAttribute.Keyword, String] = | ||
new ZSearchAttributeMeta.KeywordMeta[enum.Value](_.toString, raw => enum.withName(raw)) | ||
def enumeration(`enum`: Enumeration): ZSearchAttributeMeta.Of[`enum`.Value, ZSearchAttribute.Keyword, String] = | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was emitting a warning telling that |
||
new ZSearchAttributeMeta.KeywordMeta[`enum`.Value](_.toString, raw => `enum`.withName(raw)) | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -156,34 +156,34 @@ object ZSearchAttributeMeta extends ZSearchAttributeMetaCollectionInstances with | |
override def decode(value: A): A = value | ||
} | ||
|
||
private final object StringMeta extends SimplePlainMeta[String] { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was emitting a warning saying that the |
||
private object StringMeta extends SimplePlainMeta[String] { | ||
override def underlyingAttributeKey(name: String): SearchAttributeKey[String] = { | ||
SearchAttributeKey.forText(name) | ||
} | ||
} | ||
|
||
private final object BooleanMeta extends SimplePlainMeta[Boolean] { | ||
private object BooleanMeta extends SimplePlainMeta[Boolean] { | ||
override def underlyingAttributeKey(name: String): SearchAttributeKey[Boolean] = { | ||
// safe to cast java.lang.Boolean to Boolean | ||
SearchAttributeKey.forBoolean(name).asInstanceOf[SearchAttributeKey[Boolean]] | ||
} | ||
} | ||
|
||
private final object LongMeta extends SimplePlainMeta[Long] { | ||
private object LongMeta extends SimplePlainMeta[Long] { | ||
override def underlyingAttributeKey(name: String): SearchAttributeKey[Long] = { | ||
// safe to cast java.lang.Long to Long | ||
SearchAttributeKey.forLong(name).asInstanceOf[SearchAttributeKey[Long]] | ||
} | ||
} | ||
|
||
private final object DoubleMeta extends SimplePlainMeta[Double] { | ||
private object DoubleMeta extends SimplePlainMeta[Double] { | ||
override def underlyingAttributeKey(name: String): SearchAttributeKey[Double] = { | ||
// safe to cast java.lang.Double to Double | ||
SearchAttributeKey.forDouble(name).asInstanceOf[SearchAttributeKey[Double]] | ||
} | ||
} | ||
|
||
private final object OffsetDateTimeMeta extends SimplePlainMeta[OffsetDateTime] { | ||
private object OffsetDateTimeMeta extends SimplePlainMeta[OffsetDateTime] { | ||
override def underlyingAttributeKey(name: String): SearchAttributeKey[OffsetDateTime] = { | ||
SearchAttributeKey.forOffsetDateTime(name) | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -226,7 +226,7 @@ object ZAsync { | |
)(f: A => ZAsync[B] | ||
)(implicit bf: BuildFrom[Collection[A], B, Collection[B]] | ||
): ZAsync[Collection[B]] = | ||
in.foldLeft[ZAsync[mutable.Builder[B, Collection[B]]]](succeed(bf(in)))((acc, a) => acc.zipWith(f(a))(_ += _)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
in.foldLeft[ZAsync[mutable.Builder[B, Collection[B]]]](succeed(bf.newBuilder(in)))((acc, a) => acc.zipWith(f(a))(_ += _)) | ||
.map(_.result()) | ||
|
||
/** Similar to [[zio.ZIO.foreachDiscard]] for collections | ||
|
@@ -371,7 +371,7 @@ object ZAsync { | |
} | ||
} | ||
|
||
final object Result { | ||
object Result { | ||
|
||
final implicit class AllEffectsOps[A](private val self: Result[Cancel with Timeout, A]) extends AnyVal { | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -215,21 +215,21 @@ object ZSaga { | |
|
||
def interpret[A0](saga: ZSaga[A0]): Either[Throwable, A0] = | ||
saga match { | ||
case succeed: Succeed[A0] => Right(succeed.value) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was emitting a warning as the program is not able to type check the |
||
case succeed: Succeed[_] => Right(succeed.value) | ||
case failed: Failed => Left(failed.error) | ||
case attempt: Attempt[A0] => Try(attempt.thunk()).toEither | ||
case attempt: Attempt[_] => Try(attempt.thunk()).toEither | ||
|
||
case compensation: Compensation[A0] => | ||
case compensation: Compensation[_] => | ||
temporalSaga.addCompensation((() => compensation.compensate()): Proc) | ||
interpret(compensation.cont) | ||
|
||
case cont: Bind[baseA, A0] => | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What was |
||
case cont: Bind[_, _] => | ||
interpret(cont.base) match { | ||
case left @ Left(_) => left.asInstanceOf[Either[Throwable, A0]] | ||
case Right(value) => interpret(cont.cont(value)) | ||
} | ||
|
||
case catchAll: CatchAll[A0] => | ||
case catchAll: CatchAll[_] => | ||
interpret(catchAll.base) match { | ||
case right: Right[Throwable, A0] => right | ||
case Left(error) => interpret(catchAll.handle(error)) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,6 @@ class ZioLocalWorkflowImpl extends ZioLocalWorkflow { | |
|
||
override def complete(): Unit = { | ||
logger.info("Completion received!") | ||
state := () | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was emitting a warning saying that this syntax was deprecated |
||
state := (()) | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version = 1.10.1 | ||
sbt.version = 1.10.7 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") | ||
addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.10.0") | ||
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.6.0") | ||
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.1.0") | ||
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.5.4") | ||
addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.10.1") | ||
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.9.2") | ||
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.2.2") | ||
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.6.2") | ||
addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0") | ||
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.12.0") | ||
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.13.1") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was emitting a deprecation warning