CompEvol / beast2

Bayesian Evolutionary Analysis by Sampling Trees
www.beast2.org
GNU Lesser General Public License v2.1
241 stars 84 forks source link

Package manager fails to open in 2.3.3 pre-release #488

Closed tgvaughan closed 8 years ago

tgvaughan commented 8 years ago

This is what happens when I try to open the package manager using the 2.3.3 pre-release (https://github.com/CompEvol/beast2/tree/2.3.3pre): error I've traced the error to an IOException in JPackageDialog.resetPackages(), which in turn is generated from a call to AddonManager.getPackages() which assembles the package list from the XMLs found in the URLs returned by (sic) AddOnManager.getPackagesURL(). Along with any user-specified package URLs, this has previously returned a URL pointing to the main packages[version].xml file which is currently hosted on github here: https://github.com/CompEvol/CBAN. However, as of the pre-release, the method returns two URLs: one pointing to packages2.3.1.xml and one pointing to packages2.3.3.xml (here's the point in the source: https://github.com/CompEvol/beast2/blob/master/src/beast/util/AddOnManager.java#L134). The IOException is thrown by an InputStream responsible for retrieving the contents of this non-existent XML.

I've marked this as critical because this bug means that you can't download packages using BEAUti in the pre-release.

One final comment - this should be fixed carefully. Removing the reference to the non-existent file or uploading the file so that it does exist solves the immediate problem, but it doesn't address the fact that an invalid URL should not prevent the package manager from displaying the packages gleaned from the URLs it was able to resolve. I'd suggest catching the IOException at a deeper level and providing a warning that one of the URLs wasn't accessible rather than just aborting.

rbouckaert commented 8 years ago

Released as v2.3.3pre2 now.

tgvaughan commented 8 years ago

Haven't finished with this yet - ran out of time yesterday afternoon. The IOException handler still needs to be moved.

tgvaughan commented 8 years ago

Wasn't able to return partial lists in the end and still keep the error reporting going. Settled for improving the error reporting to actually list URLs which are at fault.