java.lang.AssertionError: assertion failed: only the last part may end with '_', and only if the suffix does not start with '_'
Could you update this to provide more information when this condition is triggered?
https://github.com/dnanexus/dxCompiler/blob/59c652b62f144c58b6f05903e27a8ce32a6f2d82/core/src/main/scala/dx/core/ir/DxName.scala#L77
For example, when compiling a workflow I get:
[error] Error translating seaseq-control.wdl to IR
java.lang.AssertionError: assertion failed: only the last part may end with '_', and only if the suffix does not start with '_'
at scala.Predef$.assert(Predef.scala:279)
at dx.core.ir.DxName.$anonfun$new$9(DxName.scala:77)
at dx.core.ir.DxName.$anonfun$new$9$adapted(DxName.scala:71)
at scala.collection.immutable.Vector.foreach(Vector.scala:1856)
at dx.core.ir.DxName.$anonfun$new$7(DxName.scala:71)
at dx.core.ir.DxName.$anonfun$new$7$adapted(DxName.scala:69)
at scala.Option.foreach(Option.scala:437)
at dx.core.ir.DxName.<init>(DxName.scala:69)
at dx.core.languages.wdl.WdlDxName.<init>(WdlDxName.scala:42)
at dx.core.languages.wdl.WdlDxName$.fromSourceName(WdlDxName.scala:30)
at dx.core.languages.wdl.WdlUtils$.$anonfun$getClosureInputsAndOutputs$2(WdlUtils.scala:975)
at scala.collection.StrictOptimizedIterableOps.map(StrictOptimizedIterableOps.scala:100)
at scala.collection.StrictOptimizedIterableOps.map$(StrictOptimizedIterableOps.scala:87)
at scala.collection.immutable.TreeSeqMap.map(TreeSeqMap.scala:45)
at dx.core.languages.wdl.WdlUtils$.$anonfun$getClosureInputsAndOutputs$1(WdlUtils.scala:972)
at scala.collection.StrictOptimizedIterableOps.flatMap(StrictOptimizedIterableOps.scala:118)
at scala.collection.StrictOptimizedIterableOps.flatMap$(StrictOptimizedIterableOps.scala:105)
at scala.collection.immutable.Vector.flatMap(Vector.scala:113)
at dx.core.languages.wdl.WdlUtils$.getOutputs$1(WdlUtils.scala:964)
at dx.core.languages.wdl.WdlUtils$.$anonfun$getClosureInputsAndOutputs$1(WdlUtils.scala:980)
at scala.collection.StrictOptimizedIterableOps.flatMap(StrictOptimizedIterableOps.scala:118)
at scala.collection.StrictOptimizedIterableOps.flatMap$(StrictOptimizedIterableOps.scala:105)
at scala.collection.immutable.Vector.flatMap(Vector.scala:113)
at dx.core.languages.wdl.WdlUtils$.getOutputs$1(WdlUtils.scala:964)
at dx.core.languages.wdl.WdlUtils$.getClosureInputsAndOutputs(WdlUtils.scala:1050)
at dx.core.languages.wdl.WdlBlock$.$anonfun$createBlocks$3(WdlBlock.scala:444)
at scala.collection.immutable.Vector1.map(Vector.scala:1886)
at scala.collection.immutable.Vector1.map(Vector.scala:375)
at dx.core.languages.wdl.WdlBlock$.createBlocks(WdlBlock.scala:442)
at dx.translator.wdl.CallableTranslator$WdlWorkflowTranslator.translate(CallableTranslator.scala:1104)
at dx.translator.WorkflowTranslator.apply(WorkflowTranslator.scala:239)
at dx.translator.wdl.CallableTranslator.translateCallable(CallableTranslator.scala:1131)
at dx.translator.wdl.WdlTranslator.$anonfun$apply$2(WdlTranslator.scala:172)
at scala.collection.IterableOnceOps.foldLeft(IterableOnce.scala:646)
at scala.collection.IterableOnceOps.foldLeft$(IterableOnce.scala:642)
at scala.collection.AbstractIterable.foldLeft(Iterable.scala:926)
at dx.translator.wdl.WdlTranslator.apply$lzycompute(WdlTranslator.scala:170)
at dx.translator.wdl.WdlTranslator.apply(WdlTranslator.scala:144)
at dxCompiler.Main$.compile(Main.scala:438)
at dxCompiler.Main$.dispatchCommand(Main.scala:799)
at dxCompiler.Main$.main(Main.scala:922)
at dxCompiler.MainApp$.delayedEndpoint$dxCompiler$MainApp$1(Main.scala:927)
at dxCompiler.MainApp$delayedInit$body.apply(Main.scala:926)
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 dxCompiler.MainApp$.main(Main.scala:926)
at dxCompiler.MainApp.main(Main.scala)
Even using the --verbose option doesn't provide enough information to localize where the error is arising.
Please check the naming convention here: https://github.com/dnanexus/dxCompiler/blob/59c652b62f144c58b6f05903e27a8ce32a6f2d82/core/src/main/scala/dx/core/ir/DxName.scala#L23-L48
I can read the naming convention. That doesn't change that the compiler should simply report which element it is processing when it encounters the issue, rather than dumping a stack trace.
Oh I see. We will see how we could improve that. Thanks for the suggestion :)