dnanexus / wdlTools

WDL tools for parsing, type-checking, and more
Apache License 2.0
25 stars 7 forks source link

Error when setting `Runtime.memory` as a string in a `development` version task #230

Closed jdidion closed 2 years ago

jdidion commented 2 years ago
version development

task {
  ...
  runtime {
    memory: "1 GiB"
  }
}

throws exception:

wdlTools.eval.EvalException: Value V_String(1.0 GiB) could not be coerced to one of Vector(T_Int) at 164:12-164:31 in <string>
    at wdlTools.eval.Coercion$.$anonfun$coerceToFirst$1(Coercion.scala:209)
    at scala.Option.getOrElse(Option.scala:201)
    at wdlTools.eval.Coercion$.coerceToFirst(Coercion.scala:209)
    at wdlTools.eval.Eval.applyExprAndCoerce(Eval.scala:419)
    at wdlTools.eval.V2Runtime.getValue$1(Runtime.scala:275)
    at wdlTools.eval.V2Runtime.applyKv(Runtime.scala:291)
    at wdlTools.eval.Runtime.$anonfun$get$3(Runtime.scala:51)
    at scala.Option.orElse(Option.scala:477)
    at wdlTools.eval.Runtime.$anonfun$get$1(Runtime.scala:50)
    at scala.collection.immutable.Map$EmptyMap$.getOrElse(Map.scala:228)
    at wdlTools.eval.Runtime.get(Runtime.scala:47)
    at wdlTools.eval.V2Runtime.memory$lzycompute(Runtime.scala:344)
    at wdlTools.eval.V2Runtime.memory(Runtime.scala:343)
    at dx.core.languages.wdl.Runtime.$anonfun$parseInstanceType$3(Runtime.scala:104)
    at dx.core.languages.wdl.Runtime.$anonfun$parseInstanceType$3$adapted(Runtime.scala:104)
    at scala.Option.map(Option.scala:242)
    at dx.core.languages.wdl.Runtime.$anonfun$parseInstanceType$2(Runtime.scala:104)
    at scala.Option.getOrElse(Option.scala:201)
    at dx.core.languages.wdl.Runtime.parseInstanceType(Runtime.scala:103)
    at dx.executor.wdl.WdlTaskExecutor.getInstanceTypeRequest(WdlTaskExecutor.scala:182)
    at dx.executor.TaskExecutor.apply(TaskExecutor.scala:817)
    at dx.executor.BaseCli.dispatchCommand(BaseCli.scala:86)
    at dx.executor.BaseCli.main(BaseCli.scala:137)
    at dxExecutorWdl.MainApp$.delayedEndpoint$dxExecutorWdl$MainApp$1(Main.scala:27)
    at dxExecutorWdl.MainApp$delayedInit$body.apply(Main.scala:26)
    at scala.Function0.apply$mcV$sp(Function0.scala:39)
    at scala.Function0.apply$mcV$sp$(Function0.scala:39)
    at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:17)
    at scala.App.$anonfun$main$1(App.scala:76)
    at scala.App.$anonfun$main$1$adapted(App.scala:76)
    at scala.collection.IterableOnceOps.foreach(IterableOnce.scala:563)
    at scala.collection.IterableOnceOps.foreach$(IterableOnce.scala:561)
    at scala.collection.AbstractIterable.foreach(Iterable.scala:926)
    at scala.App.main(App.scala:76)
    at scala.App.main$(App.scala:74)
    at dxExecutorWdl.MainApp$.main(Main.scala:26)
    at dxExecutorWdl.MainApp.main(Main.scala)
jdidion commented 2 years ago

@Gvaihir I submitted #231 to fix this issue

commandlinegirl commented 2 years ago

This is published in https://github.com/dnanexus/dxCompiler/releases/tag/2.10.6. Thanks for the fix, John!