Skip to content

Check for duplicate process/workflow calls in strict syntax #6324

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bentsherman
Copy link
Member

This PR adds the check for duplicate process/workflow calls to the strict syntax.

Currently the check is performed at runtime:

if( this instanceof ProcessDef && !invocations.add(fqName) ) {
log.debug "Bindable invocations=$invocations"
final msg = "Process '$name' has been already used -- If you need to reuse the same component, include it with a different name or include it in a different workflow context"
throw new DuplicateProcessInvocation(msg)
}

With the strict syntax, we can now catch this error much earlier at compile-time.

However, it looks like the runtime check only applies to duplicate process calls. There is no equivalent check for duplicate workflow calls even though I believe there should be, since duplicate workflows would lead to processes with the same fully-qualified name. @pditommaso do you remember if this was intentional?

@bentsherman bentsherman requested a review from pditommaso August 2, 2025 15:41
@bentsherman bentsherman requested a review from a team as a code owner August 2, 2025 15:41
Copy link

netlify bot commented Aug 2, 2025

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit 6f6a4cd
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs-staging/deploys/688e31b721414400087b875b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant