broadinstitute / wdltool

BSD 3-Clause "New" or "Revised" License
18 stars 4 forks source link

Validate does not specify file in which error occurs #53

Closed tlangs closed 6 years ago

tlangs commented 6 years ago

If wdl A imports wdl B, and the wdltool jar is used to validate wdl A, any errors occuring in wdl B will be reported as though they occured in wdl A.

wdlA.wdl

import "wdlB.wdl" as wdlB

workflow AWorkflow {

  call wdlB.HelloWorldWorkflow {
    input:
      thing1 = "Hello",
      thing2 = "World"
  }
}

wdlB.wdl

workflow HelloWorldWorkflow {

  String thing1
  String thing2

  call SayHello {
    input:
      firstWord = thing1
      secondWord = thing2
  }
}

task SayHello {
  String firstWord
  String secondWord

  command {
    echo "${firstWord}, ${secondWord}!"
  }
}

The error occurs the the SayHello call of wdlB.wdl, where a comma is missing, but the error returned by wdltool does not specify which file the error occurs in.

$ java -jar wdltool-0.14.jar validate wdlA.wdl
ERROR: Unexpected symbol (line 9, col 7) when parsing '_gen13'.

Expected rbrace, got secondWord.

      secondWord = thing2
      ^

$e = :identifier <=> :lparen $_gen18 :rparen -> FunctionCall( name=$0, params=$2 )
katevoss commented 6 years ago

This is a dupe of an issue I filed, probably in the Cromwell repo. FYI we merged this repo with Cromwell so all issues should be filed there.

tlangs commented 6 years ago

oh whoops thats my bad. Thanks!