Skip to content

Commit

Permalink
Update Dependencies (#643)
Browse files Browse the repository at this point in the history
* update dependencies

* fix scala 212 issues
  • Loading branch information
adamgfraser authored Jan 15, 2023
1 parent 731564d commit 0a43ed4
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
fail-fast: false
matrix:
java: ['[email protected]', '[email protected]']
scala: ['2.12.14', '2.13.6', '3.2.1']
scala: ['2.12.17', '2.13.10', '3.2.1']
platform: ['JVM', 'JS']
steps:
- name: Checkout current branch
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ val catsEffectVersion = "3.4.4"
val catsMtlVersion = "1.3.0"
val disciplineScalaTestVersion = "2.2.0"
val fs2Version = "3.4.0"
val scalaJavaTimeVersion = "2.3.0"
val scalaJavaTimeVersion = "2.5.0"

lazy val zioInteropCats = crossProject(JSPlatform, JVMPlatform)
.in(file("zio-interop-cats"))
Expand Down
6 changes: 3 additions & 3 deletions project/BuildHelper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import sbtbuildinfo._
import BuildInfoKeys._

object BuildHelper {
val testDeps = Seq("org.scalacheck" %% "scalacheck" % "1.15.4" % Test)
val testDeps = Seq("org.scalacheck" %% "scalacheck" % "1.17.0" % Test)

val Scala212 = "2.12.14"
val Scala213 = "2.13.6"
val Scala212 = "2.12.17"
val Scala213 = "2.13.10"
val Scala3 = "3.2.1"

private val stdOptions = Seq(
Expand Down
6 changes: 3 additions & 3 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.12.0")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.2.0")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.6")
addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0")
addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.2")
addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.9.0")
addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.6")
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7")
29 changes: 20 additions & 9 deletions sbt
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@

set -o pipefail

declare -r sbt_release_version="1.3.13"
declare -r sbt_unreleased_version="1.4.0-M1"
declare -r sbt_release_version="1.8.2"
declare -r sbt_unreleased_version="1.8.2"

declare -r latest_213="2.13.3"
declare -r latest_212="2.12.12"
declare -r latest_213="2.13.10"
declare -r latest_212="2.12.17"
declare -r latest_211="2.11.12"
declare -r latest_210="2.10.7"
declare -r latest_29="2.9.3"
Expand All @@ -48,7 +48,7 @@ declare -r buildProps="project/build.properties"

declare -r sbt_launch_ivy_release_repo="https://repo.typesafe.com/typesafe/ivy-releases"
declare -r sbt_launch_ivy_snapshot_repo="https://repo.scala-sbt.org/scalasbt/ivy-snapshots"
declare -r sbt_launch_mvn_release_repo="https://repo.scala-sbt.org/scalasbt/maven-releases"
declare -r sbt_launch_mvn_release_repo="https://repo1.maven.org/maven2"
declare -r sbt_launch_mvn_snapshot_repo="https://repo.scala-sbt.org/scalasbt/maven-snapshots"

declare -r default_jvm_opts_common="-Xms512m -Xss2m -XX:MaxInlineLevel=18"
Expand Down Expand Up @@ -216,7 +216,8 @@ getJavaVersion() {
# but on 9 and 10 it's 9.x.y and 10.x.y.
if [[ "$str" =~ ^1\.([0-9]+)(\..*)?$ ]]; then
echo "${BASH_REMATCH[1]}"
elif [[ "$str" =~ ^([0-9]+)(\..*)?$ ]]; then
# Fixes https://github.com/dwijnand/sbt-extras/issues/326
elif [[ "$str" =~ ^([0-9]+)(\..*)?(-ea)?$ ]]; then
echo "${BASH_REMATCH[1]}"
elif [[ -n "$str" ]]; then
echoerr "Can't parse java version from: $str"
Expand Down Expand Up @@ -247,11 +248,20 @@ java_version() {
echo "$version"
}

is_apple_silicon() { [[ "$(uname -s)" == "Darwin" && "$(uname -m)" == "arm64" ]]; }

# MaxPermSize critical on pre-8 JVMs but incurs noisy warning on 8+
default_jvm_opts() {
local -r v="$(java_version)"
if [[ $v -ge 10 ]]; then
echo "$default_jvm_opts_common -XX:+UnlockExperimentalVMOptions -XX:+UseJVMCICompiler"
if [[ $v -ge 17 ]]; then
echo "$default_jvm_opts_common"
elif [[ $v -ge 10 ]]; then
if is_apple_silicon; then
# As of Dec 2020, JVM for Apple Silicon (M1) doesn't support JVMCI
echo "$default_jvm_opts_common"
else
echo "$default_jvm_opts_common -XX:+UnlockExperimentalVMOptions -XX:+UseJVMCICompiler"
fi
elif [[ $v -ge 8 ]]; then
echo "$default_jvm_opts_common"
else
Expand Down Expand Up @@ -471,7 +481,7 @@ process_args() {
-trace) require_arg integer "$1" "$2" && trace_level="$2" && shift 2 ;;
-debug-inc) addJava "-Dxsbt.inc.debug=true" && shift ;;

-no-colors) addJava "-Dsbt.log.noformat=true" && shift ;;
-no-colors) addJava "-Dsbt.log.noformat=true" && addJava "-Dsbt.color=false" && shift ;;
-sbt-create) sbt_create=true && shift ;;
-sbt-dir) require_arg path "$1" "$2" && sbt_dir="$2" && shift 2 ;;
-sbt-boot) require_arg path "$1" "$2" && addJava "-Dsbt.boot.directory=$2" && shift 2 ;;
Expand Down Expand Up @@ -652,3 +662,4 @@ execRunner "$java_cmd" \
-jar "$sbt_jar" \
"${sbt_commands[@]}" \
"${residual_args[@]}"

0 comments on commit 0a43ed4

Please sign in to comment.