nextflow-io / nextflow-io/nextflow

Importing operator from plugin in multiple modules doesn't work

Open
#4,926 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug plugins stale triage/investigate
Dominant language
Groovy
Stars
3.5k
Forks
811
Avg merge
2d 11h
Merged PRs (30d)
61

Description

When importing an operator from a plugin, if you import anything from the same plugin in a different module, it fails with the following error:

https://github.com/nextflow-io/nextflow/blob/f1cffd1b28b443aa3fbd9f99404fea84613d85df/modules/nextflow/src/main/groovy/nextflow/plugin/extension/PluginExtensionProvider.groovy#L137-L139

It seems to import the operator twice and reports duplicate operators. It only seems to happen with operators, not factories or functions.

Here is a minimal test case: https://github.com/human9/nextflow-import-issue

Source: https://github.com/nextflow-io/nf-schema/pull/3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with PluginExtensionProvider.groovy at lines 137-139 and run the minimal reproduction linked in the issue. Trace why importing an operator from the same plugin in multiple modules is treated as a duplicate; done means operators work across modules without the duplicate-operator error while existing factory and function behavior remains unaffected.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.