Open
Description
Description of feature
Specifying parameters via -c custom.config
can make problems with DSL2 workflows. The corresponding documentation was added in #2173.
I'm afraid there's still a considerable number of users following this practice, and in the worst case this may lead to incorrect results because parameters are silently ignored. Having a loud warning (or even error) when a workflow with a custom config file is started would be great!
I prototyped this snipped, and it seems to work in principle. However, it would need some tuning that it doesn't raise an error for the config file that defines the default parameters.
def check_config_files(workflow) {
for (config_file in workflow.configFiles) {
if (file(config_file).text.contains("parameters")) {
println "WARNING: Do not specify parameters via a .config file."
}
}
}
workflow {
check_config_files(workflow)
}
Maybe someone can take this on at the hackathon?
CC @jfy133