Skip to content

Clarify "implicitly optional" phrasing for inputs with defaults #761

@claymcleod

Description

@claymcleod

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.

Metadata

Metadata

Assignees

Labels

K-clarification(Kind) Clarifications regarding the WDL specification.S05-in-progress(State) A task that is in progress.Z-specification-change(Metadata) An issue or PR related to a specification change.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions