diff --git a/docs/module.md b/docs/module.md index 59fc886887..0bb7df1865 100644 --- a/docs/module.md +++ b/docs/module.md @@ -98,6 +98,10 @@ workflow { ## Module parameters +:::{deprecated} 24.07.0-edge +As a best practice, parameters should be used in the entry workflow and passed to functions / processes / workflows as explicit inputs. +::: + A module script can define parameters using the same syntax as a Nextflow workflow script: ```groovy diff --git a/modules/nextflow/src/main/groovy/nextflow/script/IncludeDef.groovy b/modules/nextflow/src/main/groovy/nextflow/script/IncludeDef.groovy index 08e6e5566e..8c3548e4cb 100644 --- a/modules/nextflow/src/main/groovy/nextflow/script/IncludeDef.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/script/IncludeDef.groovy @@ -80,11 +80,13 @@ class IncludeDef { } IncludeDef params(Map args) { + log.warn "Include with `params()` is deprecated -- pass params as a workflow or process input instead" this.params = args != null ? new HashMap(args) : null return this } IncludeDef addParams(Map args) { + log.warn "Include with `addParams()` is deprecated -- pass params as a workflow or process input instead" this.addedParams = args return this }