nextflow icon indicating copy to clipboard operation
nextflow copied to clipboard

Strict mode should also enforce existence of process labels

Open odoublewen opened this issue 6 months ago • 0 comments

New feature

Nextflow strict mode helps avoid a lot of troublesome silent errors, but it does not seem to throw an error if a process declares a label that does not exist in the config.

E.g. Adding a non-existent label to the classic Hello World script:

process sayHello {
  label 'doesnotexist'

  input: 
    val x
  output:
    stdout
  script:
    """
    echo '$x world!'
    """
}

workflow {
  Channel.of('Bonjour', 'Ciao', 'Hello', 'Hola') | sayHello | view
}

But even with strict mode enabled, it runs without error:

$ NXF_ENABLE_STRICT=true nextflow run main.nf 
N E X T F L O W  ~  version 22.10.0
Launching `main.nf` [nostalgic_gates] DSL2 - revision: b366a11eb3
executor >  local (4)
[98/8ff160] process > sayHello (2) [100%] 4 of 4 ✔
Hello world!

Bonjour world!

Hola world!

Ciao world!

odoublewen avatar Feb 09 '24 18:02 odoublewen