Skip to content

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

@rcannood

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. What I would expect to happen:

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 test-nf-plugin-commands@0.1.0:hello
Hello from test-nf-plugin-commands:hello!

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).

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 test-nf-plugin-commands@0.1.0:hello
Cannot find target plugin: test-nf-plugin-commands@0.1.0
$ 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.

Program output

(Copy and paste the output produced by the failing execution. Please highlight it as a code block. Whenever possible upload the .nextflow.log file.)

Environment

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

Additional context

(Add any other context about the problem here)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions