nextflow icon indicating copy to clipboard operation
nextflow copied to clipboard

Convert Duration and MemoryUnit to Java

Open bentsherman opened this issue 1 year ago • 2 comments

Exploring the possibility of converting some lower-level classes to Java, to move towards native compilation. Duration and MemoryUnit will be used by the language server to do type checking.

bentsherman avatar Aug 02 '24 17:08 bentsherman

Deploy Preview for nextflow-docs-staging canceled.

Name Link
Latest commit 84a265d738fcbf41464277f132f7fe87311e70ac
Latest deploy log https://app.netlify.com/sites/nextflow-docs-staging/deploys/66b38af79572040008892eef

netlify[bot] avatar Aug 02 '24 17:08 netlify[bot]

There is one minor sticking point, which is the Duration toString(). Durations between 1s and 60s are rendered with one decimal place, e.g 1.5s. However, Groovy has some extra magic -- it will print 3.0 as 3 whereas Java will print 3.0. I don't know if this was an actual requirement so I just updated the failing tests to include the .0.

It's a minor change but also this PR is pretty low-stakes, so you can take it or leave it

bentsherman avatar Aug 07 '24 15:08 bentsherman

Closing in favor of implementing Duration / MemoryUnit interfaces from a shared library

bentsherman avatar Nov 15 '24 18:11 bentsherman