From 0253f8d7f03da75623edc03b9fb5b6a1c29c1e9b Mon Sep 17 00:00:00 2001 From: Ben Sherman Date: Fri, 14 Apr 2023 08:34:53 -0500 Subject: [PATCH] Fix DSL2 support in nextflow console (#3864) [ci fast] Signed-off-by: Ben Sherman --- .../src/main/nextflow/ui/console/Nextflow.groovy | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/plugins/nf-console/src/main/nextflow/ui/console/Nextflow.groovy b/plugins/nf-console/src/main/nextflow/ui/console/Nextflow.groovy index c9e8be2246..69041c158a 100644 --- a/plugins/nf-console/src/main/nextflow/ui/console/Nextflow.groovy +++ b/plugins/nf-console/src/main/nextflow/ui/console/Nextflow.groovy @@ -25,6 +25,7 @@ import groovy.transform.ThreadInterrupt import groovy.console.ui.Console import groovy.console.ui.OutputTransforms import groovy.util.logging.Slf4j +import nextflow.NextflowMeta import nextflow.Session import nextflow.cli.CliOptions import nextflow.cli.CmdInfo @@ -72,6 +73,8 @@ class Nextflow extends Console { Nextflow(ClassLoader loader) { super(loader, new ScriptBinding()) this.scriptConfig = createScriptConfig() + + NextflowMeta.instance.enableDsl2() } protected Map createScriptConfig() { @@ -134,8 +137,14 @@ class Nextflow extends Console { binding.setSession(session) binding.setScriptPath(path) - beforeExecution = { session.start() } - afterExecution = { session.await(); session.destroy() } + beforeExecution = { + session.start() + } + afterExecution = { + session.fireDataflowNetwork() + session.await() + session.destroy() + } launcher.call() }