Thanks to visit codestin.com
Credit goes to github.com

Skip to content

How to run nextflow plugin <id>:command against a locally-installed development plugin #7104

Description

@rcannood

Bug report

When developing a Nextflow plugin that implements PluginExecAware, there is no supported way to invoke nextflow plugin <id>:command against a locally-built development version. Every combination of flags either attempts to download from the registry (which may not have the development version) or fails with a "Cannot find target plugin" error even though the plugin is already installed locally.

Expected behavior and actual behavior

When developing a nextflow plugin, I expect to be able to pass a plugin version so that I can test a local development version before publishing.

Expected:

git clone https://github.com/rcannood/test-nf-plugin-commands
cd test-nf-plugin-commands
make assemble install
# ~/.nextflow/plugins/test-nf-plugin-commands-0.1.0/ now exists
$ nextflow plugin [email protected]:hello
Hello from test-nf-plugin-commands:hello!

Actual:

$ nextflow plugin test-nf-plugin-commands:hello
ERROR ~ Cannot find latest version of test-nf-plugin-commands plugin

$ nextflow plugin [email protected]:hello
Cannot find target plugin: [email protected]

Steps to reproduce the problem

A self-contained reproduction is available at https://github.com/rcannood/test-nf-plugin-commands .

The repository was scaffolded from nf-plugin-template using NXF_VER=26.04.0 nextflow plugin create. The only change from the template is adding PluginExecAware to the plugin class (see this commit).

Reproducible example
git clone https://github.com/rcannood/test-nf-plugin-commands
cd test-nf-plugin-commands
make assemble install
# ~/.nextflow/plugins/test-nf-plugin-commands-0.1.0/ now exists

Then try any of the following:

Attempt 1: no version, no offline flag:

$ nextflow plugin test-nf-plugin-commands:hello
ERROR ~ Cannot find latest version of test-nf-plugin-commands plugin

Attempt 2: NXF_OFFLINE=true, no version:

$ NXF_OFFLINE=true nextflow plugin test-nf-plugin-commands:hello
ERROR ~ Cannot find version for test-nf-plugin-commands plugin -- plugin versions MUST be specified in offline mode

Attempt 3: NXF_OFFLINE=true, version specified:

$ NXF_OFFLINE=true nextflow plugin [email protected]:hello
Cannot find target plugin: [email protected]
$ NXF_OFFLINE=true nextflow plugin test-nf-plugin-commands-0.1.0:hello
Cannot find target plugin: test-nf-plugin-commands-0.1.0

All three attempts fail on both Nextflow 25.10.4 and 26.04.0.

Environment

  • Nextflow version: tested with 26.04.0 and 25.10.4
  • Java version: 21
  • Operating system: Linux
  • Bash version: 5.2.37(1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions