Skip to content

docs: fix-up world-age handling for META access#57349

Merged
topolarity merged 2 commits intoJuliaLang:masterfrom
topolarity:ct/silence-base-worldage
Feb 11, 2025
Merged

docs: fix-up world-age handling for META access#57349
topolarity merged 2 commits intoJuliaLang:masterfrom
topolarity:ct/silence-base-worldage

Conversation

@topolarity
Copy link
Copy Markdown
Member

This should be enough to get rid of the 3 lingering warnings in our main test suite.

@topolarity topolarity requested a review from Keno February 10, 2025 21:08
This improves the world-age handling for Base.Docs slightly. It had a
corner case where it could fail to init the META dictionary if the META
binding was deleted in a later world, and fixes a missing `invokelatest`
for `doc!`.
@topolarity topolarity force-pushed the ct/silence-base-worldage branch from 3488f4b to 5ff7b47 Compare February 10, 2025 23:33
@topolarity topolarity merged commit 751a0d7 into JuliaLang:master Feb 11, 2025
@topolarity topolarity deleted the ct/silence-base-worldage branch February 11, 2025 00:57
@KristofferC KristofferC added the backport 1.12 Change should be backported to release-1.12 label Feb 11, 2025
KristofferC pushed a commit that referenced this pull request Feb 11, 2025
This should be enough to get rid of the 3 lingering warnings in our main
test suite.

(cherry picked from commit 751a0d7)
@KristofferC KristofferC mentioned this pull request Feb 11, 2025
32 tasks
KristofferC added a commit that referenced this pull request Feb 13, 2025
Backported PRs:
- [x] #57142 <!-- Add reference to time_ns in time -->
- [x] #57241 <!-- Handle `waitpid` race condition when `SIGCHLD` is set
to `SIG_IGN` -->
- [x] #57249 <!-- restore non-freebsd-unix fix for profiling -->
- [x] #57211 <!-- Ensure read/readavailable for BufferStream are
threadsafe -->
- [x] #57262 <!-- edit NEWS for v1.12 -->
- [x] #57226 <!-- cfunction: reimplement, as originally planned, for
reliable performance -->
- [x] #57253 <!-- bpart: Fully switch to partitioned semantics -->
- [x] #57273 <!-- fix "Right arrow autocompletes at line end"
implementation -->
- [x] #57280 <!-- dep: Update JuliaSyntax -->
- [x] #57229 <!-- staticdata: Close data race after backedge insertion
-->
- [x] #57298 <!-- Updating binding version to fix MMTk CI -->
- [x] #57248 <!-- improve concurrency safety for `Compiler.finish!` -->
- [x] #57312 <!-- Profile.print: de-focus sleeping frames as gray -->
- [x] #57289 <!-- Make `OncePerX` subtype `Function` -->
- [x] #57310 <!-- Make ptls allocations at least 128 byte aligned -->
- [x] #57311 <!-- Add a warning for auto-import of types -->
- [x] #57338 <!-- fix typo in Float32 random number generation -->
- [x] #57293 <!-- Fix getfield_tfunc when order or boundscheck is Vararg
-->
- [x] #57349 <!-- docs: fix-up world-age handling for META access -->
- [x] #57344 <!-- Add missing type asserts when taking the queue out of
the task struct -->
- [x] #57348 <!-- 🤖 [master] Bump the SparseArrays stdlib from 212981b
to 72c7cac -->
- [x] #55040 <!-- Allow macrocall as function sig -->
- [x] #57299 <!-- Add missing latestworld after parameterized type alias
-->
@KristofferC KristofferC removed the backport 1.12 Change should be backported to release-1.12 label Feb 13, 2025
asinghvi17 added a commit to asinghvi17/DocStringExtensions.jl that referenced this pull request Apr 9, 2026
…mpatibility

Julia 1.12 introduced binding partitions (JuliaLang/julia#57133, #57150,
#57253) which enforce strict world-age semantics for global bindings.
When DocStringExtensions performs method resolution during docstring
formatting, the calls happen in a stale world age and fail to find
matching methods. This is the same pattern that Julia's own doc system
(JuliaLang/julia#57349) and Documenter.jl (JuliaDocs/Documenter.jl#2624)
adopted for 1.12 compatibility.

Changes:
- Wrap all Docs.resolve() calls with Base.invokelatest
- Wrap methods() calls in getmethods!() with Base.invokelatest
- Wrap Base.return_types() call with Base.invokelatest
- Add nothing guard on findfirst/findlast result in TypedMethodSignatures
  to prevent ArgumentError when no matching tuple is found
- Add world-age safety tests exercising all abbreviation types via
  Base.invokelatest to simulate the stale world-age scenario

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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