diff --git a/build.sbt b/build.sbt index 9f7350e..4da9bb1 100644 --- a/build.sbt +++ b/build.sbt @@ -49,10 +49,7 @@ lazy val `test-codegen` = .settings( publish / skip := true, Compile / unmanagedSourceDirectories := Seq(baseDirectory.value), - scalacOptions += "-Ymacro-annotations", libraryDependencies ++= Seq( - "com.typesafe.slick" %% "slick" % slickVersion, - "io.circe" %% "circe-generic" % "0.14.5", - "dev.optics" %% "monocle-macro" % "3.2.0" + "com.typesafe.slick" %% "slick" % slickVersion ) ) diff --git a/slick-additions-codegen/src/test/resources/entity/Models.scala b/slick-additions-codegen/src/test/resources/entity/Models.scala index 8275333..7c067ab 100644 --- a/slick-additions-codegen/src/test/resources/entity/Models.scala +++ b/slick-additions-codegen/src/test/resources/entity/Models.scala @@ -1,9 +1,7 @@ package entity -import slick.additions.entity.Lookup, io.circe.generic.JsonCodec, - monocle.macros.Lenses -@JsonCodec @Lenses case class ColorsRow(name: String) -object ColorsRow -@JsonCodec @Lenses case class PeopleRow( +import slick.additions.entity.Lookup +case class ColorsRow(name: String) +case class PeopleRow( first: String, last: String, city: String = "New York", @@ -28,4 +26,3 @@ object ColorsRow col23: Option[Int] = None, col24: Option[Int] = None ) -object PeopleRow diff --git a/slick-additions-codegen/src/test/resources/entity/package.scala b/slick-additions-codegen/src/test/resources/entity/package.scala deleted file mode 100644 index 61fcfbe..0000000 --- a/slick-additions-codegen/src/test/resources/entity/package.scala +++ /dev/null @@ -1,10 +0,0 @@ -import slick.additions.entity.{EntityKey, Lookup} - -import cats.implicits.toInvariantOps -import io.circe.{Codec, Decoder, Encoder} - - -package object entity { - implicit def codecLookup[K : Encoder: Decoder,A]: Codec[Lookup[K, A]] = - Codec.from(Decoder[K], Encoder[K]).imap[Lookup[K, A]](EntityKey[K, A])(_.key) -} diff --git a/slick-additions-codegen/src/test/scala/slick/additions/codegen/CodeGeneration.scala b/slick-additions-codegen/src/test/scala/slick/additions/codegen/CodeGeneration.scala index 7b318dc..a6051e1 100644 --- a/slick-additions-codegen/src/test/scala/slick/additions/codegen/CodeGeneration.scala +++ b/slick-additions-codegen/src/test/scala/slick/additions/codegen/CodeGeneration.scala @@ -1,9 +1,5 @@ package slick.additions.codegen -import slick.additions.codegen.extra.circe.CirceJsonCodecModelsCodeGenerator -import slick.additions.codegen.extra.monocle.MonocleLensesModelsCodeGenerator - - case class CodeGeneration(generator: BaseCodeGenerator, rules: GenerationRules) { def pkgName = rules.packageName val filename: String = s"${pkgName}/${rules.container}.scala" @@ -19,7 +15,7 @@ object CodeGeneration new TestGenerationRules("TableModules", "entity") with EntityGenerationRules ), CodeGeneration( - new KeylessModelsCodeGenerator with MonocleLensesModelsCodeGenerator with CirceJsonCodecModelsCodeGenerator, + new KeylessModelsCodeGenerator, new TestGenerationRules("Models", "entity") with EntityGenerationRules ) )