Skip to content
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

Double import of process but only renaming once warns "A process with name 'PROCESSNAME' is defined more than once in module script:" #3560

Closed
robsyme opened this issue Jan 19, 2023 · 3 comments

Comments

@robsyme
Copy link
Collaborator

robsyme commented Jan 19, 2023

Bug report

If a process is imported twice, once aliased using as and once without, Nextflow unnecessarily prints a warning that the process is defined twice.

A minimal two-file example is provided at:

nextflow run robsyme/nf-test -r import-rename-bug

Where main.nf is

include { EXAMPLE } from './modules/main'
include { EXAMPLE as EXAMPLE_B } from './modules/main'

workflow {
    Channel.of("Nextflow")
    | ( EXAMPLE & EXAMPLE_B)
}

and modules/main.nf is

process EXAMPLE {
    input:
    val(name)

    "echo Hi $name"
}

Expected behavior and actual behavior

It is expected that no warning is given, given there is no name conflict.

Steps to reproduce the problem

nextflow run robsyme/nf-test -r import-rename-bug

Program output

❯ nextflow run robsyme/nf-test -r import-rename-bug
N E X T F L O W  ~  version 22.10.5
Launching `https://github.com/robsyme/nf-test` [evil_tuckerman] DSL2 - revision: b55151dc82 [import-rename-bug]
WARN: A process with name 'EXAMPLE_B' is defined more than once in module script: /Users/robsyme/.nextflow/assets/robsyme/nf-test/main.nf -- Make sure to not define the same function as process

Environment

  • Nextflow version: 22.10.5
  • Java version: openjdk version "17.0.5" 2022-10-18
  • Operating system: macOS & Linux
  • Bash version: zsh 5.8.1 & bash
@robsyme robsyme mentioned this issue Jan 19, 2023
7 tasks
@edmundmiller
Copy link
Contributor

Another example here nf-core/viralintegration@8ce2d34

@stale
Copy link

stale bot commented Aug 12, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Aug 12, 2023
@pditommaso
Copy link
Member

Not able to replicate with 23.08.0-edge. Feel free to re-open if the problem persists

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

No branches or pull requests

4 participants