-
Notifications
You must be signed in to change notification settings - Fork 759
Description
Bug report
Minimal example:
// main.nf
process EXAMPLE_EXT {
script:
"""
echo "args = ${task.ext.args}"
"""
}
workflow {
EXAMPLE_EXT()
}// nextflow.config
process {
withName: 'EXAMPLE_EXT' {
ext.args = "--some-param value"
}
}Nextflow should add the value of task.ext.args to the task hash, so that changing this value re-executes the task on resume, just like changing a regular input.
However, Nextflow 25.10 with the strict parser does not do this.
I believe it's because the strict parser doesn't apply the VariableVisitor, which collects all variable references in the process body. The task processor gets the task ext references from this list.
I think I originally neglected this piece because I wanted to discourage the use of external variables in the process body. The strict parser already disallows most global variables in the process body. However, since we haven't validated any good replacement for task ext, I think we should just support it for now.