Skip to content

nextflow module run does not support destructured record inputs #7162

@andvon

Description

@andvon

Bug report

Expected behavior and actual behavior

Expected

nextflow module run should execute successfully when the input to the process is a destructured record input.

Actual

An error occurs that indicates the inputs are being passed in as an ArrayList and not being structured as a record properly.

Steps to reproduce the problem

nextflow.enable.types = true
workflow {

    inputs = channel.of(
        record(id: "abc", greeting: "hello")
    )

    RECORDS(inputs)
}

process RECORDS {
    input:
    record(
        id: String,
        greeting: String
    )

    output:
    record(
        id: id,
        greeting: greeting
    )

    script:
    """
    echo '${greeting}'
    """
}
  1. create a module at ./modules/testing/records
  2. copy contents of the process RECORDS to that module
  3. run nextflow module run testing/records --id "a" --greeting "hi"

Program output

 N E X T F L O W   ~  version 26.04.1

Launching `.../modules/testing/records/main.nf` [angry_thompson] revision: d10ebc4246

ERROR ~ Error executing process > 'RECORDS'

Caused by:
  [RECORDS] input at index 0 expected a record but received: [a, hi] [ArrayList]

Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line

 -- Check '.module.log' file for details

Environment

  • Nextflow version: 26.04.1
  • Java version: openjdk 17.0.10 2024-01-16
  • Operating system: macOS / Linux
  • zsh version: 5.9 (x86_64-apple-darwin23.0)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions