Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.

Scala 2.13.0-M4 #217

Merged
merged 1 commit into from
Jan 30, 2019
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
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ matrix:
- scala: 2.12.3
jdk: oraclejdk8
env: DEPLOY=true
- scala: 2.13.0-M4
script:
# TODO https://github.com/scoverage/scalac-scoverage-plugin/issues/225
- ./sbt "++${TRAVIS_SCALA_VERSION}!" coreJS/test lawsJS/test coreJVM/test lawsJVM/test

before_install:
- export PATH=${PATH}:./vendor/bundle
Expand Down
26 changes: 18 additions & 8 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import sbtrelease.Utilities._
import ReleaseTransformations._
import microsites.ExtraMdFileConfig
import sbtcrossproject.{crossProject, CrossType}

lazy val scalaCheckVersion = "1.13.5"
lazy val scalaTestVersion = "3.0.4"
lazy val scalaCheckVersion = "1.14.0"
lazy val scalaTestVersion = "3.0.6-SNAP1"
lazy val disciplineVersion = "0.8"
lazy val catsVersion = "1.0.1"
lazy val catsVersion = "1.2.0"
lazy val catalystsVersion = "0.0.5"

lazy val buildSettings = Seq(
organization := "org.typelevel",
scalaVersion := "2.12.4",
crossScalaVersions := Seq("2.10.7", "2.11.12", "2.12.4")
crossScalaVersions := Seq("2.10.7", "2.11.12", "2.12.4", "2.13.0-M4")
)

lazy val commonSettings = Seq(
Expand All @@ -23,9 +24,7 @@ lazy val commonSettings = Seq(
"-language:higherKinds",
"-language:implicitConversions",
"-unchecked",
"-Xfatal-warnings",
"-Xlint",
"-Yno-adapted-args",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
//"-Ywarn-value-discard", // fails with @sp on Unit
Expand All @@ -34,6 +33,17 @@ lazy val commonSettings = Seq(
case Some((2, 10)) => Seq.empty
case _ => Seq("-Ywarn-unused-import")
}),
scalacOptions ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, v)) if v <= 12 =>
Seq(
"-Xfatal-warnings",
"-Yno-adapted-args"
)
case _ =>
Nil
}
},
resolvers += Resolver.sonatypeRepo("public"),
scalacOptions in (Compile, console) ~= (_ filterNot (_ == "-Ywarn-unused-import")),
scalacOptions in (Test, console) := (scalacOptions in (Compile, console)).value,
Expand Down Expand Up @@ -111,7 +121,7 @@ val ignoredABIProblems = {
)
}

lazy val core = crossProject
lazy val core = crossProject(JSPlatform, JVMPlatform)
.crossType(CrossType.Pure)
.enablePlugins(MimaPlugin)
.settings(moduleName := "algebra")
Expand All @@ -129,7 +139,7 @@ lazy val core = crossProject
lazy val coreJVM = core.jvm
lazy val coreJS = core.js

lazy val laws = crossProject
lazy val laws = crossProject(JSPlatform, JVMPlatform)
.crossType(CrossType.Pure)
.enablePlugins(MimaPlugin)
.dependsOn(core)
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/algebra/ring/Additive.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ trait AdditiveSemigroup[@sp(Int, Long, Float, Double) A] extends Any with Serial
* If the sequence is empty, returns None. Otherwise, returns Some(total).
*/
def trySum(as: TraversableOnce[A]): Option[A] =
as.reduceOption(plus)
as.toIterator.reduceOption(plus)
}

trait AdditiveCommutativeSemigroup[@sp(Int, Long, Float, Double) A] extends Any with AdditiveSemigroup[A] {
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/algebra/ring/Multiplicative.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ trait MultiplicativeSemigroup[@sp(Int, Long, Float, Double) A] extends Any with
* If the sequence is empty, returns None. Otherwise, returns Some(total).
*/
def tryProduct(as: TraversableOnce[A]): Option[A] =
as.reduceOption(times)
as.toIterator.reduceOption(times)
}

trait MultiplicativeCommutativeSemigroup[@sp(Int, Long, Float, Double) A] extends Any with MultiplicativeSemigroup[A] {
Expand Down
3 changes: 2 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.7")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.0")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.3")
addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.2")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.22")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.24")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.18")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.1")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.3.3")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.5.0")