Skip to content

Commit 5ef51cf

Browse files
authored
Merge pull request #230 from iRevive/sn-0.5
Update Scala Native to 0.5.8
2 parents 77e6e4d + 518f98c commit 5ef51cf

File tree

6 files changed

+15
-16
lines changed

6 files changed

+15
-16
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,5 +401,5 @@ jobs:
401401
- name: Submit Dependencies
402402
uses: scalacenter/sbt-dependency-submission@v2
403403
with:
404-
modules-ignore: rootjs_3 rootjs_2.12 rootjs_2.13 rootjvm_3 rootjvm_2.12 rootjvm_2.13 rootnative_3 rootnative_2.12 rootnative_2.13 sbt-http4s-org-scalafix-internal_3 sbt-http4s-org-scalafix-internal_2.12 sbt-http4s-org-scalafix-internal_2.13 testruntime_3 testruntime_2.12 testruntime_2.13 testruntime_sjs1_3 testruntime_sjs1_2.12 testruntime_sjs1_2.13 testruntime_native0.4_3 testruntime_native0.4_2.12 testruntime_native0.4_2.13
404+
modules-ignore: rootjs_3 rootjs_2.12 rootjs_2.13 rootjvm_3 rootjvm_2.12 rootjvm_2.13 rootnative_3 rootnative_2.12 rootnative_2.13 sbt-http4s-org-scalafix-internal_3 sbt-http4s-org-scalafix-internal_2.12 sbt-http4s-org-scalafix-internal_2.13 testruntime_3 testruntime_2.12 testruntime_2.13 testruntime_sjs1_3 testruntime_sjs1_2.12 testruntime_sjs1_2.13 testruntime_native0.5_3 testruntime_native0.5_2.12 testruntime_native0.5_2.13
405405
configs-ignore: test scala-tool scala-doc-tool test-internal

build.sbt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ ThisBuild / Test / jsEnv := {
7878
}
7979
}
8080

81-
val catsVersion = "2.10.0"
82-
val catsEffectVersion = "3.5.7"
83-
val scodecBitsVersion = "1.1.38"
84-
val munitVersion = "1.0.0-M10"
85-
val munitCEVersion = "2.0.0-M3"
86-
val disciplineMUnitVersion = "2.0.0-M3"
81+
val catsVersion = "2.13.0"
82+
val catsEffectVersion = "3.7.0-RC1"
83+
val scodecBitsVersion = "1.2.4"
84+
val munitVersion = "1.1.0"
85+
val munitCEVersion = "2.2.0-RC1"
86+
val disciplineMUnitVersion = "2.0.0"
8787

8888
lazy val root = tlCrossRootProject.aggregate(crypto, testRuntime)
8989

@@ -103,7 +103,7 @@ lazy val crypto = crossProject(JSPlatform, JVMPlatform, NativePlatform)
103103
)
104104
)
105105
.nativeSettings(
106-
tlVersionIntroduced := List("2.12", "2.13", "3").map(_ -> "0.2.4").toMap,
106+
tlVersionIntroduced := List("2.12", "2.13", "3").map(_ -> "0.3.0").toMap,
107107
unusedCompileDependenciesTest := {}
108108
)
109109
.dependsOn(testRuntime % Test)

crypto/native/src/main/scala/org/http4s/crypto/HashPlatform.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ private[crypto] trait HashCompanionPlatform {
2626
implicit def forApplicativeThrow[F[_]](implicit F: ApplicativeThrow[F]): Hash[F] =
2727
new UnsealedHash[F] {
2828
def digest(algorithm: HashAlgorithm, data: ByteVector): F[ByteVector] =
29-
Zone { implicit z =>
29+
Zone.acquire { implicit z =>
3030
import HashAlgorithm._
3131

3232
val name = algorithm match {
@@ -45,7 +45,7 @@ private[crypto] trait HashCompanionPlatform {
4545

4646
if (openssl
4747
.evp
48-
.EVP_Digest(data.toPtr, data.size.toULong, md, size, `type`, null) == 1)
48+
.EVP_Digest(data.toPtr, data.size.toUSize, md, size, `type`, null) == 1)
4949
F.pure(ByteVector.fromPtr(md.asInstanceOf[Ptr[Byte]], (!size).toLong))
5050
else
5151
F.raiseError(new GeneralSecurityException("EVP_DIGEST"))

crypto/native/src/main/scala/org/http4s/crypto/HmacKeyGenPlatform.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,14 @@ import cats.effect.kernel.Sync
2020
import scodec.bits.ByteVector
2121

2222
import scala.scalanative.unsafe._
23-
import scala.scalanative.unsigned._
2423

2524
private[crypto] trait HmacKeyGenCompanionPlatform {
2625
implicit def forSync[F[_]](implicit F: Sync[F]): HmacKeyGen[F] =
2726
new UnsealedHmacKeyGen[F] {
2827
def generateKey[A <: HmacAlgorithm](algorithm: A): F[SecretKey[A]] =
2928
F.delay {
3029
val len = algorithm.minimumKeyLength
31-
val buf = stackalloc[Byte](len.toLong.toULong)
30+
val buf = stackalloc[Byte](len)
3231
if (openssl.rand.RAND_bytes(buf, len) != 1)
3332
throw new GeneralSecurityException("RAND_bytes")
3433
SecretKeySpec(ByteVector.fromPtr(buf, len.toLong), algorithm)

crypto/native/src/main/scala/org/http4s/crypto/HmacPlatform.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ private[crypto] trait HmacCompanionPlatform {
2929
new UnsealedHmac[F] {
3030

3131
def digest(key: SecretKey[HmacAlgorithm], data: ByteVector): F[ByteVector] =
32-
Zone { implicit z =>
32+
Zone.acquire { implicit z =>
3333
import HmacAlgorithm._
3434

3535
key match {
@@ -54,7 +54,7 @@ private[crypto] trait HmacCompanionPlatform {
5454
keyBytes.toPtr,
5555
keyBytes.size.toInt,
5656
data.toPtr.asInstanceOf[Ptr[CUnsignedChar]],
57-
data.size.toULong,
57+
data.size.toCSize,
5858
md,
5959
mdLen) != null)
6060
F.pure(ByteVector.fromPtr(md.asInstanceOf[Ptr[Byte]], (!mdLen).toLong))

project/plugins.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
libraryDependencies += "org.scala-js" %% "scalajs-env-selenium" % "1.1.1"
22

33
addSbtPlugin("org.http4s" % "sbt-http4s-org" % "2.0.0")
4-
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.17.0")
4+
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.19.0")
55
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0")
6-
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.17")
6+
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.8")

0 commit comments

Comments
 (0)