Skip to content

Commit

Permalink
Remove runtime dependency on circe-derivation
Browse files Browse the repository at this point in the history
This lib is now usable only at compile time.
  • Loading branch information
backuitist committed Jun 13, 2018
1 parent cecb10b commit f65f2e2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 22 deletions.
Expand Up @@ -250,11 +250,19 @@ class DerivationMacros(val c: blackbox.Context) extends ScalaVersionCompat {

c.Expr[Decoder[T]](
q"""
new _root_.io.circe.derivation.DerivedDecoder[$tpe] {
new _root_.io.circe.Decoder[$tpe] {
..$instanceDefs

final def apply(c: _root_.io.circe.HCursor): _root_.io.circe.Decoder.Result[$tpe] = $result

private[this] def errors(
results: _root_.scala.List[_root_.io.circe.AccumulatingDecoder.Result[_]]
): _root_.scala.List[_root_.io.circe.DecodingFailure] = {
results.iterator.collect {
case _root_.cats.data.Validated.Invalid(errors) => errors.toList
}.flatten.toList
}

final override def decodeAccumulating(
c: _root_.io.circe.HCursor
): _root_.io.circe.AccumulatingDecoder.Result[$tpe] = $resultAccumulating
Expand Down

This file was deleted.

0 comments on commit f65f2e2

Please sign in to comment.