-
Notifications
You must be signed in to change notification settings - Fork 27
Closed
Milestone
Description
In the projects that I'm using mainargs in updating to 0.6.0 results in a StackOverflowError
. You can reproduce this with a minimized version of the example in the readme.
//> using scala 3.3.1
//> using dep com.lihaoyi::mainargs:0.6.0
package testhello
import mainargs.{main, arg, ParserForMethods, Flag}
object Main {
@main
def run(
@arg(short = 'f')
foo: String
) = {
println(foo)
}
def main(args: Array[String]): Unit = ParserForMethods(this).runOrExit(args)
}
This will blow up with:
Exception in thread "main" java.lang.StackOverflowError
at mainargs.ParserForMethods.runEither(Parser.scala:216)
at mainargs.ParserForMethods.runEither(Parser.scala:216)
at mainargs.ParserForMethods.runEither(Parser.scala:216)
at mainargs.ParserForMethods.runEither(Parser.scala:216)
at mainargs.ParserForMethods.runEither(Parser.scala:216)
at mainargs.ParserForMethods.runEither(Parser.scala:216)
at mainargs.ParserForMethods.runEither(Parser.scala:216)
at mainargs.ParserForMethods.runEither(Parser.scala:216)
...
When you bump down to 0.5.4
, everything works as expected.
Metadata
Metadata
Assignees
Labels
No labels