You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the second preview version for publishing outputs from workflows the output block is required for files to be actually published. Nothing needs to be set within the block, output {} is enough for files to be published. Omitting this line prevents any file from being published.
Expected behavior and actual behavior
The documentation for Customizing outputs clearly states that the output block is only needed for customizing the output and can be omitted when the default behaviour is good enough. But that doesn't seem to be the case, as omitting the output block prevents any file from being published.
Steps to reproduce the problem
workflow.nf
#!/usr/bin/env nextflow
nextflow.preview.output = true
process doStuff {
output:
path 'file.txt'
script:
"""
touch file.txt
"""
}
workflow {
main:
println "outputDir: $workflow.outputDir"
out = doStuff()
out.view { file -> "Out: ${file}" }
publish:
out >> "default"
}
// Uncomment the next line to actually publish the output file
// output {}
Run this file once and check with ls to see no results directory
NXF_VER=24.10.0 nextflow run workflow.nf
ls -lh
And then run it again after uncommenting the last line to see the results directory
NXF_VER=24.10.0 nextflow run workflow.nf
ls -lh
Program output
N E X T F L O W ~ version 24.10.0
Launching `workflow.nf` [hopeful_sanger] DSL2 - revision: d4837e8320
WARN: WORKFLOW OUTPUT DSL IS A PREVIEW FEATURE - SYNTAX AND FUNCTIONALITY CAN CHANGE IN FUTURE RELEASES
outputDir: /absolute/path/to/current/directory/results
[be/c36072] Submitted process > doStuff
Out: /absolute/path/to/current/directory/work/be/c360721f8d99f992ba55284f903b45/file.txt
without output {}, nothing is publishded (see
nextflow-io/nextflow#5460 )
if output block is defined, nextflow errors out with
unclear error. leaving like this for now.
Bug report
When using the second preview version for publishing outputs from workflows the
output
block is required for files to be actually published. Nothing needs to be set within the block,output {}
is enough for files to be published. Omitting this line prevents any file from being published.Expected behavior and actual behavior
The documentation for Customizing outputs clearly states that the
output
block is only needed for customizing the output and can be omitted when the default behaviour is good enough. But that doesn't seem to be the case, as omitting theoutput
block prevents any file from being published.Steps to reproduce the problem
workflow.nf
Run this file once and check with
ls
to see noresults
directoryAnd then run it again after uncommenting the last line to see the
results
directoryProgram output
.nextflow.log
Environment
The text was updated successfully, but these errors were encountered: