Skip to content

chore!: make update public rather than exported#243

Open
seabbs-bot wants to merge 1 commit into
mainfrom
chore/update-export-to-public-221
Open

chore!: make update public rather than exported#243
seabbs-bot wants to merge 1 commit into
mainfrom
chore/update-export-to-public-221

Conversation

@seabbs-bot

Copy link
Copy Markdown
Collaborator

Summary

First half of #221: update moves from export to public.

Several ecosystem packages (and plenty outside it) have their own update-shaped verb. Exporting a name this generic risks the same ambiguous-binding clash #233 hit with as_turing, where two packages both exporting a same-named generic function makes the bare name unresolvable when both are loaded together. public.jl already carries this pattern for several other names (flat_dimension, reconstruct, params_table, ...); update fits the same shape.

A caller now reaches it as ComposedDistributions.update(...) or using ComposedDistributions: update.

Blast radius

update is this package's single most heavily used verb — about 150 call sites across 18 files (test suite + doc tutorials) relied on the implicit export to call it unqualified inside a @testitem/tutorial script (TestItemRunner auto-usings the tested package per item, which only brings in exported names, not public ones). Fixed all of them: added an explicit using ComposedDistributions: update to each affected testitem/script.

One real build failure caught by running docs, not by inspection: docs/src/getting-started/index.md has a genuinely executable @example overview block using bare update(...) (unlike most of the other affected doc pages, where update only appears in prose/tables/non-executed ```julia blocks) — fixed by adding the import to that block's using line.

The remaining [update](@ref) cross-reference warnings across several doc pages are cosmetic (not build-breaking) and match a pre-existing pattern already tolerated in this repo for other public-not-exported names (flat_dimension, as_logdensity, logdensity, to_constrained, flatten, unflatten are already in the same "no docstring found for Main.X" state on main, confirmed by diffing against a pristine checkout) — not something this PR need chase further.

Test plan

  • task test-fast: 1625/1625 pass
  • task test-quality: 228/241 pass, 13 broken (pre-existing expected-broken tests, unrelated)
  • task docs-fast: builds clean (was failing on the index.md executable block before the fix above)

NEWS.md carries the breaking-change note.

This was opened by a bot. Please ping @seabbs for any questions.

Several ecosystem packages (and plenty outside it) have their own
update-shaped verb; exporting a name this generic risks the same
ambiguous-binding clash #233 hit with as_turing when two packages both
export a same-named generic function. Reach it as
ComposedDistributions.update or `using ComposedDistributions: update`.

Fixes the ~150 call sites across the test suite and docs that relied on
the implicit export to call update unqualified.

Co-authored-by: Sam Abbott <contact@samabbott.co.uk>
@github-actions

Copy link
Copy Markdown
Contributor

Try this Pull Request!

Option 1: Julia Package Manager

Open Julia and type:

import Pkg
Pkg.activate(temp=true)
Pkg.add(url="https://github.com/EpiAware/ComposedDistributions.jl", rev="chore/update-export-to-public-221")
using ComposedDistributions

Option 2: Local Checkout

If you have the repo locally:

git checkout chore/update-export-to-public-221
julia --project=. -e "using Pkg; Pkg.instantiate()"

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