Fix docs build: resolve collocate_data ambiguity on Julia 1.12#28
Merged
ChrisRackauckas merged 1 commit intoJun 20, 2026
Conversation
…ng.md
On Julia 1.12 the docs `build / Build and Deploy Documentation` job fails in
the first `@example collocation_cp` block of neural_ode_training.md with:
UndefVarError: `collocate_data` not defined ...
Hint: ... ambiguity ... also exists in DiffEqFlux ... also exists in DataCollocations.
The block does both `using DiffEqFlux` and `using DataCollocations`, and both
modules export `collocate_data`. Julia 1.12 no longer silently picks one of two
clashing exported bindings; an unqualified reference is an ambiguity error. The
failure of the first block cascaded to every subsequent block (du/u/prob_neuralode
undefined), terminating the build.
Fix: import `collocate_data` explicitly from DataCollocations (alongside the
already-explicit EpanechnikovKernel), so the binding is unambiguous regardless
of DiffEqFlux's re-export.
Verified locally on Julia 1.12.6 against the real DiffEqFlux + DataCollocations
packages: the old import reproduces the exact CI UndefVarError, the new import
resolves collocate_data to DataCollocations.collocate_data, and the example's
collocate_data(...) call executes successfully.
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.
The
build / Build and Deploy Documentationjob onmainfails on Julia 1.12. The first@example collocation_cpblock indocs/src/neural_ode_training.mderrors with:The block does both
using DiffEqFluxandusing DataCollocations, and both modules exportcollocate_data. On Julia 1.12 an unqualified reference to a name exported by twousing-ed modules is an ambiguity error rather than silently resolving to one. The first block failing cascaded to every later block on the page (du/u/prob_neuralodeundefined), somakedocsterminated with an[:example_block]error.Fix
Import
collocate_dataexplicitly fromDataCollocations(alongside the already-explicitEpanechnikovKernel):This makes the binding unambiguous regardless of DiffEqFlux re-exporting the same name. Only
neural_ode_training.mdimports DiffEqFlux, so no other page is affected.Local verification (Julia 1.12.6, real DiffEqFlux + DataCollocations)
UndefVarErrorambiguity.collocate_datatoDataCollocations.collocate_data(verifiedparentmodule).s actualcollocate_data(data, tsteps, EpanechnikovKernel())call executes and returnsdu/uof size(2, 300)`.Please ignore until reviewed by @ChrisRackauckas