I'm using a plugin I wrote (before the major plugi...
# nextflow-plugins
c
I'm using a plugin I wrote (before the major plugin overhaul) and the language server is upset with me. The plugin is defined in the Nextflow configuration file, and everything compiles/runs fine. My gut feeling is I need to re-release the plugin using the newer templates and systems? Could someone confirm? Either that, or this could be a language server bug for VS Code? Any pointers would be appreciated since this prevents me from auto-converting the pipeline to the new static typed syntax.
b
you need to release a new version of your plugin that requires nextflow >=25.10, then specify that plugin version in your pipeline config the gradle plugin / plugin registry / language server will do the rest ๐Ÿ˜„ (though do let me know if it doesn't work)
c
I had a feeling. Thank you!
b
while you're at it, if you implement your custom config settings in a particular way (see the docs), the language server will also recognize your config options
you can look at nf-prov or nf-schema for a real example
c
Ooooh that is very relevant. Thanks!
a
Will using a safe navigator work, Ben?
Copy code
session.config?.navigate(...)
b
you shouldn't need to use a safe access there because
session.config
should always be present
๐Ÿคจ 1
c
@Ben Sherman I think I've got the refactor correct. I'll make a release soon and test it all out. There's no way to use a dev/local plugin to test the language server, right? I tried and couldn't get it to pickup my config from a dev/locally built plugin.
Released! https://registry.nextflow.io/plugins/nf-dotenv/2.0.0 How do I get the Provider to be what I defined here? https://github.com/fulcrumgenomics/nf-dotenv/blob/329ef199e26629e041790cbe8dae24e6f02c0e38/build.gradle#L24 I also notice an empty description. How do I get that to be filled in?
Darn. I don't think what I did worked. I got this message back from the registry, and
spec
is null:
Copy code
{
    "id": "nf-dotenv",
    "downloadCount": 360,
    "downloadGhCount": 4584,
    "releases":
    [
        {
            "version": "2.0.0",
            "url": "<https://registry.nextflow.io/api/v1/plugins/nf-dotenv/2.0.0/download/nf-dotenv-2.0.0.zip>",
            "date": "2025-11-20T23:25:15.857129Z",
            "sha512sum": "f5db01d8d5c5226c8c6af35330a5c7889d89b9ccdbe4193f04254d4c93f8bccbee9078e73d2c2c917adca6faa5bef70dbeeba14f31ddea115b91d733bfaa60c0",
            "requires": ">=25.10.0",
            "dependsOn":
            [],
            "downloadCount": 1,
            "downloadGhCount": 0,
            "status": "PUBLISHED",
            "spec": null
        }
    ],
    "projectUrl": "<https://github.com/fulcrumgenomics/nf-dotenv>",
    "provider": "nextflow",
    "description": null
},
Not even the Function I exposed seemed to have been percolated.
Any advice you'd have @Ben Sherman would be welcome! It's a very simple plugin so I hope the issue is easy to spot. Could it be that I'm using a somewhat custom package coordinate?
Copy code
package com.fulcrumgenomics.nextflow.plugin
b
I think there are still some issues with the provider and description being updated correctly. For now I just updated them manually from the admin panel
as for the spec, I forgot one more thing you need to change -- update the nextflow gradle plugin to
1.0.0-beta.12
https://github.com/fulcrumgenomics/nf-dotenv/blob/329ef199e26629e041790cbe8dae24e6f02c0e38/build.gradle#L2
c
@Ben Sherman that fixed it! I had to mark one of my Java implementation dependencies as
specFileImplementation
otherwise I was getting a
NoClassDefFoundError
(this seemed wrong to me... but it doesn't seem to have any bad effects): https://github.com/fulcrumgenomics/nf-dotenv/commit/10c26c48d28a5af216016806c4350ef3b342823f I released 2.0.1 of the plugin this morning. Looks like language server support is working for my plugin configuration. Nice!!!
๐Ÿ‘€ 1
๐ŸŽ‰ 1
But I'm only halfway there. In the same pipeline project, I get my original error when trying to use the Function exposed by the plugin:
b
it might just be a limitation of the language server I was able to add your plugin to a config and get the include to work in a script, but I had to edit the script (or close/re-open) to trigger re-compilation, then the error went away
๐Ÿ‘ 1
c
@Ben Sherman thanks a ton! I notice the same thing. Some of my modules show the warning. And after a bit of development, the warning seems to go away. It's not fully cleared in the project. But at least my plugin is up to the modern standards now. Once again, thanks!
b
you can just run "Nextflow: Restart language server" from the command palette to refresh the whole project
โœ… 1