Bug report
Expected behavior and actual behavior
Using the new publish feature, the following pipeline publishes a file with the correct dynamic filepath in Nextflow 24.04.4, but on Nextflow 25.01.0-edge causes the error Output `path` directive should return a string or closure, but instead returned a org.codehaus.groovy.runtime.GStringImpl.
Steps to reproduce the problem
script:
nextflow.preview.output = true
process SALMON {
container 'quay.io/biocontainers/salmon:1.10.3--haf24da9_3'
tag "${name}"
input:
path index
tuple val(name), path(r1), path(r2)
output:
tuple val(name), path(quant)
script:
"""
salmon quant -i $index -l A -1 $r1 -2 $r2 -o quant
"""
}
workflow {
index = channel.value('/path/to/index')
raw_data = channel.of(['test', '/path/to/test_1.fq.gz', '/path/to/test_2.fq.gz'])
SALMON(index, raw_data)
publish:
SALMON.out >> 'samples'
}
output {
samples {
path { s -> "phase2/${s[0]}/salmon" }
// publishes correctly in 25.01.0-edge if the line is
// path { s -> "phase2/${s[0]}/salmon".toString() }
}
}
Program output
N E X T F L O W ~ version 25.01.0-edge
Launching `reproducible-example.nf` [high_tuckerman] DSL2 - revision: b27fc685ee
WARN: WORKFLOW OUTPUT DSL IS A PREVIEW FEATURE - SYNTAX AND FUNCTIONALITY CAN CHANGE IN FUTURE RELEASES
executor > local (1)
[3b/cb75ae] process > SALMON (test) [100%] 1 of 1 ✔
Output `path` directive should return a string or closure, but instead returned a org.codehaus.groovy.runtime.GStringImpl
v24.10.4.nextflow.log
v25.01.0-edge.nextflow.log
Environment
- Nextflow version: 24.10.4/25.01.0-edge
- Java version: openjdk 17.0.10 2024-01-16 LTS
- Operating system: macOS 15.3.1
- Bash version: zsh 5.9 (arm64-apple-darwin24.0)
Additional context
Slack thread here
Bug report
Expected behavior and actual behavior
Using the new
publishfeature, the following pipeline publishes a file with the correct dynamic filepath in Nextflow 24.04.4, but on Nextflow 25.01.0-edge causes the errorOutput `path` directive should return a string or closure, but instead returned a org.codehaus.groovy.runtime.GStringImpl.Steps to reproduce the problem
script:
Program output
v24.10.4.nextflow.log
v25.01.0-edge.nextflow.log
Environment
Additional context
Slack thread here