Skip to content

NXF_SYNTAX_PARSER fails run if it is used #6237

@ewels

Description

@ewels

Reposting from Slack:

Jay Håkansson
When running with NXF_SYNTAX_PARSER=v2 I get error messages about "it" being used in closures:

Error test.nf:-1:-1: The current parameter list already contains a parameter of the name it

but I thought that was the standard variable name for groovy? If I name the variables uniquely for each purpose, this issue disappears.

This causes errors:

Channel.fromPath( "${params.ref_genome}" , type: "file", checkIfExists: true ).multiMap { it -> core: NBPs: it }.set { ref_gen }
Channel.fromPath(params.fastq, type: "dir", checkIfExists: true).multiMap { it -> to_format: to_assembly: to_subsamp: it }.set { fastq_ch }

while if I change just one of them to not use "it" it's fine.

This sounds like a best-practices warning that is incorrectly being raised as an error, I don't think that it should be halting workflow execution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions