Skip to content

build: adopt official nextflow-plugin toolchain, target Nextflow 26.04.3 (#9) - #11

Merged
scttfrdmn merged 1 commit into
mainfrom
fix/taskmonitor-reflection
Jun 2, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
fix/taskmonitor-reflection

Conversation

@scttfrdmn

Copy link
Copy Markdown
Collaborator

Closes #9.

Problem

SpawnExecutor.createTaskMonitor() called TaskPollingMonitor.create(Session, String, int, Duration), which Nextflow 26.x removed (replaced by a signature taking ExecutorConfig), throwing NoSuchMethodError at runtime. This is the third break (#3, #7, #9) from the same root cause: the plugin compiled against Nextflow 23.10.0 while running on 26.04.3.

Crucially, no published Maven Central artifact has the 26.x signature (it landed in an unpublished edge release), so just bumping compileOnly couldn't fix it.

Fix: adopt the official io.nextflow.nextflow-plugin toolchain

It resolves the Nextflow API (including 26.x) from the Seqera Maven repo and makes the build track one declared Nextflow version — eliminating the compile-vs-runtime drift that caused all three issues.

  • build.gradle: io.nextflow.nextflow-plugin 1.0.0-beta.14, nextflowPlugin { nextflowVersion = '26.04.3'; className; extensionPoints }. Drops the hand-rolled groovy plugin, manual compileOnly nextflow/pf4j/slf4j, the jar manifest block, and the @version@ resource filtering.
  • Deletes hand-written META-INF/nextflow.plugins + META-INF/extensions.idx — both are now generated from the nextflowPlugin block, so they can't drift (the manifest carries Plugin-Requires: >=26.04.3, and extensions.idx lists SpawnExecutor, fixing SpawnExecutor not discovered by ExecutorFactory — missing service descriptor #7's concern structurally).
  • settings.gradle: foojay resolver for the JDK 21 build toolchain; wrapper → 8.14.
  • SpawnExecutor.createTaskMonitor: 26.x create(session, config, name, 100, '5 sec').
  • SpawnTaskHandler: implement protected killTask() (26.x renamed the abstract hook; kill() is now concrete on the base — a second 26.x API change the old compile target hid).
  • README: documents that nf-spawn is built with the official toolchain and tracks a specific Nextflow release.
  • CI/release: JDK 21, ./gradlew assemble, publish the plugin zip (build/distributions/) instead of a bare jar.

Verified

Clean assemble + test build against the real Nextflow 26.04.3 API. Packaged zip (nf-spawn-0.2.0.zip) contains a generated MANIFEST.MF (Plugin-Requires: >=26.04.3, Plugin-Class, …) and META-INF/extensions.idx → io.nextflow.spawn.SpawnExecutor.

Version bumped to 0.2.0 (toolchain + Nextflow-target change).

…4.3 (#9)

createTaskMonitor() called the removed TaskPollingMonitor.create(Session, String,
int, Duration) signature, throwing NoSuchMethodError on Nextflow 26.x — the
third break (#3, #7, #9) caused by compiling against an ancient Nextflow
(23.10.0) while running on a modern one. No published Maven Central artifact has
the 26.x signature, so bumping compileOnly alone couldn't fix it.

Migrate to the official io.nextflow.nextflow-plugin Gradle toolchain, which
resolves the Nextflow API (incl. 26.x) from the Seqera Maven repo and makes the
build track one declared Nextflow version:

- build.gradle: io.nextflow.nextflow-plugin 1.0.0-beta.14 with
  nextflowPlugin { nextflowVersion = '26.04.3'; className; extensionPoints }.
  Drops the hand-rolled groovy plugin, manual compileOnly nextflow/pf4j/slf4j,
  the jar manifest block, and the @Version@ resource filtering.
- Delete hand-written META-INF/nextflow.plugins and META-INF/extensions.idx —
  both are now generated from the nextflowPlugin block (manifest + idx),
  so they can't drift from the targeted API.
- settings.gradle: foojay resolver for the JDK 21 build toolchain. Wrapper → 8.14.
- SpawnExecutor.createTaskMonitor: use 26.x create(session, config, name, ...).
- SpawnTaskHandler: implement protected killTask() (26.x renamed the abstract
  hook; kill() is now concrete on the base).
- README: document that nf-spawn is built with the official toolchain and tracks
  a specific Nextflow release (bump nextflowVersion to follow releases).
- CI/release: JDK 21, `assemble`, publish the plugin zip (build/distributions)
  instead of a bare jar.

Verified: clean assemble+test builds against the real 26.04.3 API; the packaged
zip carries a generated manifest (Plugin-Requires >=26.04.3) and extensions.idx.
Closes #9.
@scttfrdmn
scttfrdmn merged commit 54eb09b into main Jun 2, 2026
1 check passed
@scttfrdmn
scttfrdmn deleted the fix/taskmonitor-reflection branch June 2, 2026 20:23
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.

SpawnExecutor.createTaskMonitor uses removed TaskPollingMonitor.create signature (Nextflow 26.x)

1 participant