Skip to content

Unrecognized config options when withName selector has special characters #6532

@sstrong99

Description

@sstrong99

Bug report

Expected behavior and actual behavior

When I use a withName process selector that has special characters (e.g. '.*TASK.*'), I get a warning about unknown config options:
e.g.

WARN: Unrecognized config option 'process.*TASK.*.ext.args'

Steps to reproduce the problem

main.nf

workflow {
    TASK(1).view()
}

process TASK {
    input:
    val thing

    output:
    stdout

    script:
    def args = task.ext.args ?: 'nothing'
    def prefix = task.ext.prefix ?: 'default'
    """
    echo "${thing} ${args}" | tee "${prefix}.txt"
    """
}

nextflow.config

resume = true

process {
    withName: '.*TASK.*' {
        ext.args   = 'hello'
        ext.prefix = 'prefix'
    }
}

command

NXF_SYNTAX_PARSER=v2 nextflow run .

The issue goes away if the special chars are removed from the withName selector. For example, if the nextflow.config is replaced by this:

resume = true

process {
    withName: 'TASK' {
        ext.args   = 'hello'
        ext.prefix = 'prefix'
    }
}

Program output

 N E X T F L O W   ~  version 25.10.0

Launching `main.nf` [exotic_torricelli] DSL2 - revision: eeea9e75bc

WARN: Unrecognized config option 'process.*TASK.*.ext.args'
WARN: Unrecognized config option 'process.*TASK.*.ext.prefix'
executor >  local (1)
[b0/34fb22] process > TASK [100%] 1 of 1 ✔
1 hello

Environment

  • Nextflow version: 25.10.0 with NXF_SYNTAX_PARSER=v2
  • Java version: 21.0.2
  • Operating system: macOS
  • Bash version: GNU bash, version 3.2.57(1)-release (arm64-apple-darwin25)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions