Skip to content

Read plugin specs from locally installed plugins - #197

Merged
bentsherman merged 2 commits into
mainfrom
local-plugin-specs
Oct 30, 2026
Merged

bentsherman merged 2 commits into
mainfrom
local-plugin-specs

Conversation

@bentsherman

Copy link
Copy Markdown
Member

Closes #192

The language server can now check unpublished plugins. It reads the spec of an installed plugin from <plugins dir>/<name>-<version>/classes/META-INF/spec.json, the same JSON the registry returns in its spec field.

  • The plugins dir is resolved like Nextflow: $NXF_PLUGINS_DIR, then $NXF_HOME/plugins, then ~/.nextflow/plugins.
  • A plugin with a version uses the installed release if there is one. Otherwise it is fetched from the registry.
  • A plugin without a version is fetched from the registry. If the registry doesn't have it or can't be reached, the latest installed release is used.
  • A blank or invalid local spec is treated as empty, so the plugin's includes are still reported instead of staying pending.

LocalPluginRegistryClient wraps HttpPluginRegistryClient, so PluginSpecs (caching, retries) is unchanged. Spec parsing moved into PluginSpec.fromJson so both clients share it.

Limitation: specs are cached for the session, so reinstalling the same version needs a restart of the language server.

Testing

  • Unit tests in LocalPluginRegistryClientTest.
  • Manual test with nf-prov built from a checkout and installed under an unpublished version (1.9.0): config options are checked and hover shows their descriptions.
  • Manual test with nf-schema installed under an unpublished version (2.99.0): plugin includes resolve and calls are checked. The diagnostics match the published 2.6.1 from the registry.

@bentsherman
bentsherman merged commit 4a0adb0 into main Oct 30, 2026
7 checks passed
@bentsherman
bentsherman deleted the local-plugin-specs branch October 30, 2026 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plugin function calls: arguments aren't type-checked, and a wrong-arity call can suppress all diagnostics

1 participant