Julia: Visibility of `using`ed names in a module

Created on 4 Jul 2020  路  1Comment  路  Source: JuliaLang/julia

julia> module A
       module B
       f(x) = 1
       end
       using .B: f
       end
Main.A

julia> names(A; all=true, imported=true)
6-element Array{Symbol,1}:
 Symbol("#eval")
 Symbol("#include")
 :A
 :B
 :eval
 :include

Is there a way to discover ~what f refers to inside A~ that A also has a meaning for f? If you change using .B: f to import .B: f, then it's visible.

This appears to be related to a significant performance issue for SymbolServer (which is used by vscode's languageserver indexing machinery), see https://github.com/julia-vscode/SymbolServer.jl/pull/177.

Most helpful comment

>All comments

Was this page helpful?
0 / 5 - 0 ratings

Related issues

StefanKarpinski picture StefanKarpinski  路  145Comments

StefanKarpinski picture StefanKarpinski  路  141Comments

kmsquire picture kmsquire  路  283Comments

JeffBezanson picture JeffBezanson  路  167Comments

StefanKarpinski picture StefanKarpinski  路  138Comments