Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pr118 #121

Merged
merged 2 commits into from
May 7, 2020
Merged

Pr118 #121

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 boopickle/js/src/main/scala/boopickle/StringCodec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ object StringCodec extends StringCodecBase {
val te = new TextEncoder
// use native TextEncoder
(str: String) =>
new Int8Array(te.encode(str))
new Int8Array(te.encode(str).buffer)
}

private lazy val utf16decoder: (Uint16Array) => String = {
Expand Down
46 changes: 21 additions & 25 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ ThisBuild / scalafmtOnCompile := true
val commonSettings = Seq(
organization := "io.suzaku",
version := Version.library,
crossScalaVersions := Seq("2.11.12", "2.12.8", "2.13.0"),
scalaVersion in ThisBuild := "2.12.8",
crossScalaVersions := Seq("2.12.11", "2.13.2"),
scalaVersion in ThisBuild := "2.13.2",
scalacOptions := Seq(
"-deprecation",
"-encoding",
Expand All @@ -36,22 +36,18 @@ val commonSettings = Seq(
},
testFrameworks += new TestFramework("utest.runner.Framework"),
libraryDependencies ++= Seq(
if (scalaVersion.value.startsWith("2.11"))
"com.lihaoyi" %%% "utest" % "0.6.8" % Test
else
"com.lihaoyi" %%% "utest" % "0.6.9" % Test,
"com.lihaoyi" %%% "utest" % "0.7.4" % Test,
"org.scala-lang" % "scala-reflect" % scalaVersion.value % "provided"
)
)

val nativeSettings = Seq(
scalaVersion := "2.11.12",
crossScalaVersions := Seq("2.11.12"),
/*val nativeSettings = Seq(
nativeLinkStubs := true,
scalaVersion in ThisBuild := "2.11.12",
// Disable Scaladoc generation because of:
// [error] dropping dependency on node with no phase object: mixin
Compile / doc / sources := Seq.empty
)
)*/

val releaseSettings = Seq(
scmInfo := Some(
Expand Down Expand Up @@ -116,11 +112,11 @@ lazy val boopickle = crossProject(JSPlatform, JVMPlatform, NativePlatform)
)
.jsSettings(sourceMapSettings)
.jvmSettings()
.nativeSettings(nativeSettings)
//.nativeSettings(nativeSettings)

lazy val boopickleJS = boopickle.js
lazy val boopickleJVM = boopickle.jvm
lazy val boopickleNative = boopickle.native
//lazy val boopickleNative = boopickle.native

lazy val shapeless = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.crossType(CrossType.Pure)
Expand All @@ -135,11 +131,11 @@ lazy val shapeless = crossProject(JSPlatform, JVMPlatform, NativePlatform)
)
.jsSettings(sourceMapSettings)
.jvmSettings()
.nativeSettings(nativeSettings)
//.nativeSettings(nativeSettings)

lazy val shapelessJS = shapeless.js
lazy val shapelessJVM = shapeless.jvm
lazy val shapelessNative = shapeless.native
//lazy val shapelessNative = shapeless.native

lazy val generateTuples = taskKey[Unit]("Generates source code for pickling tuples")

Expand Down Expand Up @@ -180,31 +176,31 @@ lazy val perftests = crossProject(JSPlatform, JVMPlatform)
scalaVersion := "2.12.6",
scalacOptions ++= Seq("-Xstrict-inference"),
libraryDependencies ++= Seq(
"com.lihaoyi" %%% "upickle" % "0.5.1",
"com.typesafe.play" %%% "play-json" % "2.6.9",
"io.circe" %%% "circe-core" % "0.9.2",
"io.circe" %%% "circe-parser" % "0.9.2",
"io.circe" %%% "circe-generic" % "0.9.2"
"com.lihaoyi" %%% "upickle" % "1.0.0",
"com.typesafe.play" %%% "play-json" % "2.8.1", // Not available for sjs1
"io.circe" %%% "circe-core" % "0.13.0",
"io.circe" %%% "circe-parser" % "0.13.0",
"io.circe" %%% "circe-generic" % "0.13.0"
),
addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.1" cross CrossVersion.full)
)
.enablePlugins(JmhPlugin)
.jsSettings(
scalaJSOptimizerOptions in (Compile, fullOptJS) ~= { _.withUseClosureCompiler(false) },
// scalaJSOptimizerOptions in (Compile, fullOptJS) ~= { _.withUseClosureCompiler(false) },
libraryDependencies ++= Seq(
"org.scala-js" %%% "scalajs-dom" % "0.9.6",
"com.lihaoyi" %%% "scalatags" % "0.6.7"
"org.scala-js" %%% "scalajs-dom" % "1.0.0",
"com.lihaoyi" %%% "scalatags" % "0.8.6"
)
)

lazy val perftestsJS = preventPublication(perftests.js).enablePlugins(WorkbenchPlugin).dependsOn(boopickleJS)
lazy val perftestsJS = preventPublication(perftests.js)./*enablePlugins(WorkbenchPlugin).*/dependsOn(boopickleJS)

lazy val perftestsJVM = preventPublication(perftests.jvm)
.settings(
libraryDependencies += "io.circe" %% "circe-jawn" % "0.9.2"
libraryDependencies += "io.circe" %% "circe-jawn" % "0.13.0"
)
.dependsOn(boopickleJVM)

lazy val booPickleRoot = preventPublication(project.in(file(".")))
.settings(commonSettings)
.aggregate(boopickleJS, boopickleJVM, boopickleNative, shapelessJS, shapelessJVM, shapelessNative)
.aggregate(boopickleJS, boopickleJVM, /*boopickleNative,*/ shapelessJS, shapelessJVM /*, shapelessNative*/)
2 changes: 1 addition & 1 deletion project/Version.scala
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
object Version {
val library = "1.3.1"
val library = "1.3.2"
}
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.2.8
sbt.version=1.3.9
10 changes: 5 additions & 5 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
val scalaJSVersion =
Option(System.getenv("SCALAJS_VERSION")).getOrElse("0.6.28")
Option(System.getenv("SCALAJS_VERSION")).getOrElse("1.0.1")

addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.6.0")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.0.0")

addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "0.6.0")
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.0.0")

addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion)

addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.3.8")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.3.7")

addSbtPlugin("com.lihaoyi" % "workbench" % "0.4.1")
//addSbtPlugin("com.lihaoyi" % "workbench" % "0.4.1")

addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.1")

Expand Down