Skip to content

Fix docs build: resolve collocate_data ambiguity on Julia 1.12#28

Merged
ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:fix-docs-collocate-data-ambiguity
Jun 20, 2026
Merged

Fix docs build: resolve collocate_data ambiguity on Julia 1.12#28
ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:fix-docs-collocate-data-ambiguity

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Collaborator

The build / Build and Deploy Documentation job on main fails on Julia 1.12. The first @example collocation_cp block in docs/src/neural_ode_training.md errors with:

UndefVarError: `collocate_data` not defined in `Main.__atexample__named__collocation_cp`
Hint: ... two or more modules export different bindings with this name, resulting in ambiguity.
Hint: a global variable of this name also exists in DiffEqFlux.
Hint: a global variable of this name also exists in DataCollocations.

The block does both using DiffEqFlux and using DataCollocations, and both modules export collocate_data. On Julia 1.12 an unqualified reference to a name exported by two using-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_neuralode undefined), so makedocs terminated with an [:example_block] error.

Fix

Import collocate_data explicitly from DataCollocations (alongside the already-explicit EpanechnikovKernel):

-using DataCollocations
-using DataCollocations: EpanechnikovKernel
+using DataCollocations: collocate_data, EpanechnikovKernel

This makes the binding unambiguous regardless of DiffEqFlux re-exporting the same name. Only neural_ode_training.md imports DiffEqFlux, so no other page is affected.

Local verification (Julia 1.12.6, real DiffEqFlux + DataCollocations)

  • OLD import reproduces the exact CI UndefVarError ambiguity.
  • NEW import resolves collocate_data to DataCollocations.collocate_data (verified parentmodule).
  • The examples actual collocate_data(data, tsteps, EpanechnikovKernel())call executes and returnsdu/uof size(2, 300)`.

Please ignore until reviewed by @ChrisRackauckas

…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>
@ChrisRackauckas ChrisRackauckas marked this pull request as ready for review June 20, 2026 11:01
@ChrisRackauckas ChrisRackauckas merged commit 2355f22 into SciML:main Jun 20, 2026
17 checks 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.

2 participants