diff --git a/.sbtopts b/.sbtopts index 9578b3464..a1c67b18c 100644 --- a/.sbtopts +++ b/.sbtopts @@ -3,4 +3,4 @@ -J-Xss2m -J-Xms512M -J-Xmx6G --J-XX:ReservedCodeCacheSize=256M \ No newline at end of file +-J-XX:ReservedCodeCacheSize=256M diff --git a/build.sbt b/build.sbt index 01e9d4e36..5f27c1340 100644 --- a/build.sbt +++ b/build.sbt @@ -232,8 +232,7 @@ lazy val scalacheck = projectMatrix Dependencies.collectionsCompat.value, Dependencies.Scalacheck.scalacheck.value ), - libraryDependencies ++= munitDeps.value, - testFrameworks += new TestFramework("weaver.framework.CatsEffect") + libraryDependencies ++= munitDeps.value ) .jvmPlatform(allJvmScalaVersions, jvmDimSettings) .jsPlatform(allJsScalaVersions, jsDimSettings) @@ -402,7 +401,7 @@ lazy val codegenPlugin = (projectMatrix in file("modules/codegen-plugin")) sbtPlugin := true, scriptedLaunchOpts := { scriptedLaunchOpts.value ++ - Seq("-Xmx1024M", "-Dplugin.version=" + version.value) + Seq("-Xmx1G", "-Dplugin.version=" + version.value) }, Compile / unmanagedSources / excludeFilter := { f => Glob("**/sbt-test/**").matches(f.toPath) @@ -707,7 +706,6 @@ lazy val complianceTests = projectMatrix Dependencies.Weaver.cats.value % Test ) }, - testFrameworks += new TestFramework("weaver.framework.CatsEffect"), Test / smithySpecs := Seq( (ThisBuild / baseDirectory).value / "sampleSpecs" / "test.smithy" ), diff --git a/modules/aws-http4s/src/smithy4s/aws/http4s/AwsHttp4sBackend.scala b/modules/aws-http4s/src/smithy4s/aws/http4s/AwsHttp4sBackend.scala index 9a31ec923..507efaa73 100644 --- a/modules/aws-http4s/src/smithy4s/aws/http4s/AwsHttp4sBackend.scala +++ b/modules/aws-http4s/src/smithy4s/aws/http4s/AwsHttp4sBackend.scala @@ -32,6 +32,7 @@ import org.typelevel.ci.CIString import smithy4s.aws.SimpleHttpClient import smithy4s.http.CaseInsensitive import smithy4s.http.HttpMethod +import org.http4s.Method final class AwsHttp4sBackend[F[_]: Concurrent](client: Client[F]) extends SimpleHttpClient[F] { @@ -53,12 +54,13 @@ object AwsHttp4sBackend { for { endpoint <- Uri.fromString(request.uri).liftTo[F] - method = request.httpMethod match { - case HttpMethod.POST => POST - case HttpMethod.GET => GET - case HttpMethod.PATCH => PATCH - case HttpMethod.PUT => PUT - case HttpMethod.DELETE => DELETE + method <- request.httpMethod match { + case HttpMethod.POST => POST.pure[F] + case HttpMethod.GET => GET.pure[F] + case HttpMethod.PATCH => PATCH.pure[F] + case HttpMethod.PUT => PUT.pure[F] + case HttpMethod.DELETE => DELETE.pure[F] + case HttpMethod.OTHER(value) => Method.fromString(value).liftTo[F] } req = request.body .foldLeft( diff --git a/modules/core/src/smithy4s/Refinement.scala b/modules/core/src/smithy4s/Refinement.scala index 8cbd21d68..05c715b3a 100644 --- a/modules/core/src/smithy4s/Refinement.scala +++ b/modules/core/src/smithy4s/Refinement.scala @@ -40,9 +40,6 @@ trait Refinement[A, B] { self => */ def unsafe(a: A): B - @deprecated("use unsafe instead") - def unchecked(a: A): B = unsafe(a) - final val asFunction: A => Either[ConstraintError, B] = (a: A) => apply(a).left.map(msg => diff --git a/modules/core/src/smithy4s/http/HttpEndpoint.scala b/modules/core/src/smithy4s/http/HttpEndpoint.scala index 5566e2053..2d8ef0e82 100644 --- a/modules/core/src/smithy4s/http/HttpEndpoint.scala +++ b/modules/core/src/smithy4s/http/HttpEndpoint.scala @@ -38,17 +38,27 @@ object HttpEndpoint { def unapply[Op[_, _, _, _, _], I, E, O, SI, SO]( endpoint: Endpoint[Op, I, E, O, SI, SO] - ): Option[HttpEndpoint[I]] = cast(endpoint) + ): Option[HttpEndpoint[I]] = cast(endpoint).toOption def cast[Op[_, _, _, _, _], I, E, O, SI, SO]( endpoint: Endpoint[Op, I, E, O, SI, SO] - ): Option[HttpEndpoint[I]] = { + ): Either[HttpEndpointError, HttpEndpoint[I]] = { for { - http <- endpoint.hints.get(Http) - httpMethod <- HttpMethod.fromString(http.method.value) - httpPath <- internals.pathSegments(http.uri.value) + http <- endpoint.hints + .get(Http) + .toRight(HttpEndpointError("Operation doesn't have a @http trait")) + httpMethod = HttpMethod.fromStringOrDefault(http.method.value) + httpPath <- internals + .pathSegments(http.uri.value) + .toRight( + HttpEndpointError( + s"Unable to parse HTTP path template: ${http.uri.value}" + ) + ) encoder <- SchemaVisitorPathEncoder( endpoint.input.addHints(http) + ).toRight( + HttpEndpointError("Unable to encode operation input in HTTP path") ) } yield { @@ -61,4 +71,6 @@ object HttpEndpoint { } } + case class HttpEndpointError(message: String) extends Exception(message) + } diff --git a/modules/core/src/smithy4s/http/Method.scala b/modules/core/src/smithy4s/http/Method.scala index c48a15999..610e1b19c 100644 --- a/modules/core/src/smithy4s/http/Method.scala +++ b/modules/core/src/smithy4s/http/Method.scala @@ -16,21 +16,23 @@ package smithy4s.http -sealed trait HttpMethod { +sealed trait HttpMethod extends Product with Serializable { def showUppercase = this match { - case HttpMethod.PUT => "PUT" - case HttpMethod.POST => "POST" - case HttpMethod.DELETE => "DELETE" - case HttpMethod.GET => "GET" - case HttpMethod.PATCH => "PATCH" + case HttpMethod.PUT => "PUT" + case HttpMethod.POST => "POST" + case HttpMethod.DELETE => "DELETE" + case HttpMethod.GET => "GET" + case HttpMethod.PATCH => "PATCH" + case HttpMethod.OTHER(value) => value.toUpperCase } def showCapitalised = this match { - case HttpMethod.PUT => "Put" - case HttpMethod.POST => "Post" - case HttpMethod.DELETE => "Delete" - case HttpMethod.GET => "Get" - case HttpMethod.PATCH => "Patch" + case HttpMethod.PUT => "Put" + case HttpMethod.POST => "Post" + case HttpMethod.DELETE => "Delete" + case HttpMethod.GET => "Get" + case HttpMethod.PATCH => "Patch" + case HttpMethod.OTHER(value) => value.capitalize } } @@ -40,10 +42,20 @@ object HttpMethod { case object DELETE extends HttpMethod case object GET extends HttpMethod case object PATCH extends HttpMethod + case class OTHER(value: String) extends HttpMethod - val values = List(PUT, POST, DELETE, GET, PATCH) + val values: List[HttpMethod] = + List(PUT, POST, DELETE, GET, PATCH) - def fromString(s: String): Option[HttpMethod] = values.find { m => - CaseInsensitive(s) == CaseInsensitive(m.showCapitalised) + def fromStringOrDefault(s: String): HttpMethod = + fromStringOption(s).getOrElse(OTHER(s.toUpperCase)) + + private def fromStringOption(s: String): Option[HttpMethod] = { + val nameCI = CaseInsensitive(s) + + values + .find { m => + nameCI == CaseInsensitive(m.showCapitalised) + } } } diff --git a/modules/core/src/smithy4s/http/internals/ErrorCodeSchemaVisitor.scala b/modules/core/src/smithy4s/http/internals/ErrorCodeSchemaVisitor.scala index d2a566bc7..a753fd598 100644 --- a/modules/core/src/smithy4s/http/internals/ErrorCodeSchemaVisitor.scala +++ b/modules/core/src/smithy4s/http/internals/ErrorCodeSchemaVisitor.scala @@ -20,7 +20,7 @@ package internals import smithy4s.schema._ -private[smithy4s] class ErrorCodeSchemaVisitor( +private[http] class ErrorCodeSchemaVisitor( val cache: CompilationCache[HttpCode] ) extends SchemaVisitor.Cached[HttpCode] with SchemaVisitor.Default[HttpCode] { compile => diff --git a/modules/core/src/smithy4s/http/internals/StringAndBlobCodecSchemaVisitor.scala b/modules/core/src/smithy4s/http/internals/StringAndBlobCodecSchemaVisitor.scala index e7de47c5b..3d71e8d1f 100644 --- a/modules/core/src/smithy4s/http/internals/StringAndBlobCodecSchemaVisitor.scala +++ b/modules/core/src/smithy4s/http/internals/StringAndBlobCodecSchemaVisitor.scala @@ -28,7 +28,7 @@ import StringAndBlobCodecSchemaVisitor._ import smithy.api.HttpPayload import java.nio.ByteBuffer -private[smithy4s] object StringAndBlobCodecSchemaVisitor { +private[http] object StringAndBlobCodecSchemaVisitor { trait SimpleCodec[A] { self => def mediaType: HttpMediaType @@ -89,7 +89,7 @@ private[smithy4s] object StringAndBlobCodecSchemaVisitor { } -private[smithy4s] class StringAndBlobCodecSchemaVisitor +private[http] class StringAndBlobCodecSchemaVisitor extends SchemaVisitor.Default[CodecResult] { override def default[A]: CodecResult[A] = noop diff --git a/modules/core/src/smithy4s/http/internals/URIEncoderDecoder.scala b/modules/core/src/smithy4s/http/internals/URIEncoderDecoder.scala index 8b2a457c7..247f0f56f 100644 --- a/modules/core/src/smithy4s/http/internals/URIEncoderDecoder.scala +++ b/modules/core/src/smithy4s/http/internals/URIEncoderDecoder.scala @@ -20,6 +20,7 @@ package internals import scala.annotation.tailrec +// note: this should be private[http] but it's used in the aws-kernel module too private[smithy4s] object URIEncoderDecoder { val digits: String = "0123456789ABCDEF" diff --git a/modules/core/src/smithy4s/http/internals/package.scala b/modules/core/src/smithy4s/http/internals/package.scala index 4be4f2e23..ddaaafa5f 100644 --- a/modules/core/src/smithy4s/http/internals/package.scala +++ b/modules/core/src/smithy4s/http/internals/package.scala @@ -52,7 +52,7 @@ package object internals { } } - private[smithy4s] def pathSegments( + private[http] def pathSegments( str: String ): Option[Vector[PathSegment]] = { str diff --git a/modules/core/test/src/smithy4s/http/internals/PathSpec.scala b/modules/core/test/src/smithy4s/http/internals/PathSpec.scala index 0cbecd44d..d56d8b7af 100644 --- a/modules/core/test/src/smithy4s/http/internals/PathSpec.scala +++ b/modules/core/test/src/smithy4s/http/internals/PathSpec.scala @@ -63,6 +63,7 @@ class PathSpec() extends munit.FunSuite { .cast( DummyPath ) + .toTry .get .path( PathParams( diff --git a/modules/decline/src/Smithy4sCli.scala b/modules/decline/src/Smithy4sCli.scala index 44ec603d1..16e795857 100644 --- a/modules/decline/src/Smithy4sCli.scala +++ b/modules/decline/src/Smithy4sCli.scala @@ -53,6 +53,7 @@ class Smithy4sCli[Alg[_[_, _, _, _, _]], F[_]: MonadThrow]( ): List[String] = HttpEndpoint .cast(endpoint) + .toOption .map { httpEndpoint => val path = endpoint.hints .get(Http) diff --git a/modules/dynamic/test/src-jvm/smithy4s/dynamic/OperationSpec.scala b/modules/dynamic/test/src-jvm/smithy4s/dynamic/OperationSpec.scala index 0dcb61384..03308621d 100644 --- a/modules/dynamic/test/src-jvm/smithy4s/dynamic/OperationSpec.scala +++ b/modules/dynamic/test/src-jvm/smithy4s/dynamic/OperationSpec.scala @@ -94,7 +94,7 @@ class OperationSpec() extends munit.FunSuite { val httpEndpoints = endpoints.map(HttpEndpoint.cast(_)) expect( - httpEndpoints.forall(_.isDefined) + httpEndpoints.forall(_.isRight) ) } } diff --git a/modules/http4s/src/smithy4s/http4s/SimpleProtocolBuilder.scala b/modules/http4s/src/smithy4s/http4s/SimpleProtocolBuilder.scala index b6507c057..43d5c04b6 100644 --- a/modules/http4s/src/smithy4s/http4s/SimpleProtocolBuilder.scala +++ b/modules/http4s/src/smithy4s/http4s/SimpleProtocolBuilder.scala @@ -58,6 +58,7 @@ abstract class SimpleProtocolBuilder[P](val codecs: CodecAPI)(implicit def client[F[_]: EffectCompat](client: Client[F]) = new ClientBuilder[Alg, F](client, service) + @deprecated( "Use the ClientBuilder instead, client(client).uri(baseuri).use" ) diff --git a/modules/http4s/src/smithy4s/http4s/SmithyHttp4sReverseRouter.scala b/modules/http4s/src/smithy4s/http4s/SmithyHttp4sReverseRouter.scala index aec32919d..36ab95b19 100644 --- a/modules/http4s/src/smithy4s/http4s/SmithyHttp4sReverseRouter.scala +++ b/modules/http4s/src/smithy4s/http4s/SmithyHttp4sReverseRouter.scala @@ -50,16 +50,21 @@ class SmithyHttp4sReverseRouter[Alg[_[_, _, _, _, _]], Op[_, _, _, _, _], F[_]]( def apply[I, E, O, SI, SO]( endpoint: Endpoint[Op, I, E, O, SI, SO] ): SmithyHttp4sClientEndpoint[F, Op, I, E, O, SI, SO] = - SmithyHttp4sClientEndpoint( - baseUri, - client, - endpoint, - compilerContext - ).getOrElse( - sys.error( - s"Operation ${endpoint.name} is not bound to http semantics" + SmithyHttp4sClientEndpoint + .make( + baseUri, + client, + endpoint, + compilerContext ) - ) + .left + .map { e => + throw new Exception( + s"Operation ${endpoint.name} is not bound to http semantics", + e + ) + } + .merge }.unsafeCacheBy( service.endpoints.map(smithy4s.kinds.Kind5.existential(_)), identity diff --git a/modules/http4s/src/smithy4s/http4s/SmithyHttp4sRouter.scala b/modules/http4s/src/smithy4s/http4s/SmithyHttp4sRouter.scala index 749a70e54..c42baae2a 100644 --- a/modules/http4s/src/smithy4s/http4s/SmithyHttp4sRouter.scala +++ b/modules/http4s/src/smithy4s/http4s/SmithyHttp4sRouter.scala @@ -47,14 +47,14 @@ class SmithyHttp4sRouter[Alg[_[_, _, _, _, _]], Op[_, _, _, _, _], F[_]]( private val http4sEndpoints: List[SmithyHttp4sServerEndpoint[F]] = service.endpoints .map { ep => - SmithyHttp4sServerEndpoint( + SmithyHttp4sServerEndpoint.make( impl, ep, compilerContext, errorTransformation ) } - .collect { case Some(http4sEndpoint) => + .collect { case Right(http4sEndpoint) => http4sEndpoint } diff --git a/modules/http4s/src/smithy4s/http4s/internals/SmithyHttp4sClientEndpoint.scala b/modules/http4s/src/smithy4s/http4s/internals/SmithyHttp4sClientEndpoint.scala index 5e726e6b4..3bcf5b6a7 100644 --- a/modules/http4s/src/smithy4s/http4s/internals/SmithyHttp4sClientEndpoint.scala +++ b/modules/http4s/src/smithy4s/http4s/internals/SmithyHttp4sClientEndpoint.scala @@ -34,35 +34,48 @@ import smithy4s.kinds._ * client into a high-level, domain specific function. */ // format: off -private[smithy4s] trait SmithyHttp4sClientEndpoint[F[_], Op[_, _, _, _, _], I, E, O, SI, SO] { +private[http4s] trait SmithyHttp4sClientEndpoint[F[_], Op[_, _, _, _, _], I, E, O, SI, SO] { def send(input: I): F[O] } // format: on -private[smithy4s] object SmithyHttp4sClientEndpoint { +private[http4s] object SmithyHttp4sClientEndpoint { - def apply[F[_]: EffectCompat, Op[_, _, _, _, _], I, E, O, SI, SO]( + def make[F[_]: EffectCompat, Op[_, _, _, _, _], I, E, O, SI, SO]( baseUri: Uri, client: Client[F], endpoint: Endpoint[Op, I, E, O, SI, SO], compilerContext: CompilerContext[F] - ): Option[SmithyHttp4sClientEndpoint[F, Op, I, E, O, SI, SO]] = - HttpEndpoint.cast(endpoint).map { httpEndpoint => - new SmithyHttp4sClientEndpointImpl[F, Op, I, E, O, SI, SO]( - baseUri, - client, - endpoint, - httpEndpoint, - compilerContext - ) + ): Either[ + HttpEndpoint.HttpEndpointError, + SmithyHttp4sClientEndpoint[F, Op, I, E, O, SI, SO] + ] = + HttpEndpoint.cast(endpoint).flatMap { httpEndpoint => + toHttp4sMethod(httpEndpoint.method) + .leftMap { e => + HttpEndpoint.HttpEndpointError( + "Couldn't parse HTTP method: " + e + ) + } + .map { method => + new SmithyHttp4sClientEndpointImpl[F, Op, I, E, O, SI, SO]( + baseUri, + client, + method, + endpoint, + httpEndpoint, + compilerContext + ) + } } } // format: off -private[smithy4s] class SmithyHttp4sClientEndpointImpl[F[_], Op[_, _, _, _, _], I, E, O, SI, SO]( +private[http4s] class SmithyHttp4sClientEndpointImpl[F[_], Op[_, _, _, _, _], I, E, O, SI, SO]( baseUri: Uri, client: Client[F], + method: org.http4s.Method, endpoint: Endpoint[Op, I, E, O, SI, SO], httpEndpoint: HttpEndpoint[I], compilerContext: CompilerContext[F] @@ -78,7 +91,6 @@ private[smithy4s] class SmithyHttp4sClientEndpointImpl[F[_], Op[_, _, _, _, _], } import compilerContext._ - private val method: org.http4s.Method = toHttp4sMethod(httpEndpoint.method) private val inputSchema: Schema[I] = endpoint.input private val outputSchema: Schema[O] = endpoint.output diff --git a/modules/http4s/src/smithy4s/http4s/internals/SmithyHttp4sServerEndpoint.scala b/modules/http4s/src/smithy4s/http4s/internals/SmithyHttp4sServerEndpoint.scala index 6c630de29..629e3e761 100644 --- a/modules/http4s/src/smithy4s/http4s/internals/SmithyHttp4sServerEndpoint.scala +++ b/modules/http4s/src/smithy4s/http4s/internals/SmithyHttp4sServerEndpoint.scala @@ -36,7 +36,7 @@ import smithy4s.kinds._ * A construct that encapsulates a smithy4s endpoint, and exposes * http4s specific semantics. */ -private[smithy4s] trait SmithyHttp4sServerEndpoint[F[_]] { +private[http4s] trait SmithyHttp4sServerEndpoint[F[_]] { def method: org.http4s.Method def matches(path: Array[String]): Option[PathParams] def run(pathParams: PathParams, request: Request[F]): F[Response[F]] @@ -47,30 +47,43 @@ private[smithy4s] trait SmithyHttp4sServerEndpoint[F[_]] { matches(path).map(this -> _) } -private[smithy4s] object SmithyHttp4sServerEndpoint { +private[http4s] object SmithyHttp4sServerEndpoint { - def apply[F[_]: EffectCompat, Op[_, _, _, _, _], I, E, O, SI, SO]( + def make[F[_]: EffectCompat, Op[_, _, _, _, _], I, E, O, SI, SO]( impl: FunctorInterpreter[Op, F], endpoint: Endpoint[Op, I, E, O, SI, SO], compilerContext: CompilerContext[F], errorTransformation: PartialFunction[Throwable, F[Throwable]] - ): Option[SmithyHttp4sServerEndpoint[F]] = - HttpEndpoint.cast(endpoint).map { httpEndpoint => - new SmithyHttp4sServerEndpointImpl[F, Op, I, E, O, SI, SO]( - impl, - endpoint, - httpEndpoint, - compilerContext, - errorTransformation - ) + ): Either[ + HttpEndpoint.HttpEndpointError, + SmithyHttp4sServerEndpoint[F] + ] = + HttpEndpoint.cast(endpoint).flatMap { httpEndpoint => + toHttp4sMethod(httpEndpoint.method) + .leftMap { e => + HttpEndpoint.HttpEndpointError( + "Couldn't parse HTTP method: " + e + ) + } + .map { method => + new SmithyHttp4sServerEndpointImpl[F, Op, I, E, O, SI, SO]( + impl, + endpoint, + method, + httpEndpoint, + compilerContext, + errorTransformation + ) + } } } // format: off -private[smithy4s] class SmithyHttp4sServerEndpointImpl[F[_], Op[_, _, _, _, _], I, E, O, SI, SO]( +private[http4s] class SmithyHttp4sServerEndpointImpl[F[_], Op[_, _, _, _, _], I, E, O, SI, SO]( impl: FunctorInterpreter[Op, F], endpoint: Endpoint[Op, I, E, O, SI, SO], + val method: Method, httpEndpoint: HttpEndpoint[I], compilerContext: CompilerContext[F], errorTransformation: PartialFunction[Throwable, F[Throwable]], @@ -80,8 +93,6 @@ private[smithy4s] class SmithyHttp4sServerEndpointImpl[F[_], Op[_, _, _, _, _], type ==>[A, B] = Kleisli[F, A, B] - val method: Method = toHttp4sMethod(httpEndpoint.method) - def matches(path: Array[String]): Option[PathParams] = { httpEndpoint.matches(path) } diff --git a/modules/http4s/src/smithy4s/http4s/package.scala b/modules/http4s/src/smithy4s/http4s/package.scala index 5968e6a60..fb1ecc506 100644 --- a/modules/http4s/src/smithy4s/http4s/package.scala +++ b/modules/http4s/src/smithy4s/http4s/package.scala @@ -23,6 +23,8 @@ import org.http4s.{Method => Http4sMethod} import org.typelevel.ci.CIString import smithy4s.http.CaseInsensitive import smithy4s.http.{HttpMethod => SmithyMethod} +import org.http4s.ParseFailure +import cats.implicits._ package object http4s extends Compat.Package { @@ -35,13 +37,16 @@ package object http4s extends Compat.Package { } - private[smithy4s] def toHttp4sMethod(method: SmithyMethod): Http4sMethod = + private[smithy4s] def toHttp4sMethod( + method: SmithyMethod + ): Either[ParseFailure, Http4sMethod] = method match { - case smithy4s.http.HttpMethod.PUT => Http4sMethod.PUT - case smithy4s.http.HttpMethod.POST => Http4sMethod.POST - case smithy4s.http.HttpMethod.DELETE => Http4sMethod.DELETE - case smithy4s.http.HttpMethod.GET => Http4sMethod.GET - case smithy4s.http.HttpMethod.PATCH => Http4sMethod.PATCH + case smithy4s.http.HttpMethod.PUT => Http4sMethod.PUT.asRight + case smithy4s.http.HttpMethod.POST => Http4sMethod.POST.asRight + case smithy4s.http.HttpMethod.DELETE => Http4sMethod.DELETE.asRight + case smithy4s.http.HttpMethod.GET => Http4sMethod.GET.asRight + case smithy4s.http.HttpMethod.PATCH => Http4sMethod.PATCH.asRight + case smithy4s.http.HttpMethod.OTHER(v) => Http4sMethod.fromString(v) } private[smithy4s] def toHeaders(mp: Map[CaseInsensitive, Seq[String]]) = diff --git a/project/MimaVersionPlugin.scala b/project/MimaVersionPlugin.scala index 98a845483..fae0b0509 100644 --- a/project/MimaVersionPlugin.scala +++ b/project/MimaVersionPlugin.scala @@ -8,10 +8,9 @@ import com.github.sbt.git.GitPlugin import com.github.sbt.git.SbtGit.git import scala.util.Try import com.typesafe.tools.mima.core.ProblemFilters -import com.typesafe.tools.mima.core.ReversedMissingMethodProblem import com.typesafe.tools.mima.core.Problem import com.typesafe.tools.mima.core.IncompatibleResultTypeProblem -import com.typesafe.tools.mima.core.DirectMissingMethodProblem +import com.typesafe.tools.mima.core.ReversedMissingMethodProblem // Adapted from https://github.com/djspiewak/sbt-spiewak object MimaVersionPlugin extends AutoPlugin { @@ -85,14 +84,7 @@ object MimaVersionPlugin extends AutoPlugin { mimaBinaryIssueFilters ++= Seq( // Focusing on backward compat as opposed to forward, for now. ProblemFilters.exclude[ReversedMissingMethodProblem]("smithy4s.*"), - ProblemFilters.exclude[Problem]("*.internals*"), - ProblemFilters.exclude[IncompatibleResultTypeProblem]("*fromSchema"), - ProblemFilters.exclude[DirectMissingMethodProblem]( - "smithy4s.http.json.JsonCodecAPI.$default$2" - ), - ProblemFilters.exclude[DirectMissingMethodProblem]( - "smithy4s.http.json.JsonCodecAPI.compileCodec" - ) + ProblemFilters.exclude[Problem]("*.internals*") ), mimaReportBinaryIssuesIfRelevant := filterTaskWhereRelevant( mimaReportBinaryIssues