From 55688f019f0c2929069e11cfe37159e75efc47cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Koz=C5=82owski?= Date: Wed, 2 Jul 2025 21:01:11 +0200 Subject: [PATCH 1/5] Simplify sjsonnew --- .../SmithyTraitCodegen.scala | 41 ++++--------------- 1 file changed, 9 insertions(+), 32 deletions(-) diff --git a/sbtPlugin/src/main/scala/org/polyvariant/smithytraitcodegen/SmithyTraitCodegen.scala b/sbtPlugin/src/main/scala/org/polyvariant/smithytraitcodegen/SmithyTraitCodegen.scala index 95caae1..46d717b 100644 --- a/sbtPlugin/src/main/scala/org/polyvariant/smithytraitcodegen/SmithyTraitCodegen.scala +++ b/sbtPlugin/src/main/scala/org/polyvariant/smithytraitcodegen/SmithyTraitCodegen.scala @@ -46,41 +46,18 @@ object SmithyTraitCodegen { object Args { - // format: off - private type ArgsDeconstructed = String :*: String :*: os.Path :*: PathRef :*: List[PathRef] :*: List[String] :*: LNil - // format: on - private implicit val pathFormat: JsonFormat[os.Path] = BasicJsonProtocol .projectFormat[os.Path, File](p => p.toIO, file => os.Path(file)) - implicit val argsIso = LList.iso[Args, ArgsDeconstructed]( - { - args: Args => ("javaPackage", args.javaPackage) :*: - ("smithyNamespace", args.smithyNamespace) :*: - ("targetDir", args.targetDir) :*: - ("smithySourcesDir", args.smithySourcesDir) :*: - ("dependencies", args.dependencies) :*: - ("externalProviders", args.externalProviders) :*: - LNil - }, - { - case (_, javaPackage) :*: - (_, smithyNamespace) :*: - (_, targetDir) :*: - (_, smithySourcesDir) :*: - (_, dependencies) :*: - (_, externalProviders) :*: - LNil => - Args( - javaPackage = javaPackage, - smithyNamespace = smithyNamespace, - targetDir = targetDir, - smithySourcesDir = smithySourcesDir, - dependencies = dependencies, - externalProviders = externalProviders, - ) - }, - ) + implicit val argsFmt: JsonFormat[Args] = + caseClass(Args.apply _, Args.unapply _)( + "javaPackage", + "smithyNamespace", + "targetDir", + "smithySourcesDir", + "dependencies", + "externalProviders", + ) } From fa9d69a300cd66ab6a1f1dbf1e2ceee702c3f2f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Koz=C5=82owski?= Date: Wed, 2 Jul 2025 21:04:45 +0200 Subject: [PATCH 2/5] silence mima --- build.sbt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build.sbt b/build.sbt index fca19c8..8045498 100644 --- a/build.sbt +++ b/build.sbt @@ -53,6 +53,11 @@ lazy val sbtPlugin = project scriptedLaunchOpts.value ++ Seq("-Xmx1024M", "-Dplugin.version=" + version.value), scriptedBufferLog := false, + mimaBinaryIssueFilters ++= Seq( + ProblemFilters.exclude[DirectMissingMethodProblem]( + "org.polyvariant.smithytraitcodegen.SmithyTraitCodegen#Args.argsIso" + ) + ), ) .enablePlugins(SbtPlugin) From 09b9a8b040f7ac105122f4ced504a77c19dcfd90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Koz=C5=82owski?= Date: Wed, 2 Jul 2025 21:06:36 +0200 Subject: [PATCH 3/5] jfc --- build.sbt | 1 + 1 file changed, 1 insertion(+) diff --git a/build.sbt b/build.sbt index 8045498..a852c03 100644 --- a/build.sbt +++ b/build.sbt @@ -1,3 +1,4 @@ +import com.typesafe.tools.mima.core.DirectMissingMethodProblem ThisBuild / tlBaseVersion := "0.2" ThisBuild / organization := "org.polyvariant" ThisBuild / organizationName := "Polyvariant" From 98ebe7ec1d0a438abe8c68269203ee7fba5d3a05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Koz=C5=82owski?= Date: Wed, 2 Jul 2025 21:07:34 +0200 Subject: [PATCH 4/5] eh --- build.sbt | 1 + 1 file changed, 1 insertion(+) diff --git a/build.sbt b/build.sbt index a852c03..7e1f415 100644 --- a/build.sbt +++ b/build.sbt @@ -1,3 +1,4 @@ +import com.typesafe.tools.mima.core.ProblemFilters import com.typesafe.tools.mima.core.DirectMissingMethodProblem ThisBuild / tlBaseVersion := "0.2" ThisBuild / organization := "org.polyvariant" From 01b35e79710858ff90b5fcfaf0b5446ff3d5227d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Koz=C5=82owski?= Date: Wed, 2 Jul 2025 21:07:48 +0200 Subject: [PATCH 5/5] no mima at all --- build.sbt | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/build.sbt b/build.sbt index 7e1f415..c54baad 100644 --- a/build.sbt +++ b/build.sbt @@ -1,5 +1,3 @@ -import com.typesafe.tools.mima.core.ProblemFilters -import com.typesafe.tools.mima.core.DirectMissingMethodProblem ThisBuild / tlBaseVersion := "0.2" ThisBuild / organization := "org.polyvariant" ThisBuild / organizationName := "Polyvariant" @@ -55,12 +53,8 @@ lazy val sbtPlugin = project scriptedLaunchOpts.value ++ Seq("-Xmx1024M", "-Dplugin.version=" + version.value), scriptedBufferLog := false, - mimaBinaryIssueFilters ++= Seq( - ProblemFilters.exclude[DirectMissingMethodProblem]( - "org.polyvariant.smithytraitcodegen.SmithyTraitCodegen#Args.argsIso" - ) - ), ) + .disablePlugins(MimaPlugin) .enablePlugins(SbtPlugin) lazy val root = project