naobservatory / mgs-workflow

3 stars 2 forks source link

SDKMAN! dependency #28

Open mikemc opened 3 days ago

mikemc commented 3 days ago

Currently the readme lists SDKMAN! as a dependency, but I think the only real dependency is having a Nextflow-compatible java version installed, which on AWS EC2 I've generally just done through the standard package manager (dnf) and on mac through homebrew, so I'm wondering if it makes to clarify that you don't need to bother with SDKMAN! if you already have java. E.g. perhaps the readme dependencies section could say something like

  1. Java: Nextflow requires java 11 or later (up to 22), which you can install in several ways, including your OS's package manager, homebrew, or the SDKMAN! Java SDK manager (see https://sdkman.io/install or the Nextflow installation instructions)
  2. Nextflow: To install the workflow management framework, follow the installation instructions available here

Alternatively, we could just list Nextflow as a dependency, since I think Java is only needed as a dependency of Nextflow and is covered in the Nextflow instructions, though maybe it's still helpful to have Java explicitly listed.

willbradshaw commented 3 days ago

Nextflow can be quite picky as to the exact version of Java you have installed, such that using others can occasionally lead to hard-to-debug errors. Until recently it had quite stern warnings on the installation page about this; these seem to have been toned down, but it still says:

If you don’t have a compatible version of Java installed in your computer, it is recommended that you install it through SDKMAN!, and that you use the latest LTS version of Temurin.

I can add a footnote saying that installation and management of Java through SDK is recommended, but it will probably work if you install it through another source.

On Thu, 27 Jun 2024 at 13:50, Michael McLaren @.***> wrote:

Currently the readme lists SDKMAN! as a dependency, but I think the only real dependency is having a Nextflow-compatible java version installed, which on AWS EC2 I've generally just done through the standard package manager (dnf), so I'm wondering if it makes to clarify that you don't need to bother with SDKMAN! if you already have java

Java: Nextflow requires java 11 or later (up to 22), which you can install in several ways, including your OS's package manager, homebrew, or the SDKMAN! Java SDK manager (see https://sdkman.io/install or the Nextflow installation instructions) Nextflow: To install the workflow management framework, follow the installation instructions available here https://www.nextflow.io/docs/latest/getstarted.html

— Reply to this email directly, view it on GitHub https://github.com/naobservatory/mgs-workflow/issues/28, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADWVV6VIZPRMRCXBHMLE5CTZJRGHBAVCNFSM6AAAAABKAMWHD6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGM3TQNZUG43TIMQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

mikemc commented 2 days ago

Hmm, the current nextflow install instructions that the readme links to say

Nextflow can be used on any POSIX-compatible system (Linux, macOS, etc), and on Windows through WSL. It requires Bash 3.2 (or later) and Java 11 (or later, up to 22) to be installed.

Which I copied into my suggested new text. This is quite broad and is compatible with just installing the most recent java in AWS with dnf.

But the example install they give using SDKMAN explicitly installs "java 17.0.10-tem", suggesting they recommend a specific version. Possibly this ambiguity is a holdover from the change in language you are noting.

It seems to me that if the pipeline requires a specific version of java (such as java 17) to work reliably, then we should add that to the readme, since it sounds like just saying to use SDKMAN on its own won't guarantee any version, and the nextflow docs are at best highly ambiguous on whether it matters if you use java 17 from SDKMAN or any java between 11 to 22.

Perhaps what is most relevant is reporting the specific java you use when you're testing the pipeline. We could tell people the official nextflow req of java 11 to 22, but state that you test the pipeline with a specific version and recommend using that version for debugging or maximum stability