Get scala3 crossbuild working upto db-commons/

This commit is contained in:
Chris Stewart 2024-05-11 12:33:03 -05:00
parent 52040da386
commit fc006caeb8
6 changed files with 8 additions and 13 deletions

View file

@ -1320,8 +1320,6 @@ object Picklers {
val numericOracles =
oracles.map(_.asInstanceOf[NumericSingleOracleInfo])
NumericOracleOutcome(numericOracles.zip(numericOutcomes))
case signed: SignedNumericOutcome =>
throw new IllegalArgumentException(s"Unexpected outcome $signed")
}
lazy val myPayoutJs = obj(PicklerKeys.myPayout)

View file

@ -30,8 +30,7 @@ lazy val commonJsSettings = {
scalaJSLinkerConfig ~= {
_.withModuleKind(ModuleKind.CommonJSModule)
}
) ++ CommonSettings.settings ++ Seq(
scalacOptions += "-P:scalajs:nowarnGlobalExecutionContext")
) ++ CommonSettings.settings
}
lazy val crypto = crossProject(JVMPlatform, JSPlatform)

View file

@ -334,7 +334,7 @@ object UInt8
checkCached(unsigned)
}
def toByte(uInt8: UInt8): Byte = uInt8.underlying.toByte
def toByte(uInt8: UInt8): Byte = uInt8.toBigInt.toByte
def toBytes(us: Seq[UInt8]): ByteVector = {
ByteVector(us.map(toByte))

View file

@ -92,10 +92,7 @@ case class UndefinedOP_NOP(opCode: Int) extends ReservedOperation
object ReservedOperation extends ScriptOperationFactory[ReservedOperation] {
lazy val undefinedOpCodes = for { i <- 0xbb to 0xff } yield UndefinedOP_NOP(i)
override val operations: scala.collection.immutable.Vector[
org.bitcoins.core.script.reserved.ReservedOperation
with Product
with java.io.Serializable] =
override val operations: Vector[ReservedOperation] =
Vector(OP_RESERVED,
OP_VER,
OP_VERIF,

View file

@ -3,12 +3,13 @@ import sbt.Keys.excludeLintKeys
import scala.util.Properties
val scala2_13 = "2.13.16"
val scala3 = "3.4.1"
ThisBuild / scalafmtOnCompile := !Properties.envOrNone("CI").contains("true")
ThisBuild / scalaVersion := scala2_13
ThisBuild / scalaVersion := scala3
ThisBuild / crossScalaVersions := List(scala2_13)
ThisBuild / crossScalaVersions := List(scala2_13, scala3)
//https://github.com/sbt/sbt/pull/5153
//https://github.com/bitcoin-s/bitcoin-s/pull/2194

View file

@ -224,7 +224,7 @@ object Deps {
"org.scalacheck" %%% "scalacheck" % V.scalacheck withSources () withJavadoc ())
val scalaJsStubs =
"org.scala-js" %% "scalajs-stubs" % V.scalaJsStubsV % "provided"
"org.scala-js" % "scalajs-stubs_2.13" % V.scalaJsStubsV % "provided"
val scalaJsTime =
Def.setting(
@ -235,7 +235,7 @@ object Deps {
"org.scalatest" %%% "scalatest" % V.scalaTest withSources () withJavadoc ())
val scalaTestPlus = Def.setting(
"org.scalatestplus" %%% "scalacheck-1-17" % V.scalaTestPlus withSources () withJavadoc ())
"org.scalatestplus" %%% "scalacheck-1-17" % V.scalaTestPlus withSources () /*withJavadoc ()*/)
val pgEmbedded =
"com.opentable.components" % "otj-pg-embedded" % V.pgEmbeddedV withSources () withJavadoc ()