Skip to content

nextflow inspect|config -o json doesn't return valid json #7116

@mashehu

Description

@mashehu

Bug report

Expected behavior and actual behavior

I would like to directly run the output of these commands through a json parser.
Unfortunately, the output is not pure JSON, e.g.

nextflow inspect . -o json
Monitor the execution with Seqera Platform using this URL: https://cloud.seqera.io/user/***
{    
    "processes": [
....

or

nextflow config -o json 
WARN: Unrecognized config option 'validation.defaultIgnoreParams'
WARN: Unrecognized config option 'validation.monochromeLogs'
{
    "params": {

Steps to reproduce the problem

Create a minimal nextflow config e.g

params {
    input = null
}
plugins {
    id 'nf-schema@2.5.1' // Validation of pipeline parameters and creation of an input channel from a sample sheet
}
validation {
    defaultIgnoreParams = ["genomes"]
    monochromeLogs = params.monochrome_logs
}

and run nextflow config -o json on it.

Program output

WARN: Unrecognized config option 'validation.defaultIgnoreParams'
WARN: Unrecognized config option 'validation.monochromeLogs'
{
    "params": {
        "input": null
    },
    "plugins": [
        "nf-schema@2.5.1"
    ],
    "validation": {
        "defaultIgnoreParams": [
            "genomes"
        ],
        "monochromeLogs": null
    }
}

Environment

Version: 26.04.0 build 12031
System: Mac OS X 26.4.1
Runtime: Groovy 4.0.31 on OpenJDK 64-Bit Server VM 21.0.2+13-58

Additional context

I guess the source for both is different, but the general assumption I had is that i get pure json output in stdout when running -o json.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions