Skip to content

Conversation

@timholy
Copy link
Member

@timholy timholy commented Jan 19, 2026

InteractiveUtils provides a number of utilities for querying and accessing the contents of modules. Because these modules can gain new bindings, some callers of InteractiveUtils functions produce warnings

WARNING: Detected access to binding ... prior to its definition world.

One dramatic example occurs with the sequence

using OptimizationProblems: OptimizationProblems
using OptimizationProblems.ADNLPProblems
using ADNLPModels: ADNLPModel

when running with Revise, where it can produce hundreds of warnings. ADNLPProblems loads new problems via Requires, and starting with v3.13 Revise queries InteractiveUtils.subtypes to cache dependent fieldtypes. This triggers the warning, and because it runs in a separate task, the --depwarn=error trick unfortunately failed to produce a stacktrace. Thus this was quite difficult to track down.

Fixes timholy/Revise.jl#993

CC @aviatesk, @Keno

InteractiveUtils provides a number of utilities for querying and
accessing the contents of modules. Because these modules can gain new
bindings, some callers of InteractiveUtils functions produce warnings

    WARNING: Detected access to binding ... prior to its definition world.

One dramatic example occurs with the sequence

    using OptimizationProblems: OptimizationProblems
    using OptimizationProblems.ADNLPProblems
    using ADNLPModels: ADNLPModel

when running with Revise. ADNLPProblems loads new problems via Requires,
and starting with v3.13 Revise queries `InteractiveUtils.subtypes` to
cache dependent fieldtypes. This triggers the warning, and because it
runs in a separate task, the `--depwarn=error` trick unfortunately
failed to produce a stacktrace. Thus this was quite difficult to track
down.

Fixes timholy/Revise.jl#993
@timholy timholy added backport 1.12 Change should be backported to release-1.12 backport 1.13 Change should be backported to release-1.13 labels Jan 19, 2026
@timholy
Copy link
Member Author

timholy commented Jan 19, 2026

The main alternative to this approach might be to give names the option to cut off names at the current task's world age.

@DilumAluthge DilumAluthge mentioned this pull request Jan 19, 2026
40 tasks
@topolarity topolarity requested a review from Keno January 20, 2026 20:53
@Keno
Copy link
Member

Keno commented Jan 20, 2026

I think it'd prefer if all of these gained a world kwarg (ok to default to latest) so that the query happens consistently in one particular world (possibly captured on function entry).

@KristofferC KristofferC mentioned this pull request Jan 26, 2026
43 tasks
@KristofferC KristofferC mentioned this pull request Feb 4, 2026
21 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 1.12 Change should be backported to release-1.12 backport 1.13 Change should be backported to release-1.13

Projects

None yet

Development

Successfully merging this pull request may close these issues.

World age warning when using with numbered prompt.

2 participants