Thanks to visit codestin.com
Credit goes to github.com

Skip to content
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
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ jobs:
run: |
sbt docs/mdoc
sbt docs/unidoc

- name: Move Series 1.x Docs To 2.x Docs
working-directory: ./
run: |
Expand All @@ -161,17 +161,17 @@ jobs:
with:
name: website-artifact
path: ./series/2.x/website/build

- name: Print All Generated Files
run: find ./series/2.x/website/build -print

test:
runs-on: ubuntu-20.04
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
scala: ['2.11.12', '2.12.17', '2.13.10', '3.2.0']
scala: ['2.11.12', '2.12.17', '2.13.10', '3.2.2']
java: ['17']
platform: ['JVM']
steps:
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ lazy val core = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.settings(stdSettings("zio"))
.settings(crossProjectSettings)
.settings(buildInfoSettings("zio"))
.settings(libraryDependencies += "dev.zio" %%% "izumi-reflect" % "2.2.2")
.settings(libraryDependencies += "dev.zio" %%% "izumi-reflect" % "2.2.5")
.enablePlugins(BuildInfoPlugin)
.settings(macroDefinitionSettings)
.settings(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package zio

import zio.Experimental._
import zio.test._

import scala.annotation.experimental
Expand All @@ -9,6 +8,8 @@ import scala.language.experimental.saferExceptions
@experimental
object ExperimentalSpec extends ZIOBaseSpec {

import zio.Experimental._

val limit = 10e9
class LimitExceeded extends Exception
def f(x: Double): Double throws LimitExceeded =
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package zio

import java.util.function.IntFunction

private[zio] trait UpdateRuntimeFlagsWithinPlatformSpecific {
// By the virtue of using IntFunction, it does not box.
// Soon available for Scala Native too: https://github.com/scala-native/scala-native/pull/3127
type RuntimeFlagsFunc[A] = IntFunction[A]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package zio

// This is split because `java.util.function.IntFunction` isn't available in Scala Native yet.
// Once it's available, this should be merged together with the `js-jvm` variant back to `shared`.
// https://github.com/scala-native/scala-native/pull/3127
private[zio] trait UpdateRuntimeFlagsWithinPlatformSpecific {
type RuntimeFlagsFunc[A] = Int => A
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw, do we need to mark it as private[zio] too?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if the trait is package private and the only object that extends it is package private there is no need for the members to be package private as well.

}
4 changes: 2 additions & 2 deletions core/shared/src/main/scala/zio/ZIO.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5732,7 +5732,7 @@ object ZIO extends ZIOCompanionPlatformSpecific with ZIOCompanionVersionSpecific

def scope(oldRuntimeFlags: RuntimeFlags): ZIO[R, E, A]
}
private[zio] object UpdateRuntimeFlagsWithin {
private[zio] object UpdateRuntimeFlagsWithin extends UpdateRuntimeFlagsWithinPlatformSpecific {
final case class Interruptible[R, E, A](trace: Trace, effect: ZIO[R, E, A])
extends UpdateRuntimeFlagsWithin[R, E, A] {
def update: RuntimeFlags.Patch = RuntimeFlags.enable(RuntimeFlag.Interruption)
Expand All @@ -5749,7 +5749,7 @@ object ZIO extends ZIOCompanionPlatformSpecific with ZIOCompanionVersionSpecific
extends UpdateRuntimeFlagsWithin[R, E, A] {
def scope(oldRuntimeFlags: RuntimeFlags): ZIO[R, E, A] = f(oldRuntimeFlags)
}
final case class DynamicNoBox[R, E, A](trace: Trace, update: RuntimeFlags.Patch, f: IntFunction[ZIO[R, E, A]])
final case class DynamicNoBox[R, E, A](trace: Trace, update: RuntimeFlags.Patch, f: RuntimeFlagsFunc[ZIO[R, E, A]])
extends UpdateRuntimeFlagsWithin[R, E, A] {
def scope(oldRuntimeFlags: RuntimeFlags): ZIO[R, E, A] = f(oldRuntimeFlags)
}
Expand Down
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ addSbtPlugin("com.typesafe" % "sbt-mima-plugin"
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.7.0")
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.2.0")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.2.0")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.11.0")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.7")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.12.0")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.9")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.3.2")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")
addSbtPlugin("pl.project13.scala" % "sbt-jcstress" % "0.2.0")
Expand Down
2 changes: 1 addition & 1 deletion test/jvm-native/src/main/scala/zio/test/TestDebug.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ private[test] object TestDebug {
}

private def isBlank(input: String): Boolean =
input.chars().allMatch(Character.isWhitespace(_))
input.toCharArray.forall(Character.isWhitespace(_))

def print(executionEvent: ExecutionEvent, lock: TestDebugFileLock) =
executionEvent match {
Expand Down