-
Notifications
You must be signed in to change notification settings - Fork 311
Description
The "Optional inputs with defaults" section currently says:
Inputs with default initializers are implicitly optional: callers may omit the input or supply None whether or not its declared type carries the optional quantifier ?
This came up during review of stjude-rust-labs/sprocket#724, where @a-frantz pointed out that the phrasing is misleading. The input itself isn't optional—it always resolves to a concrete value (either caller-supplied or the default). What's optional is the caller's obligation to provide it. Supplying None just means "use the default," not that the value becomes None. As Ari put it, the declaration's type doesn't change; it's just an alternative syntax for falling back to the default.
IMO the paragraph should be reworded to make this distinction clearer, since "implicitly optional" reads like the type itself becomes optional.
Separately, this behavior was formalized in v1.2 (cf. #462), but cromwell and miniwdl already implement it regardless of WDL version. It would be worth back-porting this clarification to v1.0 and v1.1 so the spec matches existing engine behavior rather than leaving it undefined in earlier versions.