Skip to content

Point OneOnX @deprecated at LogUniform#86

Merged
alexeid merged 1 commit into
masterfrom
oneonx-deprecation-points-at-loguniform
May 13, 2026
Merged

Point OneOnX @deprecated at LogUniform#86
alexeid merged 1 commit into
masterfrom
oneonx-deprecation-points-at-loguniform

Conversation

@alexeid
Copy link
Copy Markdown
Member

@alexeid alexeid commented May 12, 2026

Summary

OneOnX's deprecation message previously said only "1/x can be simulated. Use other distributions" — which leaves migrators (and downstream tooling) guessing what to substitute. LogUniform is the natural proper replacement: its density 1 / (x · log(upper/lower)) on [lower, upper] is, on its support, proportional to 1/x. Unlike the legacy improper 1/x prior it's normalisable and can be sampled from directly.

Point the @deprecated body explicitly at LogUniform so a future migrator can read the replacement off the javadoc, and so deprecation-aware tooling can produce a non-empty hint without hand-curated mappings.

Test plan

  • mvn -q compile succeeds locally
  • The deprecated-class scan in CompEvol/beast3-migration now resolves beast.base.inference.distribution.OneOnXbeast.base.spec.inference.distribution.LogUniform automatically via its javadoc-fallback (89 → 90 of 105 deprecated classes carry an automated spec replacement).
  • CI on this branch.

The previous deprecation message said only '1/x can be simulated. Use
other distributions.' which left migrators guessing. LogUniform is
the natural proper replacement: density 1/(x log(upper/lower)) on
[lower, upper], so on its support it is proportional to 1/x and is
normalisable. Suggest it explicitly so a same-simple-name automated
migration hint isn't the only option.

Surfaced by the deprecated-class scan in beast3-migration: until this
edit, OneOnX referenced in package XMLs (bModelTest, ORC, CoupledMCMC,
the bModelTest fxtemplate) was reported as 'no spec equivalent found'
because no class with the literal simple name OneOnX exists in any
spec package. With the link in the javadoc, the linter's javadoc
fallback now resolves OneOnX -> LogUniform automatically.
@alexeid alexeid merged commit abb26f4 into master May 13, 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.

1 participant