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

Update dependecies and Scala 2.13.0-RC2 #41

Merged
merged 9 commits into from
May 31, 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: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ language: scala
scala:
- 2.10.7
- 2.11.12
- 2.12.5
- 2.13.0-M4
- 2.12.8
- 2.13.0-RC2

jdk:
- oraclejdk8
Expand Down
19 changes: 11 additions & 8 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ReleaseTransformations._
import sbtcrossproject.crossProject
import sbtcrossproject.CrossPlugin.autoImport.crossProject

organization in ThisBuild := "io.estatico"

Expand All @@ -23,17 +23,20 @@ lazy val catsTests = crossProject(JSPlatform, JVMPlatform).in(file("cats-tests")
.settings(
name := "newtype-cats-tests",
description := "Test suite for newtype + cats interop",
libraryDependencies ++= Seq(
"org.typelevel" %%% "cats-core" % "1.2.0"
)
libraryDependencies += {
if (scalaVersion.value.startsWith("2.10."))
"org.typelevel" %%% "cats-core" % "1.2.0"
else
"org.typelevel" %%% "cats-core" % "2.0.0-M2"
}
)

lazy val catsTestsJVM = catsTests.jvm
lazy val catsTestsJS = catsTests.js

lazy val noPublishSettings = Seq(
publish := (),
publishLocal := (),
publish := {},
publishLocal := {},
publishArtifact := false
)

Expand Down Expand Up @@ -127,8 +130,8 @@ lazy val defaultLibraryDependencies = libraryDependencies ++= Seq(
"org.typelevel" %% "macro-compat" % "1.1.1",
scalaOrganization.value % "scala-reflect" % scalaVersion.value % Provided,
scalaOrganization.value % "scala-compiler" % scalaVersion.value % Provided,
"org.scalacheck" %%% "scalacheck" % "1.14.0" % "test",
"org.scalatest" %%% "scalatest" % "3.0.6-SNAP1" % "test"
"org.scalacheck" %%% "scalacheck" % "1.14.0" % Test,
"org.scalatest" %%% "scalatest" % "3.0.8-RC4" % Test
)

def scalaPartV = Def.setting(CrossVersion.partialVersion(scalaVersion.value))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import cats.implicits._
import io.estatico.newtype.ops._
import io.estatico.newtype.macros.{newsubtype, newtype}
import org.scalatest.{FlatSpec, Matchers}
import org.scalatest.prop.GeneratorDrivenPropertyChecks
import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks

class NewTypeCatsTest extends FlatSpec with Matchers with GeneratorDrivenPropertyChecks {
class NewTypeCatsTest extends FlatSpec with Matchers with ScalaCheckPropertyChecks {

import NewTypeCatsTest._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class NewTypeMacrosJVMTest extends FlatSpec with Matchers {

it should "not box primitives" in {
// Introspect the runtime type returned by the `apply` method
def ctorReturnType(o: Any) = List(o.getClass.getMethods: _*).find(_.getName == "apply").get.getReturnType
def ctorReturnType(o: Any) = scala.Predef.genericArrayOps(o.getClass.getMethods).find(_.getName == "apply").get.getReturnType

// newtypes will box primitive values.
@newtype case class BoxedInt(private val x: Int)
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version = 0.13.17
sbt.version = 1.2.8
12 changes: 6 additions & 6 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.1")
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.4")
addSbtPlugin("com.dwijnand" % "sbt-travisci" % "1.1.0")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "1.1")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.23")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.5.0")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.1")
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.11")
addSbtPlugin("com.dwijnand" % "sbt-travisci" % "1.1.3")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.5")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.28")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.6.0")
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ private[macros] class NewTypeMacros(val c: blackbox.Context)
clsDef: ClassDef, valDef: ValDef, tparamsNoVar: List[TypeDef], tparamNames: List[TypeName]
): List[Tree] = {
val extensionMethods =
maybeGenerateValMethod(clsDef, valDef) ++ getInstanceMethods(clsDef)
maybeGenerateValMethod(clsDef, valDef).toList ++ getInstanceMethods(clsDef)

if (extensionMethods.isEmpty) {
Nil
Expand Down
4 changes: 2 additions & 2 deletions shared/src/test/scala/io/estatico/newtype/NewTypeTest.scala
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package io.estatico.newtype

import org.scalacheck.Arbitrary
import org.scalatest.prop.PropertyChecks
import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks
import org.scalatest.{FlatSpec, Matchers}

class NewTypeTest extends FlatSpec with PropertyChecks with Matchers {
class NewTypeTest extends FlatSpec with ScalaCheckPropertyChecks with Matchers {

import NewTypeTest._

Expand Down