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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ jobs:
strategy:
fail-fast: false
matrix:
scala: ['2.11.12', '2.12.16', '2.13.8', '3.1.3']
scala: ['2.11.12', '2.12.16', '2.13.8', '3.2.0']
java: ['17']
platform: ['JVM']
steps:
Expand Down
6 changes: 3 additions & 3 deletions 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.1.3")
.settings(libraryDependencies += "dev.zio" %%% "izumi-reflect" % "2.2.0")
.enablePlugins(BuildInfoPlugin)
.settings(macroDefinitionSettings)
.settings(
Expand Down Expand Up @@ -885,8 +885,8 @@ lazy val docs = project.module
"org.http4s" %% "http4s-dsl" % http4sV,
"com.github.ghostdogpr" %% "caliban" % "2.0.0",
"com.github.ghostdogpr" %% "caliban-zio-http" % "2.0.0",
"org.scalameta" %% "munit" % "0.7.29",
"com.github.poslegm" %% "munit-zio" % "0.0.3",
"org.scalameta" %% "munit" % "1.0.0-M6",
"com.github.poslegm" %% "munit-zio" % "0.1.1",
"nl.vroste" %% "rezilience" % "0.7.0",
"io.github.gaelrenoux" %% "tranzactio" % "2.1.0",
"io.github.neurodyne" %% "zio-arrow" % "0.2.1",
Expand Down
7 changes: 4 additions & 3 deletions project/BuildHelper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ object BuildHelper {
val Scala213: String = versions("2.13")
val Scala3: String = versions("3")

val SilencerVersion = "1.7.9"
val SilencerVersion = "1.7.11"

private val stdOptions = Seq(
"-deprecation",
Expand Down Expand Up @@ -258,11 +258,12 @@ object BuildHelper {
)

def nativeSettings = Seq(
Test / test := (Test / compile).value
Test / test := (Test / compile).value,
Test / fork := crossProjectPlatform.value == JVMPlatform // set fork to `true` on JVM to improve log readability, JS and Native need `false`
)

def jsSettings: List[Def.Setting[_]] = List(
Test / fork := crossProjectPlatform.value != JSPlatform // set fork to `true` for non-JS platforms to improve log readability, JS needs `false`
Test / fork := crossProjectPlatform.value == JVMPlatform // set fork to `true` on JVM to improve log readability, JS and Native need `false`
)

def welcomeMessage = onLoadMessage := {
Expand Down
6 changes: 3 additions & 3 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.0")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.0")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.1")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0")
addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10")
Expand All @@ -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.10.0")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.5")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.11.0")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.7")
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
19 changes: 13 additions & 6 deletions test/native/src/main/scala/zio/test/ConcurrentHashMap.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,23 @@ package zio.test

import zio.stacktracer.TracingImplicits.disableAutoTrace

import scala.collection.mutable.Map
import java.util.concurrent.{ConcurrentHashMap => JConcurrentHashMap}

private[test] final case class ConcurrentHashMap[K, V] private (private val map: Map[K, V]) {
def foldLeft[B](z: B)(f: (B, (K, V)) => B): B =
map.foldLeft(z)(f)
private[test] final case class ConcurrentHashMap[K, V] private (private val map: JConcurrentHashMap[K, V]) {
def foldLeft[B](z: B)(op: (B, (K, V)) => B): B = {
var result = z
val it = map.entrySet.iterator
while (it.hasNext) {
val e = it.next()
result = op(result, (e.getKey, e.getValue))
}
result
}
def getOrElseUpdate(key: K, op: => V): V =
map.getOrElseUpdate(key, op)
map.computeIfAbsent(key, _ => op)
}

private[test] object ConcurrentHashMap {
def empty[K, V]: ConcurrentHashMap[K, V] =
new ConcurrentHashMap[K, V](Map.empty[K, V])
new ConcurrentHashMap[K, V](new JConcurrentHashMap[K, V]())
}