Skip to content

Re-seed bundled core packages when content changes at the same version#113

Merged
walterxie merged 1 commit into
masterfrom
fix/reseed-bundled-packages
Jun 24, 2026
Merged

Re-seed bundled core packages when content changes at the same version#113
walterxie merged 1 commit into
masterfrom
fix/reseed-bundled-packages

Conversation

@alexeid

@alexeid alexeid commented Jun 24, 2026

Copy link
Copy Markdown
Member

Problem

The BEAUti Template menu fix (#110, merged in #111) worked in a developer environment but the menu was still empty in the installed app (#112). The fix code was correct; it never reached the running app.

The release ships BEAST.base/BEAST.app as package zips that BeastLauncher.seedBundledPackage() extracts into the user package dir and loads as plugin module layers. That method only re-extracted when the bundled version was strictly newer than the copy already seeded. The package version string (version.xml) is constant across a release cycle (2.8.0), so after mvn package + a fresh build the stale lib/ was kept and the app kept loading pre-fix classes. (Confirmed: the crash trace in #112 matches pre-fix line numbers.)

Fix

When the user copy reports the same version as the bundled one, compare a SHA-256 of the bundled zip against a marker (.bundled.checksum) written at seed time, and re-extract on mismatch. This catches development rebuilds and re-released betas, not just SNAPSHOTs.

Differing versions are still decided by number alone — a strictly newer user copy (e.g. a package-manager upgrade) is never downgraded, a strictly older one is always replaced. The checksum is computed only when versions match or when re-seeding.

Tests

SeedBundledPackageReseedTest (new): same-version-new-content re-seeds, identical zip is left untouched, strictly-newer user copy is preserved. Existing SeedBundledPackageTest still passes.

Fixes #112

seedBundledPackage only re-extracted a bundled core package (BEAST.base,
BEAST.app) into the user package dir when the bundled version was strictly
newer than the copy already there. The package version string stays
constant across a release cycle (e.g. 2.8.0), so after `mvn package` plus a
fresh application build the stale lib/ was kept and the running app loaded
pre-fix classes -- which is why the BEAUti Template menu fix (#110) worked
in a developer environment but not in the installed app.

When the user copy reports the same version as the bundled one, fall back
to comparing a SHA-256 of the bundled zip against a marker recorded at seed
time, and re-extract on mismatch. Versions that differ are still decided by
number alone: a strictly newer user copy is never downgraded, a strictly
older one is always replaced. The checksum is computed only when the
versions match or when re-seeding.

Fixes #112
@alexeid alexeid mentioned this pull request Jun 24, 2026
@walterxie walterxie merged commit 650d470 into master Jun 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BEAUti template issue

2 participants