Repository navigation
build: adopt official nextflow-plugin toolchain, target Nextflow 26.04.3 (#9) - #11
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #9.
Problem
SpawnExecutor.createTaskMonitor()calledTaskPollingMonitor.create(Session, String, int, Duration), which Nextflow 26.x removed (replaced by a signature takingExecutorConfig), throwingNoSuchMethodErrorat 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
compileOnlycouldn't fix it.Fix: adopt the official
io.nextflow.nextflow-plugintoolchainIt 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-rolledgroovyplugin, manualcompileOnlynextflow/pf4j/slf4j, the jar manifest block, and the@version@resource filtering.META-INF/nextflow.plugins+META-INF/extensions.idx— both are now generated from thenextflowPluginblock, so they can't drift (the manifest carriesPlugin-Requires: >=26.04.3, andextensions.idxlistsSpawnExecutor, 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.xcreate(session, config, name, 100, '5 sec').SpawnTaskHandler: implementprotected 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)../gradlew assemble, publish the plugin zip (build/distributions/) instead of a bare jar.Verified
Clean
assemble+testbuild against the real Nextflow 26.04.3 API. Packaged zip (nf-spawn-0.2.0.zip) contains a generatedMANIFEST.MF(Plugin-Requires: >=26.04.3,Plugin-Class, …) andMETA-INF/extensions.idx→io.nextflow.spawn.SpawnExecutor.Version bumped to 0.2.0 (toolchain + Nextflow-target change).