bioDS / beast-phylonco

A BEAST2 package for single-cell cancer evolution
GNU Lesser General Public License v2.1
6 stars 2 forks source link

LPhyStudio 1.2.0 error when loading script -- lphy.util.IOUtils class not found #31

Closed kche309 closed 1 year ago

kche309 commented 1 year ago

Running LPhyStudio 1.2.0 from IntelliJ and trying to load a script produces a class not found error Caused by: java.lang.ClassNotFoundException: lphy.util.IOUtils.

LPhyStudio was run using two methods:

walterxie commented 1 year ago

It is caused by loading wrong version of lphy (1.3) if it exists in the Gradle local repo. I will investigate the Gradle functions in the build further:

Screen Shot 2022-08-08 at 10 46 20 AM
walterxie commented 1 year ago

After the investigation, I realise it needs to use the strictly version declaration, by simply adding two "!" will solve this problem. When using the previous declaration (no !), the default behaviour is picking up any available highest version first, so that 1.3.0 (existing in your Gradle local repo) was used instead of 1.2.0.

api("io.github.linguaphylo:lphy:1.2.0!!")

In addition, it should use api in phylonco-lphy build, and delete implementation("io.github.linguaphylo:lphy:1.2.0") from phylonco-lphybeast build, because api will pass it to phylonco-lphybeast by using implementation(project(":phylonco-lphy")).

I do not think it is a bug now, just the usage of Gradle dependencies. @kche309 I suggest to keep as it is, but I will add the comments in lphy1.3 branch. If anyone wants the old version, they can change this in their local machine.