Repository navigation
fix: make SpawnExecutor/Handler compile under @CompileStatic (#3) - #4
Merged
Merged
Conversation
Three static-compilation errors blocked `gradle jar` (after the #1 build fix): - SpawnTaskHandler: `task.config.ext?.instanceType` etc. — TaskConfig.ext is an untyped map, so dotted property access fails @CompileStatic type checking. Access via a `Map` cast + subscript instead. - SpawnExecutor.createTaskHandler was `protected`, weaker than the public method it overrides — make it public. - SpawnExecutor was missing the abstract `createTaskMonitor()` from Executor — implement it with a TaskPollingMonitor. Verified `gradle jar` builds nf-spawn-0.1.0.jar cleanly (with #1's build fix, Gradle 9.5.1 / JDK 17). Closes #3.
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 #3.
After the Gradle 7+ build fix (#2),
compileGroovysurfaced three static-compilation errors that blockedgradle jar. All are API-conformance / static-typing issues:SpawnTaskHandler—task.config.ext?.instanceType(andregion/ttl/spot) fail@CompileStatictype checking becauseTaskConfig.extis an untyped map. Fixed by castingexttoMaponce and using subscript access.SpawnExecutor.createTaskHandlerwasprotected— weaker access than thepublicmethod it overrides ("cannot override ... attempting to assign weaker access privileges"). Made itpublic.SpawnExecutordidn't implement the abstractcreateTaskMonitor()fromnextflow.executor.Executor. Added aTaskPollingMonitor.Verification
With #2's build fix applied,
gradle jarnow buildsnf-spawn-0.1.0.jarcleanly (Gradle 9.5.1, JDK 17).Note: depends on #2 (the build.gradle fix) — this branch is off
main, so its own CI won't compile until #2 merges. Merge #2 first.Together #2 + #3 unblock the nf-spawn build in the aws-microbiome-demo AMI bake.