Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.2 spec conformance: allow None values for call inputs where the input is non-optional in type but has a default value #325

Open
peterhuene opened this issue Feb 14, 2025 · 3 comments · May be fixed by #363
Assignees
Labels
bug Something isn't working spec compliance Behavior is not to the WDL specification

Comments

@peterhuene
Copy link
Collaborator

peterhuene commented Feb 14, 2025

According to the spec, inputs with a default value should accept None regardless of the type of the input being optional; the intention is to signify that the call should always use the default value for the input (i.e. cannot be overridden by a nested input).

version 1.2

task foo {
    input {
        Int i = 1
    }

    command <<<
        echo ~{i}
    >>>
}

workflow bar {
    call foo {
        i = None
    }
}

The task should print 1.

Instead, we error from static analysis:

error: type mismatch: expected type `Int`, but found type `None`
   ┌─ foo.wdl:15:13
   │
15 │         i = None
   │         -   ^^^^ this is type `None`
   │         │    
   │         this expects type `Int`

error: aborting due to previous diagnostic
@peterhuene peterhuene changed the title Spec conformance: allow None values for call inputs where the input is non-optional in type but has a default value 1.2 spec conformance: allow None values for call inputs where the input is non-optional in type but has a default value Feb 14, 2025
@peterhuene peterhuene added bug Something isn't working spec compliance Behavior is not to the WDL specification labels Feb 14, 2025
@HenryNg101
Copy link

HenryNg101 commented Mar 3, 2025

Hey, I would like to work on this issue :) may I give it a go @peterhuene ?

@peterhuene
Copy link
Collaborator Author

Hi @HenryNg101. Feel free to take a stab at it. Please let me know if you into any issues, thanks!

@Nitish-bot
Copy link

Hey! This has been inactive for 2 weeks now so I have started to work on this, could I get assigned?

@Nitish-bot Nitish-bot linked a pull request Mar 20, 2025 that will close this issue
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working spec compliance Behavior is not to the WDL specification
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants