Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix function calls in typed process outputs#7148

Merged
bentsherman merged 5 commits into
masterfrom
fix-typed-process-output-function-call
May 15, 2026
Merged

Fix function calls in typed process outputs#7148
bentsherman merged 5 commits into
masterfrom
fix-typed-process-output-function-call

Conversation

@bentsherman

@bentsherman bentsherman commented May 15, 2026

Copy link
Copy Markdown
Member

This PR fixes a bug with typed process outputs. Typed outputs can be arbitrary expressions, including function calls:

nextflow.enable.types = true

process ADD {
    input:
    x: Integer
    y: Integer

    output:
    add(x, y)

    exec:
    true
}

def add(x, y) {
    return x + y
}

However, this currently fails. Apparently, both variable references and function calls are routed through TaskOutputResolver's get() method, which currently expects only variables

This PR changes get() to return null instead of failing, allowing the method dispatch to fall back to invokeMethod()

The try-catch was inherited from legacy processes, but it is not needed here because an undefined variable in a typed process will always be caught at compile-time

@netlify

netlify Bot commented May 15, 2026

Copy link
Copy Markdown

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit ed1dbf9
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs-staging/deploys/6a07421c5a1ce3000821a4a3

Signed-off-by: Ben Sherman <[email protected]>
@bentsherman bentsherman merged commit 7e0908c into master May 15, 2026
23 checks passed
@bentsherman bentsherman deleted the fix-typed-process-output-function-call branch May 15, 2026 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants