Import AbstractMCMC to fix package precompilation (UndefVarError)#298
Merged
ChrisRackauckas merged 1 commit intoJun 17, 2026
Merged
Conversation
The mcmcensemble keyword of bayesian_datafit is annotated AbstractMCMC.AbstractMCMCEnsemble, but AbstractMCMC was never imported into the module; it was only reachable transitively through older Turing versions that re-exported the bare binding. Newer Turing no longer brings AbstractMCMC into scope, so the package fails to precompile with UndefVarError: `AbstractMCMC` not defined. Declare AbstractMCMC as a direct dependency and import it. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
mainCI is red across four checks (Core, Datafit, QA ×2 Julia 1/lts, and Documentation build). All fail at the same root cause: the package no longer precompiles.The
mcmcensemblekeyword of bothbayesian_datafitmethods is annotatedAbstractMCMC.AbstractMCMCEnsemble(added in commit6a350b8, July 2023), butAbstractMCMCwas never imported into the module. It was only reachable transitively because older Turing versions re-exported the bareAbstractMCMCbinding. The Turing version now resolved in CI no longer bringsAbstractMCMCinto the module's scope, so the type annotation fails at precompile/load time and every test group + the docs build dies before running.Fix
Declare
AbstractMCMCas a direct dependency andusing AbstractMCMC. This is the symbol the source actually references.AbstractMCMCwas already present transitively in the resolved environment (v5.15.1), so no manifest/version churn beyond declaring it. Compat set to4, 5(theAbstractMCMCEnsembleabstract type has been stable across both).Local verification (Julia 1.10)
Reproduced the failure on a clean
maincheckout (package failed to load), then confirmed the fix:The package now precompiles and loads, and both
bayesian_datafitmethod signatures resolve.Please ignore until reviewed by @ChrisRackauckas.