Skip to content

Commit 7327af3

Browse files
committed
dynaml-repl: Fix to command line args when executing script with main annotation
1 parent 4cc2ff3 commit 7327af3

File tree

1 file changed

+9
-9
lines changed
  • dynaml-repl/src/main/scala-2.11/io/github/mandar2812/dynaml/repl

1 file changed

+9
-9
lines changed

dynaml-repl/src/main/scala-2.11/io/github/mandar2812/dynaml/repl/DynaMLRepl.scala

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ class Router [C <: Context](val c: C) {
689689
case Some(s) => q"scala.Some($s)"
690690
}
691691
val argSig = q"""
692-
ammonite.main.Router.ArgSig(
692+
io.github.mandar2812.dynaml.repl.Router.ArgSig(
693693
${arg.name.toString},
694694
${docUnwrappedType.toString + (if(vararg) "*" else "")},
695695
$docTree,
@@ -699,13 +699,13 @@ class Router [C <: Context](val c: C) {
699699

700700
val reader =
701701
if(vararg) q"""
702-
ammonite.main.Router.readVarargs[$docUnwrappedType](
702+
io.github.mandar2812.dynaml.repl.Router.readVarargs[$docUnwrappedType](
703703
$argSig,
704704
$extrasSymbol,
705705
implicitly[scopt.Read[$docUnwrappedType]].reads(_)
706706
)
707707
""" else q"""
708-
ammonite.main.Router.read[$docUnwrappedType](
708+
io.github.mandar2812.dynaml.repl.Router.read[$docUnwrappedType](
709709
$argListSymbol,
710710
$default,
711711
$argSig,
@@ -727,7 +727,7 @@ class Router [C <: Context](val c: C) {
727727
}.unzip
728728

729729
q"""
730-
ammonite.main.Router.EntryPoint(
730+
io.github.mandar2812.dynaml.repl.Router.EntryPoint(
731731
${meth.name.toString},
732732
scala.Seq(..$argSigs),
733733
${methodDoc match{
@@ -736,9 +736,9 @@ class Router [C <: Context](val c: C) {
736736
}},
737737
${varargs.contains(true)},
738738
($argListSymbol: Map[String, String], $extrasSymbol: Seq[String]) =>
739-
ammonite.main.Router.validate(Seq(..$readArgs)) match{
740-
case ammonite.main.Router.Result.Success(List(..$argNames)) =>
741-
ammonite.main.Router.Result.Success($target.${meth.name.toTermName}(..$argNameCasts))
739+
io.github.mandar2812.dynaml.repl.Router.validate(Seq(..$readArgs)) match{
740+
case io.github.mandar2812.dynaml.repl.Router.Result.Success(List(..$argNames)) =>
741+
io.github.mandar2812.dynaml.repl.Router.Result.Success($target.${meth.name.toTermName}(..$argNameCasts))
742742
case x => x
743743
}
744744
)
@@ -795,8 +795,8 @@ object Scripts {
795795
extraCode = Util.normalizeNewlines(
796796
s"""
797797
|val $$routesOuter = this
798-
|object $$routes extends scala.Function0[scala.Seq[ammonite.main.Router.EntryPoint]]{
799-
| def apply() = ammonite.main.Router.generateRoutes[$$routesOuter.type]($$routesOuter)
798+
|object $$routes extends scala.Function0[scala.Seq[io.github.mandar2812.dynaml.repl.Router.EntryPoint]]{
799+
| def apply() = io.github.mandar2812.dynaml.repl.Router.generateRoutes[$$routesOuter.type]($$routesOuter)
800800
|}
801801
""".stripMargin
802802
),

0 commit comments

Comments
 (0)