Skip to content

Commit

Permalink
mainargs 0.2.3 added support for scala3 🎉
Browse files Browse the repository at this point in the history
  • Loading branch information
mpollmeier committed Oct 5, 2022
1 parent 1c7b3c3 commit 089735f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions amm/src/main/scala/ammonite/main/Scripts.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,7 @@ object Scripts {
scriptArgs: Seq[String] = Nil) = {
interp.watch(path)
val (pkg, wrapper) = Util.pathToPackageWrapper(Seq(), path relativeTo wd)


val genRoutesCode =
// Entrypoints are not supported in Scala 3 for now (its macros are Scala 2-only)
if (interp.compilerBuilder.scalaVersion.startsWith("3.")) "null"
else "mainargs.ParserForMethods[$routesOuter.type]($routesOuter)"
val genRoutesCode = "mainargs.ParserForMethods[$routesOuter.type]($routesOuter)"

for{
scriptTxt <- try Res.Success(Util.normalizeNewlines(os.read(path))) catch{
Expand Down
2 changes: 1 addition & 1 deletion build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ object Deps {
val jlineReader = ivy"org.jline:jline-reader:3.14.1"
val jlineTerminal = ivy"org.jline:jline-terminal:3.14.1"
val jsch = ivy"com.jcraft:jsch:0.1.54"
val mainargs = ivy"com.lihaoyi::mainargs:0.2.2"
val mainargs = ivy"com.lihaoyi::mainargs:0.3.0"
val osLib = ivy"com.lihaoyi::os-lib:0.8.0"
val pprint = ivy"com.lihaoyi::pprint:0.7.3"
val requests = ivy"com.lihaoyi::requests:0.7.0"
Expand Down

0 comments on commit 089735f

Please sign in to comment.