Open aofarrel opened 1 year ago
Yes, this looks like a bug in cromwell. I seem to recall there was an issue (feature?) where cromwell would implicitly make default arguments optional. There was some discussion of this before but I can't remember where it was.
Moving the String foo
line outside of the input
block would let you work around this bug. (It's ok to declare foo
after tsv_arg
because the WDL flow graph will ensure that foo
is defined before tsv_arg
's initializer is evaluated, even if it's declared after it.)
That workaround has got me curious... My previous understanding is that moving things out of the input block only has the effect of making them act like private variables. The spec also says that this region of "non-input declarations" are supposed to act as intermediate values, so I'm surprised tsv_arg can remain in the input section (since by merit of it being there, it can be overwritten by the user). How is this section implemented in Cromwell? Is it effectively just an extension of the input section, but the user can't directly set their values?
Made a new ticket for this since it's a new issue. basename() does not work on optional values, but sometimes it seems to think things that aren't optional are optional.
This passes miniwdl and Cromwell, ie, is expected behavior:
This passes miniwdl, but fails Cromwell, even though it really ought to pass both:
Cromwell's error is:
Originally posted by @aofarrel in https://github.com/broadinstitute/cromwell/issues/6840#issuecomment-1245982086