What will change in v2.5.0 for developers

March 2018 by Remco Bouckaert

There are a few notable name changes, and there package loading is now no longer being done dynamically, but by pre-constructed classpath. This leads to much faster starting, but may require changes in debugging.

Name changes

AddOnManager is now PackageManager.

BEAST_ADDON_PATH is deprecated and you need to use BEAST_PACKAGE_PATH instead (though for a time both are recognised) in either environment variables or java properties.

In version.xml files for packages, the element addonapp should be replaced by packageapp, though the former will be recognised as long as there is no element of the latter (for now).

  • Packages require a projectURL field. Without the field, the package will not be displayed in the package manager.
  • appstore is renamed to applauncher.
  • addonmanager is renamed to packagemanager.

Signature changes

The signature of Logger.log(int, OutputStream) and Loggable.log(long, OutputStream) changes: it used to take an int, but now takes a long. For Loggable.log an extra method was added to deal with both int and long for backward compatibility, but you are encouraged to change your Loggables to use the long

Access changes

Frequencies.update() and Frequencies.needsUpdate are now protected instead of package private.

Alignment.usingTipLikelihoods is now protected instead of private.

ClusterTree.Type is now protected instead of package private.

Debugging

All BEAST utilities used to load packages on the fly. This does not longer happen, and instead BeastLauncher and derived classes will create a class path pointing to all relevant jars and store the path in a properties file. At next launch, the path is loaded from the properties file, resulting in much faster launch, especially when launched via the AppLauncher.

For developers that are used to launch BEAST through beast.app.beastapp.BeastMain, this means installed packages will no longer be loaded. Setting the beast.load.jars property makes BEAST revert to its old behaviour on Java 8, but not on Java 9, which uses a different way to manage jar files. When you start from the commmand line:

java -Dbeast.load.jars=true -jar beast.jar test.xml

Or in an IDE, add -Dbeast.load.jars=true to the JVM arguments.

Installing packages by hand

You can install a package by hand by creating a directory in the BEAST package directory (c:\Users\yourname\BEAST\2.5\ on Windows, ~/Library/Application Support/BEAST/2.5/ on OS X, or ~/.beast/2.5/ for Linux), and unzipping a package file inside the folder.

You need to reset the class path for v2.5.0.

The class path stored in the beauti.properties file inside the BEAST package directory. Easiest to do this is by starting BEAUti and click the menu File/Clear class path. Alternatively, delete the package.path entry from the beauti.properties file.

Behavious changes

RPNCalculator now uses multi dimensional log labels start at 1 instead of 0, which makes it consistent with Parameter logging. This may have consequences for post-processing apps.

Library changes

The antlr library was upgraded to antlr-runtime-4.7.jar from antlr-runtime-4.5.jar.

Deprecated

The DataType class has its nomenclature cleaned up; The character "R" corresponds to the code 5 and the state list {0, 2}, which contains the states 0 and 2 and can be expressed as a boolean array {true, false, true, false}. Consequently, some methods have been renamed, and existing ones deprecated, including
  • DataType.state2string now encodingToString
  • DataType.isAmbiguousState now isAmbiguousCode
  • DataType.getChar now getCharacter
  • DataType.getCode now encodingToString
  • DataType.char2state now stringToEncoding
Node.getAllChildNodes now Node.getAllChildNodesAndSelf.