Files
Shuhei Kadowaki 7cf0a724ee Reland "Base.Docs: fix Binding constructor for renamed imports" (#61897) (#61903)
The stock `Base.Docs.Binding(m, v)` constructor keeps the local symbol
`v` while normalising the module via `binding_module(m, v)`. For renamed
imports such as `using X: y as z`, this produces a binding to a
non-existent `canonical_owner.z`, so `?` doc lookup fails:

    julia> using Base: isvisible as iv

    help?> iv
      No documentation found.
      Binding `Base.iv` does not exist.

Resolve the alias by walking the binding partition chain: for each
explicit by-name import (`PARTITION_KIND_EXPLICIT` /
`PARTITION_KIND_IMPORTED`), follow the partition's restriction to its
underlying `Core.Binding` and read the canonical `(mod, name)` from its
globalref. Iterate until a non-explicit-import partition is reached,
then defer to `binding_module` for any remaining implicit-import
normalisation.

The iterative walk is needed because neither primitive alone suffices
for chained re-exports: `partition_restriction` only walks one hop
(stopping at the intermediate module for a plain re-export of an
`as`-renamed binding), while `binding_module` walks all hops but drops
the name (losing the canonical symbol when an `as`-rename appears
anywhere in the chain).

The first reland attempt rewrote unconditionally on any explicit by-name
import, which broke the docs build for plain chained re-exports such as
`Libdl.DL_LOAD_PATH` (whose docstring lives one hop upstream of the
local import). See

https://buildkite.com/julialang/julia-master/builds/57392#019e4dd3-f9a5-42dc-984d-374451e1a32b
for the original failure.

Re-lands #61869, originally landed as #55119.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 14:51:17 +09:00
..
2026-02-20 08:53:36 -05:00
2026-04-12 18:07:51 -04:00
2026-05-08 10:40:08 -04:00
2026-03-05 21:38:56 -05:00
2026-04-25 10:40:17 +02:00
2026-05-21 19:23:16 -04:00
2026-01-29 20:10:28 +09:00
2026-03-25 08:52:24 -04:00
2026-04-12 18:07:51 -04:00
2026-04-12 18:07:51 -04:00
2026-02-24 08:27:49 -08:00
2026-04-12 18:07:51 -04:00
2026-03-18 18:38:33 +09:00
2026-01-05 16:45:20 +01:00