Skip to content

ConfigScopeof plugin not found #6974

@JosuaCarl

Description

@JosuaCarl

Bug report

Expected behavior and actual behavior

We are currently trying to address the warnings of the v2 syntax parser:

...
WARN: Unrecognized config option 'co2footprint.dataFile.enabled'
WARN: Unrecognized config option 'co2footprint.location'
...

But a proposed PR which should align all ConfigScope classes with the template in the documentation (see nextflow-io/nf-co2footprint#362) does not fix the issue. During a deeper dive I found that the ConfigValidator validates against all ConfigScope classes, but our classes are never recognized.

Steps to reproduce the problem

Use v2 Parser with nextflow-io/nf-co2footprint#362 of the nf-co2footprint plugin.

Program output

I collected the following info during runtime:

  • Plugins.isStarted('nf-co2footprint') -> true indicates that the plugin is correctly started
  • Plugins.getExtensions(ConfigScope) lists a bunch of ConfigScope classes, but none from the plugin are among them
  • Plugins.manager.getExtensionClasses('nf-co2footprint') -> [CO2FootprintFactory, CO2FooprintExtension] this lists the PluginExtensionPoint and TraceObserverFactory, which is to be expected, but not the ConfigScope
  • Consequently Plugins.getExtensionsInPluginId(ConfigScope, 'nf-co2footprint') is empty

Environment

  • Nextflow version: 25.10.4

Sneak Peak into the main config class

@ScopeName('co2footprint')
@Description('The `co2footprint` scope allows you to configure the `nf-co2footprint` plugin.')
@Slf4j
class CO2FootprintConfig implements ConfigScope {

    ...

    @ConfigOption(types=[GString])
    @Description('Location GeoCode from Electricity maps.')
    final String location
    
    ...

    /**
     * No-arg constructor required by Nextflow's v2 config parser to
     * discover and validate config options at parse time.
     */
    CO2FootprintConfig() {}

    /**
     * Loads configuration from a map and sets up defaults and fallbacks.
     * Also sets up CPU and CI data sources and assigns machine type and PUE.
     *
     * @param configMap   Map of configuration values (from Nextflow config)
     * @param cpuData     TDPDataMatrix with CPU power draw data
     * @param ciData      CIDataMatrix with carbon intensity data
     * @param processMap  Map with process/executor info
     */
    CO2FootprintConfig(...) {
        ...
    }
    ...
}

Have we missed anything in the template?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions