From 4f889a741f78cf053d7ff6cbef880d872522203e Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Sat, 10 Feb 2024 08:27:42 +0800 Subject: [PATCH 1/5] . --- build.sc | 20 +-- mainargs/src/Parser.scala | 258 ++------------------------------------ 2 files changed, 25 insertions(+), 253 deletions(-) diff --git a/build.sc b/build.sc index d808c6a..0ade19d 100644 --- a/build.sc +++ b/build.sc @@ -8,7 +8,7 @@ import com.github.lolgab.mill.mima._ val scala212 = "2.12.17" val scala213 = "2.13.10" -val scala3 = "3.1.3" +val scala3 = "3.3.1" val osLib = "0.9.1" val acyclic = "0.3.9" @@ -42,18 +42,22 @@ trait MainArgsPublishModule super.scalacOptions() ++ Option.when(!isScala3(scalaVersion()))("-P:acyclic:force") - def scalacPluginIvyDeps = + def scalacPluginIvyDeps = T{ super.scalacPluginIvyDeps() ++ - Option.when(!isScala3(scalaVersion()))(ivy"com.lihaoyi:::acyclic:${acyclic}") + Agg(ivy"com.lihaoyi::unroll-plugin:0.1.3") ++ + Option.when(!isScala3(scalaVersion()))(ivy"com.lihaoyi:::acyclic:${acyclic}") + } def compileIvyDeps = super.compileIvyDeps() ++ - Agg.when(!isScala3(crossScalaVersion))( - ivy"com.lihaoyi:::acyclic:${acyclic}", - ivy"org.scala-lang:scala-reflect:$crossScalaVersion" - ) + Agg.when(!isScala3(crossScalaVersion))( + ivy"com.lihaoyi:::acyclic:${acyclic}", + ivy"org.scala-lang:scala-reflect:$crossScalaVersion", + + ) def ivyDeps = Agg( + ivy"com.lihaoyi::unroll-annotation:0.1.3", ivy"org.scala-lang.modules::scala-collection-compat::2.8.1", ) } @@ -80,7 +84,7 @@ object mainargs extends Module { object native extends Cross[NativeMainArgsModule](scalaVersions) trait NativeMainArgsModule extends MainArgsPublishModule with ScalaNativeModule { - def scalaNativeVersion = "0.4.7" + def scalaNativeVersion = "0.4.14" object test extends ScalaNativeTests with CommonTestModule } } diff --git a/mainargs/src/Parser.scala b/mainargs/src/Parser.scala index b9288c9..33883fb 100644 --- a/mainargs/src/Parser.scala +++ b/mainargs/src/Parser.scala @@ -4,25 +4,15 @@ import acyclic.skipped import scala.language.experimental.macros import java.io.PrintStream - +import unroll.Unroll object ParserForMethods extends ParserForMethodsCompanionVersionSpecific class ParserForMethods[B](val mains: MethodMains[B]) { - @deprecated("Binary Compatibility Shim", "mainargs 0.6.0") - def helpText( - totalWidth: Int, - docsOnNewLine: Boolean, - customNames: Map[String, String], - customDocs: Map[String, String], - sorted: Boolean): String = { - helpText(totalWidth, docsOnNewLine, customNames, customDocs, sorted, Util.kebabCaseNameMapper) - } - def helpText( totalWidth: Int = 100, docsOnNewLine: Boolean = false, customNames: Map[String, String] = Map(), customDocs: Map[String, String] = Map(), - sorted: Boolean = true, + @Unroll sorted: Boolean = true, nameMapper: String => Option[String] = Util.kebabCaseNameMapper ): String = { Renderer.formatMainMethods( @@ -36,14 +26,6 @@ class ParserForMethods[B](val mains: MethodMains[B]) { ) } - @deprecated("Binary compatibility shim, use other overload instead", "mainargs after 0.3.0") - private[mainargs] def helpText( - totalWidth: Int, - docsOnNewLine: Boolean, - customNames: Map[String, String], - customDocs: Map[String, String] - ): String = helpText(totalWidth, docsOnNewLine, customNames, customDocs, sorted = true) - def runOrExit( args: Seq[String], allowPositional: Boolean = false, @@ -74,28 +56,6 @@ class ParserForMethods[B](val mains: MethodMains[B]) { } } - def runOrThrow( - args: Seq[String], - allowPositional: Boolean, - allowRepeats: Boolean, - totalWidth: Int, - printHelpOnExit: Boolean, - docsOnNewLine: Boolean, - autoPrintHelpAndExit: Option[(Int, PrintStream)], - customNames: Map[String, String], - customDocs: Map[String, String], - ): Any = runOrThrow( - args, - allowPositional, - allowRepeats, - totalWidth, - printHelpOnExit, - docsOnNewLine, - autoPrintHelpAndExit, - customNames, - customDocs, - ) - def runOrThrow( args: Seq[String], allowPositional: Boolean = false, @@ -106,7 +66,7 @@ class ParserForMethods[B](val mains: MethodMains[B]) { autoPrintHelpAndExit: Option[(Int, PrintStream)] = Some((0, System.out)), customNames: Map[String, String] = Map(), customDocs: Map[String, String] = Map(), - nameMapper: String => Option[String] = Util.kebabCaseNameMapper + @Unroll nameMapper: String => Option[String] = Util.kebabCaseNameMapper ): Any = { runEither( args, @@ -135,7 +95,7 @@ class ParserForMethods[B](val mains: MethodMains[B]) { autoPrintHelpAndExit: Option[(Int, PrintStream)] = Some((0, System.out)), customNames: Map[String, String] = Map(), customDocs: Map[String, String] = Map(), - sorted: Boolean = false, + @Unroll sorted: Boolean = false, nameMapper: String => Option[String] = Util.kebabCaseNameMapper ): Either[String, Any] = { if (autoPrintHelpAndExit.nonEmpty && args.take(1) == Seq("--help")) { @@ -165,70 +125,11 @@ class ParserForMethods[B](val mains: MethodMains[B]) { } } - @deprecated("Binary compatibility shim, use other overload instead", "mainargs after 0.3.0") - private[mainargs] def runEither( - args: Seq[String], - allowPositional: Boolean, - allowRepeats: Boolean, - totalWidth: Int, - printHelpOnExit: Boolean, - docsOnNewLine: Boolean, - autoPrintHelpAndExit: Option[(Int, PrintStream)], - customNames: Map[String, String], - customDocs: Map[String, String] - ): Either[String, Any] = runEither( - args, - allowPositional, - allowRepeats, - totalWidth, - printHelpOnExit, - docsOnNewLine, - autoPrintHelpAndExit, - customNames, - customDocs, - sorted = false - ) - - - - @deprecated("Binary Compatibility Shim", "mainargs 0.6.0") - def runEither( - args: Seq[String], - allowPositional: Boolean, - allowRepeats: Boolean, - totalWidth: Int, - printHelpOnExit: Boolean, - docsOnNewLine: Boolean, - autoPrintHelpAndExit: Option[(Int, PrintStream)], - customNames: Map[String, String], - customDocs: Map[String, String], - sorted: Boolean - ): Either[String, Any] = runEither( - args, - allowPositional, - allowRepeats, - totalWidth, - printHelpOnExit, - docsOnNewLine, - autoPrintHelpAndExit, - customNames, - customDocs, - sorted, - Util.kebabCaseNameMapper - ) - @deprecated("Binary Compatibility Shim", "mainargs 0.6.0") - def runRaw( - args: Seq[String], - allowPositional: Boolean, - allowRepeats: Boolean, - ): Result[Any] = runRaw( - args, allowPositional, allowRepeats, Util.kebabCaseNameMapper - ) def runRaw( args: Seq[String], allowPositional: Boolean = false, allowRepeats: Boolean = false, - nameMapper: String => Option[String] = Util.kebabCaseNameMapper + @Unroll nameMapper: String => Option[String] = Util.kebabCaseNameMapper ): Result[Any] = { runRaw0(args, allowPositional, allowRepeats, nameMapper) match { case Left(err) => err @@ -236,23 +137,11 @@ class ParserForMethods[B](val mains: MethodMains[B]) { } } - @deprecated("Binary Compatibility Shim", "mainargs 0.6.0") - def runRaw0( - args: Seq[String], - allowPositional: Boolean, - allowRepeats: Boolean, - ): Either[Result.Failure.Early, (MainData[_, B], Result[Any])] = runRaw0( - args, - allowPositional, - allowRepeats, - Util.kebabCaseNameMapper - ) - def runRaw0( args: Seq[String], allowPositional: Boolean = false, allowRepeats: Boolean = false, - nameMapper: String => Option[String] = Util.kebabCaseNameMapper + @Unroll nameMapper: String => Option[String] = Util.kebabCaseNameMapper ): Either[Result.Failure.Early, (MainData[_, B], Result[Any])] = { for (tuple <- Invoker.runMains(mains, args, allowPositional, allowRepeats, nameMapper)) yield { val (errMsg, res) = tuple @@ -264,20 +153,13 @@ class ParserForMethods[B](val mains: MethodMains[B]) { object ParserForClass extends ParserForClassCompanionVersionSpecific class ParserForClass[T](val main: MainData[T, Any], val companion: () => Any) extends TokensReader.Class[T] { - @deprecated("Binary Compatibility Shim", "mainargs 0.6.0") - def helpText( - totalWidth: Int, - docsOnNewLine: Boolean, - customName: String, - customDoc: String, - sorted: Boolean): String = helpText(totalWidth, docsOnNewLine, customName, customDoc, sorted, Util.kebabCaseNameMapper) def helpText( totalWidth: Int = 100, docsOnNewLine: Boolean = false, customName: String = null, customDoc: String = null, - sorted: Boolean = true, + @Unroll sorted: Boolean = true, nameMapper: String => Option[String] = Util.kebabCaseNameMapper ): String = { Renderer.formatMainMethodSignature( @@ -293,39 +175,6 @@ class ParserForClass[T](val main: MainData[T, Any], val companion: () => Any) ) } - @deprecated("Binary compatibility shim, use other overload instead", "mainargs after 0.3.0") - private[mainargs] def helpText( - totalWidth: Int, - docsOnNewLine: Boolean, - customName: String, - customDoc: String - ): String = helpText(totalWidth, docsOnNewLine, customName, customDoc, sorted = true) - - @deprecated("Binary Compatibility Shim", "mainargs 0.6.0") - def constructOrExit( - args: Seq[String], - allowPositional: Boolean, - allowRepeats: Boolean, - stderr: PrintStream, - totalWidth: Int, - printHelpOnExit: Boolean, - docsOnNewLine: Boolean, - autoPrintHelpAndExit: Option[(Int, PrintStream)], - customName: String, - customDoc: String): T = constructOrExit( - args, - allowPositional, - allowRepeats, - stderr, - totalWidth, - printHelpOnExit, - docsOnNewLine, - autoPrintHelpAndExit, - customName, - customDoc, - Util.kebabCaseNameMapper - ) - def constructOrExit( args: Seq[String], allowPositional: Boolean = false, @@ -337,7 +186,7 @@ class ParserForClass[T](val main: MainData[T, Any], val companion: () => Any) autoPrintHelpAndExit: Option[(Int, PrintStream)] = Some((0, System.out)), customName: String = null, customDoc: String = null, - nameMapper: String => Option[String] = Util.kebabCaseNameMapper + @Unroll nameMapper: String => Option[String] = Util.kebabCaseNameMapper ): T = { constructEither( args, @@ -349,6 +198,7 @@ class ParserForClass[T](val main: MainData[T, Any], val companion: () => Any) autoPrintHelpAndExit, customName, customDoc, + sorted = false, nameMapper ) match { case Left(msg) => @@ -358,29 +208,6 @@ class ParserForClass[T](val main: MainData[T, Any], val companion: () => Any) } } - def constructOrThrow( - args: Seq[String], - allowPositional: Boolean, - allowRepeats: Boolean, - totalWidth: Int, - printHelpOnExit: Boolean, - docsOnNewLine: Boolean, - autoPrintHelpAndExit: Option[(Int, PrintStream)], - customName: String, - customDoc: String, - ): T = constructOrThrow( - args, - allowPositional, - allowRepeats, - totalWidth, - printHelpOnExit, - docsOnNewLine, - autoPrintHelpAndExit, - customName, - customDoc, - Util.kebabCaseNameMapper - ) - def constructOrThrow( args: Seq[String], allowPositional: Boolean = false, @@ -391,7 +218,7 @@ class ParserForClass[T](val main: MainData[T, Any], val companion: () => Any) autoPrintHelpAndExit: Option[(Int, PrintStream)] = Some((0, System.out)), customName: String = null, customDoc: String = null, - nameMapper: String => Option[String] = Util.kebabCaseNameMapper + @Unroll nameMapper: String => Option[String] = Util.kebabCaseNameMapper ): T = { constructEither( args, @@ -403,6 +230,7 @@ class ParserForClass[T](val main: MainData[T, Any], val companion: () => Any) autoPrintHelpAndExit, customName, customDoc, + sorted = false, nameMapper ) match { case Left(msg) => throw new Exception(msg) @@ -410,29 +238,6 @@ class ParserForClass[T](val main: MainData[T, Any], val companion: () => Any) } } - def constructEither( - args: Seq[String], - allowPositional: Boolean, - allowRepeats: Boolean, - totalWidth: Int, - printHelpOnExit: Boolean, - docsOnNewLine: Boolean, - autoPrintHelpAndExit: Option[(Int, PrintStream)], - customName: String, - customDoc: String, - sorted: Boolean, - ): Either[String, T] = constructEither( - args, - allowPositional, - allowRepeats, - totalWidth, - printHelpOnExit, - docsOnNewLine, - autoPrintHelpAndExit, - customName, - customDoc, - sorted, - ) def constructEither( args: Seq[String], allowPositional: Boolean = false, @@ -443,7 +248,7 @@ class ParserForClass[T](val main: MainData[T, Any], val companion: () => Any) autoPrintHelpAndExit: Option[(Int, PrintStream)] = Some((0, System.out)), customName: String = null, customDoc: String = null, - sorted: Boolean = true, + @Unroll sorted: Boolean = true, nameMapper: String => Option[String] = Util.kebabCaseNameMapper ): Either[String, T] = { if (autoPrintHelpAndExit.nonEmpty && args.take(1) == Seq("--help")) { @@ -469,48 +274,11 @@ class ParserForClass[T](val main: MainData[T, Any], val companion: () => Any) } } - /** binary compatibility shim. */ - private[mainargs] def constructEither( - args: Seq[String], - allowPositional: Boolean, - allowRepeats: Boolean, - totalWidth: Int, - printHelpOnExit: Boolean, - docsOnNewLine: Boolean, - autoPrintHelpAndExit: Option[(Int, PrintStream)], - customName: String, - customDoc: String, - nameMapper: String => Option[String] - ): Either[String, T] = constructEither( - args, - allowPositional, - allowRepeats, - totalWidth, - printHelpOnExit, - docsOnNewLine, - autoPrintHelpAndExit, - customName, - customDoc, - sorted = true, - nameMapper = nameMapper - ) - - def constructRaw( - args: Seq[String], - allowPositional: Boolean, - allowRepeats: Boolean, - ): Result[T] = constructRaw( - args, - allowPositional, - allowRepeats, - nameMapper = Util.kebabCaseNameMapper - ) - def constructRaw( args: Seq[String], allowPositional: Boolean = false, allowRepeats: Boolean = false, - nameMapper: String => Option[String] = Util.kebabCaseNameMapper + @Unroll nameMapper: String => Option[String] = Util.kebabCaseNameMapper ): Result[T] = { Invoker.construct[T](this, args, allowPositional, allowRepeats, nameMapper) } From 4c1b72d89a0134b0360b4344f37284c0ef51e5fe Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Sat, 10 Feb 2024 09:47:17 +0800 Subject: [PATCH 2/5] 0.1.7 --- build.sc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sc b/build.sc index 0ade19d..f17c500 100644 --- a/build.sc +++ b/build.sc @@ -44,7 +44,7 @@ trait MainArgsPublishModule def scalacPluginIvyDeps = T{ super.scalacPluginIvyDeps() ++ - Agg(ivy"com.lihaoyi::unroll-plugin:0.1.3") ++ + Agg(ivy"com.lihaoyi::unroll-plugin:0.1.7") ++ Option.when(!isScala3(scalaVersion()))(ivy"com.lihaoyi:::acyclic:${acyclic}") } @@ -57,7 +57,7 @@ trait MainArgsPublishModule ) def ivyDeps = Agg( - ivy"com.lihaoyi::unroll-annotation:0.1.3", + ivy"com.lihaoyi::unroll-annotation:0.1.7", ivy"org.scala-lang.modules::scala-collection-compat::2.8.1", ) } From b5a9ef94a67ec96bb831da0b1f919eae0fe1c41c Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Sat, 10 Feb 2024 19:56:56 +0800 Subject: [PATCH 3/5] . --- build.sc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sc b/build.sc index f17c500..8d6ce73 100644 --- a/build.sc +++ b/build.sc @@ -44,7 +44,7 @@ trait MainArgsPublishModule def scalacPluginIvyDeps = T{ super.scalacPluginIvyDeps() ++ - Agg(ivy"com.lihaoyi::unroll-plugin:0.1.7") ++ + Agg(ivy"com.lihaoyi::unroll-plugin:0.1.9") ++ Option.when(!isScala3(scalaVersion()))(ivy"com.lihaoyi:::acyclic:${acyclic}") } @@ -57,7 +57,7 @@ trait MainArgsPublishModule ) def ivyDeps = Agg( - ivy"com.lihaoyi::unroll-annotation:0.1.7", + ivy"com.lihaoyi::unroll-annotation:0.1.9", ivy"org.scala-lang.modules::scala-collection-compat::2.8.1", ) } From c130c9c06481090166cec99b19fb797ac2d484fe Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Sat, 10 Feb 2024 21:10:29 +0800 Subject: [PATCH 4/5] bumpscalajs --- build.sc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sc b/build.sc index 8d6ce73..43a1399 100644 --- a/build.sc +++ b/build.sc @@ -78,7 +78,7 @@ object mainargs extends Module { object js extends Cross[JSMainArgsModule](scalaVersions) trait JSMainArgsModule extends MainArgsPublishModule with ScalaJSModule { - def scalaJSVersion = "1.10.1" + def scalaJSVersion = "1.13.1" object test extends ScalaJSTests with CommonTestModule } From 77c8c33f3d52f89cf515881c70cb0c168e1114c9 Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Thu, 21 Mar 2024 13:33:14 +0800 Subject: [PATCH 5/5] unroll 0.1.12 --- build.sc | 4 ++-- mainargs/src/Parser.scala | 28 ++++++++++++++-------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/build.sc b/build.sc index 43a1399..2d83b38 100644 --- a/build.sc +++ b/build.sc @@ -44,7 +44,7 @@ trait MainArgsPublishModule def scalacPluginIvyDeps = T{ super.scalacPluginIvyDeps() ++ - Agg(ivy"com.lihaoyi::unroll-plugin:0.1.9") ++ + Agg(ivy"com.lihaoyi::unroll-plugin:0.1.12") ++ Option.when(!isScala3(scalaVersion()))(ivy"com.lihaoyi:::acyclic:${acyclic}") } @@ -57,7 +57,7 @@ trait MainArgsPublishModule ) def ivyDeps = Agg( - ivy"com.lihaoyi::unroll-annotation:0.1.9", + ivy"com.lihaoyi::unroll-annotation:0.1.12", ivy"org.scala-lang.modules::scala-collection-compat::2.8.1", ) } diff --git a/mainargs/src/Parser.scala b/mainargs/src/Parser.scala index 33883fb..2e919bc 100644 --- a/mainargs/src/Parser.scala +++ b/mainargs/src/Parser.scala @@ -4,7 +4,7 @@ import acyclic.skipped import scala.language.experimental.macros import java.io.PrintStream -import unroll.Unroll +import scala.annotation.unroll object ParserForMethods extends ParserForMethodsCompanionVersionSpecific class ParserForMethods[B](val mains: MethodMains[B]) { def helpText( @@ -12,8 +12,8 @@ class ParserForMethods[B](val mains: MethodMains[B]) { docsOnNewLine: Boolean = false, customNames: Map[String, String] = Map(), customDocs: Map[String, String] = Map(), - @Unroll sorted: Boolean = true, - nameMapper: String => Option[String] = Util.kebabCaseNameMapper + @unroll sorted: Boolean = true, + @unroll nameMapper: String => Option[String] = Util.kebabCaseNameMapper ): String = { Renderer.formatMainMethods( mains.value, @@ -66,7 +66,7 @@ class ParserForMethods[B](val mains: MethodMains[B]) { autoPrintHelpAndExit: Option[(Int, PrintStream)] = Some((0, System.out)), customNames: Map[String, String] = Map(), customDocs: Map[String, String] = Map(), - @Unroll nameMapper: String => Option[String] = Util.kebabCaseNameMapper + @unroll nameMapper: String => Option[String] = Util.kebabCaseNameMapper ): Any = { runEither( args, @@ -95,8 +95,8 @@ class ParserForMethods[B](val mains: MethodMains[B]) { autoPrintHelpAndExit: Option[(Int, PrintStream)] = Some((0, System.out)), customNames: Map[String, String] = Map(), customDocs: Map[String, String] = Map(), - @Unroll sorted: Boolean = false, - nameMapper: String => Option[String] = Util.kebabCaseNameMapper + @unroll sorted: Boolean = false, + @unroll nameMapper: String => Option[String] = Util.kebabCaseNameMapper ): Either[String, Any] = { if (autoPrintHelpAndExit.nonEmpty && args.take(1) == Seq("--help")) { val (exitCode, outputStream) = autoPrintHelpAndExit.get @@ -129,7 +129,7 @@ class ParserForMethods[B](val mains: MethodMains[B]) { args: Seq[String], allowPositional: Boolean = false, allowRepeats: Boolean = false, - @Unroll nameMapper: String => Option[String] = Util.kebabCaseNameMapper + @unroll nameMapper: String => Option[String] = Util.kebabCaseNameMapper ): Result[Any] = { runRaw0(args, allowPositional, allowRepeats, nameMapper) match { case Left(err) => err @@ -141,7 +141,7 @@ class ParserForMethods[B](val mains: MethodMains[B]) { args: Seq[String], allowPositional: Boolean = false, allowRepeats: Boolean = false, - @Unroll nameMapper: String => Option[String] = Util.kebabCaseNameMapper + @unroll nameMapper: String => Option[String] = Util.kebabCaseNameMapper ): Either[Result.Failure.Early, (MainData[_, B], Result[Any])] = { for (tuple <- Invoker.runMains(mains, args, allowPositional, allowRepeats, nameMapper)) yield { val (errMsg, res) = tuple @@ -159,7 +159,7 @@ class ParserForClass[T](val main: MainData[T, Any], val companion: () => Any) docsOnNewLine: Boolean = false, customName: String = null, customDoc: String = null, - @Unroll sorted: Boolean = true, + @unroll sorted: Boolean = true, nameMapper: String => Option[String] = Util.kebabCaseNameMapper ): String = { Renderer.formatMainMethodSignature( @@ -186,7 +186,7 @@ class ParserForClass[T](val main: MainData[T, Any], val companion: () => Any) autoPrintHelpAndExit: Option[(Int, PrintStream)] = Some((0, System.out)), customName: String = null, customDoc: String = null, - @Unroll nameMapper: String => Option[String] = Util.kebabCaseNameMapper + @unroll nameMapper: String => Option[String] = Util.kebabCaseNameMapper ): T = { constructEither( args, @@ -218,7 +218,7 @@ class ParserForClass[T](val main: MainData[T, Any], val companion: () => Any) autoPrintHelpAndExit: Option[(Int, PrintStream)] = Some((0, System.out)), customName: String = null, customDoc: String = null, - @Unroll nameMapper: String => Option[String] = Util.kebabCaseNameMapper + @unroll nameMapper: String => Option[String] = Util.kebabCaseNameMapper ): T = { constructEither( args, @@ -248,8 +248,8 @@ class ParserForClass[T](val main: MainData[T, Any], val companion: () => Any) autoPrintHelpAndExit: Option[(Int, PrintStream)] = Some((0, System.out)), customName: String = null, customDoc: String = null, - @Unroll sorted: Boolean = true, - nameMapper: String => Option[String] = Util.kebabCaseNameMapper + @unroll sorted: Boolean = true, + @unroll nameMapper: String => Option[String] = Util.kebabCaseNameMapper ): Either[String, T] = { if (autoPrintHelpAndExit.nonEmpty && args.take(1) == Seq("--help")) { val (exitCode, outputStream) = autoPrintHelpAndExit.get @@ -278,7 +278,7 @@ class ParserForClass[T](val main: MainData[T, Any], val companion: () => Any) args: Seq[String], allowPositional: Boolean = false, allowRepeats: Boolean = false, - @Unroll nameMapper: String => Option[String] = Util.kebabCaseNameMapper + @unroll nameMapper: String => Option[String] = Util.kebabCaseNameMapper ): Result[T] = { Invoker.construct[T](this, args, allowPositional, allowRepeats, nameMapper) }