Skip to content

Commit

Permalink
Bump deps (#80)
Browse files Browse the repository at this point in the history
* Bump deps

* fix
  • Loading branch information
vpavkin authored Dec 9, 2019
1 parent f0f276d commit 6b93d2a
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 42 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ script:

# See http://www.scala-sbt.org/0.13/docs/Travis-CI-with-sbt.html
# Tricks to avoid unnecessary cache updates
- find $HOME/.sbt -name "*.lock" | xargs rm
- find $HOME/.ivy2 -name "ivydata-*.properties" | xargs rm
- find $HOME/.sbt -name "*.lock" | xargs -r rm
- find $HOME/.ivy2 -name "ivydata-*.properties" | xargs -r rm

after_success: bash <(curl -s https://codecov.io/bash)
11 changes: 6 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import sbtcrossproject.CrossPlugin.autoImport.{crossProject, CrossType}

lazy val buildSettings = Seq(
organization := "io.circe",
scalaVersion := "2.12.8"
scalaVersion := "2.12.10"
)

def compilerOptions(compilerVersion: String) = Seq(
Expand Down Expand Up @@ -55,12 +55,13 @@ def compilerOptions(compilerVersion: String) = Seq(
"-Ywarn-unused:privates")
else Seq.empty)

lazy val magnoliaVersion = "0.11.0"
lazy val magnoliaVersion = "0.12.2"
lazy val mercatorVersion = "0.2.1"
lazy val circeVersion = "0.11.1"
lazy val circeVersion = "0.12.3"
lazy val circeGenericExtrasVersion = "0.12.2"
lazy val shapelessVersion = "2.3.3"
lazy val scalatestVersion = "3.0.8"
lazy val scalacheckVersion = "1.14.0"
lazy val scalacheckVersion = "1.14.2"

lazy val compilerSettings = Seq(
scalacOptions ++= compilerOptions(scalaVersion.value) ++ Seq("-Ywarn-macros:after"),
Expand All @@ -79,7 +80,7 @@ lazy val testDependencies = libraryDependencies ++= Seq(
"com.chuusai" %% "shapeless" % shapelessVersion,
"io.circe" %%% "circe-parser" % circeVersion,
"io.circe" %%% "circe-generic" % circeVersion,
"io.circe" %%% "circe-generic-extras" % circeVersion,
"io.circe" %%% "circe-generic-extras" % circeGenericExtrasVersion,
"io.circe" %%% "circe-testing" % circeVersion,
"org.scalacheck" %%% "scalacheck" % scalacheckVersion,
"org.scalatest" %%% "scalatest" % scalatestVersion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ private[magnolia] object MagnoliaDecoder {
// Some decoders (in particular, the default Option[T] decoder) do special things when a key is missing,
// so we give them a chance to do their thing here.
p.typeclass.tryDecode(keyCursor)
}(Right(_))
}(Right(_): Either[DecodingFailure, p.PType])
}
}
}
Expand All @@ -47,7 +47,7 @@ private[magnolia] object MagnoliaDecoder {
else {
new Decoder[T] {
def apply(c: HCursor): Result[T] = {
caseClass.constructMonadic { p =>
caseClass.constructMonadic { p =>
p.typeclass.tryDecode(c.downField(paramJsonKeyLookup.getOrElse(p.label, throw new IllegalStateException("Looking up a parameter label should always yield a value. This is a bug"))))
}
}
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")
addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.2")
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.12")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.2")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.3")
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.4.0")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,20 @@ object SemiautoDerivedSuiteInputs {

sealed trait RecursiveAdtExample
case class BaseAdtExample(a: String) extends RecursiveAdtExample
case class NestedAdtExample(r: RecursiveAdtExample) extends RecursiveAdtExample
case class NestedAdtExample(r: RecursiveAdtExample)
extends RecursiveAdtExample

object RecursiveAdtExample {
implicit val eqRecursiveAdtExample: Eq[RecursiveAdtExample] = Eq.fromUniversalEquals
implicit val eqRecursiveAdtExample: Eq[RecursiveAdtExample] =
Eq.fromUniversalEquals

private def atDepth(depth: Int): Gen[RecursiveAdtExample] = if (depth < 3)
Gen.oneOf(
Arbitrary.arbitrary[String].map(BaseAdtExample(_)),
atDepth(depth + 1).map(NestedAdtExample(_))
) else Arbitrary.arbitrary[String].map(BaseAdtExample(_))
private def atDepth(depth: Int): Gen[RecursiveAdtExample] =
if (depth < 3)
Gen.oneOf(
Arbitrary.arbitrary[String].map(BaseAdtExample(_)),
atDepth(depth + 1).map(NestedAdtExample(_))
)
else Arbitrary.arbitrary[String].map(BaseAdtExample(_))

implicit val arbitraryRecursiveAdtExample: Arbitrary[RecursiveAdtExample] =
Arbitrary(atDepth(0))
Expand All @@ -31,12 +35,13 @@ object SemiautoDerivedSuiteInputs {
implicit val eqRecursiveWithOptionExample: Eq[RecursiveWithOptionExample] =
Eq.fromUniversalEquals

private def atDepth(depth: Int): Gen[RecursiveWithOptionExample] = if (depth < 3)
Arbitrary.arbitrary[Option[RecursiveWithOptionExample]].map(
RecursiveWithOptionExample(_)
) else Gen.const(RecursiveWithOptionExample(None))
private def atDepth(depth: Int): Gen[RecursiveWithOptionExample] =
if (depth < 3)
Gen.option(atDepth(depth + 1)).map(RecursiveWithOptionExample(_))
else Gen.const(RecursiveWithOptionExample(None))

implicit val arbitraryRecursiveWithOptionExample: Arbitrary[RecursiveWithOptionExample] =
implicit val arbitraryRecursiveWithOptionExample
: Arbitrary[RecursiveWithOptionExample] =
Arbitrary(atDepth(0))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,49 +55,49 @@ class ConfiguredSemiautoDerivedEquivalenceSuite extends CirceSuite {
}

private class CirceCodecs(config: GeConfiguration) {
import io.circe.generic.extras.semiauto.{deriveEncoder, deriveDecoder}
import io.circe.generic.extras.semiauto.{deriveConfiguredEncoder, deriveConfiguredDecoder}

implicit val configuration: GeConfiguration = config

implicit val circeEncoder1: TaggedEncoder[Circe, AnyValInside] = mkTag[Circe](deriveEncoder[AnyValInside])
implicit val circeEncoder3: TaggedEncoder[Circe, Box[Int]] = mkTag[Circe](deriveEncoder[Box[Int]])
implicit val circeEncoder4: TaggedEncoder[Circe, Qux[Int]] = mkTag[Circe](deriveEncoder[Qux[Int]])
implicit val circeEncoder6: TaggedEncoder[Circe, Baz] = mkTag[Circe](deriveEncoder[Baz])
implicit val circeEncoder1: TaggedEncoder[Circe, AnyValInside] = mkTag[Circe](deriveConfiguredEncoder[AnyValInside])
implicit val circeEncoder3: TaggedEncoder[Circe, Box[Int]] = mkTag[Circe](deriveConfiguredEncoder[Box[Int]])
implicit val circeEncoder4: TaggedEncoder[Circe, Qux[Int]] = mkTag[Circe](deriveConfiguredEncoder[Qux[Int]])
implicit val circeEncoder6: TaggedEncoder[Circe, Baz] = mkTag[Circe](deriveConfiguredEncoder[Baz])
private implicit val encodeFoo: Encoder[Foo] = {
// Circe does not automatically derive instances for subtypes
implicit val encodeBar = Bar.encodeBar
implicit val encodeBam = Bam.encodeBam
deriveEncoder[Foo]
deriveConfiguredEncoder[Foo]
}
implicit val circeEncoder7: TaggedEncoder[Circe, Foo] = {
mkTag[Circe](encodeFoo)
}
implicit val circeEncoderSeqFoo: TaggedEncoder[Circe, Seq[Foo]] = mkTag[Circe](Encoder.encodeSeq(encodeFoo))
implicit val circeEncoderSealed: TaggedEncoder[Circe, Sealed] = mkTag[Circe](deriveEncoder[Sealed])
private implicit val encodeRecursiveAdtExample: Encoder[RecursiveAdtExample] = deriveEncoder[RecursiveAdtExample]
implicit val circeEncoderSealed: TaggedEncoder[Circe, Sealed] = mkTag[Circe](deriveConfiguredEncoder[Sealed])
private implicit val encodeRecursiveAdtExample: Encoder[RecursiveAdtExample] = deriveConfiguredEncoder[RecursiveAdtExample]
implicit val circeEncoder8: TaggedEncoder[Circe, RecursiveAdtExample] = mkTag[Circe](encodeRecursiveAdtExample)
private implicit val encodeRecursiveWithOptionExample: Encoder[RecursiveWithOptionExample] = deriveEncoder[RecursiveWithOptionExample]
private implicit val encodeRecursiveWithOptionExample: Encoder[RecursiveWithOptionExample] = deriveConfiguredEncoder[RecursiveWithOptionExample]
implicit val circeEncoder9: TaggedEncoder[Circe, RecursiveWithOptionExample] = mkTag[Circe](encodeRecursiveWithOptionExample)
implicit val circeEncoder13: TaggedEncoder[Circe, ClassWithDefaults] = mkTag[Circe](deriveEncoder[ClassWithDefaults])
implicit val circeEncoder14: TaggedEncoder[Circe, ClassWithJsonKey] = mkTag[Circe](deriveEncoder[ClassWithJsonKey])
implicit val circeEncoder13: TaggedEncoder[Circe, ClassWithDefaults] = mkTag[Circe](deriveConfiguredEncoder[ClassWithDefaults])
implicit val circeEncoder14: TaggedEncoder[Circe, ClassWithJsonKey] = mkTag[Circe](deriveConfiguredEncoder[ClassWithJsonKey])

implicit val circeDecoder1: TaggedDecoder[Circe, AnyValInside] = mkTag[Circe](deriveDecoder[AnyValInside])
implicit val circeDecoder3: TaggedDecoder[Circe, Qux[Int]] = mkTag[Circe](deriveDecoder[Qux[Int]])
implicit val circeDecoder5: TaggedDecoder[Circe, Baz] = mkTag[Circe](deriveDecoder[Baz])
implicit val circeDecoder1: TaggedDecoder[Circe, AnyValInside] = mkTag[Circe](deriveConfiguredDecoder[AnyValInside])
implicit val circeDecoder3: TaggedDecoder[Circe, Qux[Int]] = mkTag[Circe](deriveConfiguredDecoder[Qux[Int]])
implicit val circeDecoder5: TaggedDecoder[Circe, Baz] = mkTag[Circe](deriveConfiguredDecoder[Baz])
private implicit val decodeFoo: Decoder[Foo] = {
implicit val decodeBar = Bar.decodeBar
implicit val decodeBam = Bam.decodeBam
deriveDecoder[Foo]
deriveConfiguredDecoder[Foo]
}
implicit val circeDecoder6: TaggedDecoder[Circe, Foo] = mkTag[Circe](decodeFoo)
implicit val circeDecoder4: TaggedDecoder[Circe, Seq[Foo]] = mkTag[Circe](Decoder.decodeSeq(circeDecoder6.inner))
implicit val circeDecoderSealed: TaggedDecoder[Circe, Sealed] = mkTag[Circe](deriveDecoder[Sealed])
private implicit val decodeRecursiveAdtExample: Decoder[RecursiveAdtExample] = deriveDecoder[RecursiveAdtExample]
implicit val circeDecoderSealed: TaggedDecoder[Circe, Sealed] = mkTag[Circe](deriveConfiguredDecoder[Sealed])
private implicit val decodeRecursiveAdtExample: Decoder[RecursiveAdtExample] = deriveConfiguredDecoder[RecursiveAdtExample]
implicit val circeDecoder8: TaggedDecoder[Circe, RecursiveAdtExample] = mkTag[Circe](decodeRecursiveAdtExample)
private implicit val decodeRecursiveWithOptionExample: Decoder[RecursiveWithOptionExample] = deriveDecoder[RecursiveWithOptionExample]
private implicit val decodeRecursiveWithOptionExample: Decoder[RecursiveWithOptionExample] = deriveConfiguredDecoder[RecursiveWithOptionExample]
implicit val circeDecoder9: TaggedDecoder[Circe, RecursiveWithOptionExample] = mkTag[Circe](decodeRecursiveWithOptionExample)
implicit val circeDecoder13: TaggedDecoder[Circe, ClassWithDefaults] = mkTag[Circe](deriveDecoder[ClassWithDefaults])
implicit val circeDecoder14: TaggedDecoder[Circe, ClassWithJsonKey] = mkTag[Circe](deriveDecoder[ClassWithJsonKey])
implicit val circeDecoder13: TaggedDecoder[Circe, ClassWithDefaults] = mkTag[Circe](deriveConfiguredDecoder[ClassWithDefaults])
implicit val circeDecoder14: TaggedDecoder[Circe, ClassWithJsonKey] = mkTag[Circe](deriveConfiguredDecoder[ClassWithJsonKey])
}

def testWithConfiguration(postfix: String, configuration: Configuration): Unit = {
Expand Down

0 comments on commit 6b93d2a

Please sign in to comment.