Bug report
Expected behavior and actual behavior
When specifying a version the correct version should be loaded from a local repository.
Steps to reproduce the problem
Works (with the current version 1.2.1):
nextflow plugin nf-co2footprint:postRun --tracePath out/pipeline_info execution_trace.txt --config nextflow.config
Does not work:
nextflow plugin nf-co2footprint@1.2.1:postRun --tracePath out/pipeline_info execution_trace.txt --config nextflow.config
Program output
nextflow plugin nf-co2footprint@1.3.0:postRun --tracePath out/pipeline_info/execution_trace_2026-05-06_09-55-52.txt --config nextflow.config
->
nf-co2footprint plugin ~ version 1.3.0
Cannot find target plugin: nf-co2footprint@1.3.0
The first line is from the plugin itself, showing that it is loaded and started. I could trace the path of the command being issued to the version and plugin name being correctly
parsed:
|
final head = args.pop() |
|
final items = head.tokenize(CMD_SEP) |
|
final target = items[0] |
|
final cmd = items[1] ? items[1..-1].join(CMD_SEP) : null |
|
|
|
// push back the command as the first item |
|
Plugins.start(target) |
, interpreted:
|
static PluginRef parse(String fqid, DefaultPlugins defaultPlugins=null) { |
|
final tokens = fqid.tokenize('@') as List<String> |
|
final id = tokens[0] |
|
final ver = tokens[1] |
|
if( ver || defaultPlugins==null ) |
|
return new PluginRef(id, ver) |
|
if( defaultPlugins.hasPlugin(id) ) |
|
return defaultPlugins.getPlugin(id) |
|
return new PluginRef(id) |
,loaded:
|
boolean installPlugin(String id, String version) { |
|
if( !pluginsStore ) |
|
throw new IllegalStateException("Missing pluginStore attribute") |
|
|
|
return load0(id, version) |
|
} |
with the intended path ($HOME/.nextflow/plugins/nf-co2footprint-1.3.0):
|
PluginWrapper wrapper = pluginManager.loadPluginFromPath(pluginPath) |
, and started (this is where the plugin first logs its version):
|
PluginState state = pluginManager.startPlugin(id) |
|
return PluginState.STARTED == state |
However, after the successful startup the plugin can not be fetched from the manager and the wrapper is null, leading to the error:
|
final wrapper = Plugins.manager.getPlugin(target) |
|
if( !wrapper ) |
|
throw new AbortOperationException("Cannot find target plugin: $target") |
Environment
- Nextflow version: 26.04.0
- Operating system: MacOS
Additional context
So my question is: Why does the plugin start up correctly, but is not found in the manager? And why does it work if I do not supply a specific version?
Relates to nextflow-io/nf-co2footprint#391
Bug report
Expected behavior and actual behavior
When specifying a version the correct version should be loaded from a local repository.
Steps to reproduce the problem
Works (with the current version 1.2.1):
Does not work:
Program output
nextflow plugin nf-co2footprint@1.3.0:postRun --tracePath out/pipeline_info/execution_trace_2026-05-06_09-55-52.txt --config nextflow.config->
The first line is from the plugin itself, showing that it is loaded and started. I could trace the path of the command being issued to the version and plugin name being correctly
parsed:
nextflow/modules/nextflow/src/main/groovy/nextflow/cli/CmdPlugin.groovy
Lines 73 to 79 in ab6be6d
, interpreted:
nextflow/modules/nf-commons/src/main/nextflow/plugin/PluginRef.groovy
Lines 47 to 55 in ab6be6d
,loaded:
nextflow/modules/nf-commons/src/main/nextflow/plugin/PluginUpdater.groovy
Lines 223 to 228 in ab6be6d
with the intended path ($HOME/.nextflow/plugins/nf-co2footprint-1.3.0):
nextflow/modules/nf-commons/src/main/nextflow/plugin/PluginUpdater.groovy
Line 383 in ab6be6d
, and started (this is where the plugin first logs its version):
nextflow/modules/nf-commons/src/main/nextflow/plugin/PluginUpdater.groovy
Lines 414 to 415 in ab6be6d
However, after the successful startup the plugin can not be fetched from the manager and the wrapper is
null, leading to the error:nextflow/modules/nextflow/src/main/groovy/nextflow/cli/CmdPlugin.groovy
Lines 80 to 82 in ab6be6d
Environment
Additional context
So my question is: Why does the plugin start up correctly, but is not found in the manager? And why does it work if I do not supply a specific version?
Relates to nextflow-io/nf-co2footprint#391