src/SymbolServer.jl
changed.
Showing 1 of 1 files from the diff.
@@ -1,6 +1,6 @@
Loading
1 | 1 | module SymbolServer |
|
2 | 2 | ||
3 | - | export SymbolServerInstance, getstore |
|
3 | + | export SymbolServerInstance, getstore, get_symbol_server |
|
4 | 4 | ||
5 | 5 | using Serialization, Pkg, SHA |
|
6 | 6 | using Base: UUID, Process |
@@ -202,6 +202,36 @@
Loading
202 | 202 | ||
203 | 203 | const stdlibs = load_core() |
|
204 | 204 | ||
205 | + | ||
206 | + | VersionFloat(v::VersionNumber) = join(split(string(v),'.')[1:2],'.') |
|
207 | + | ||
208 | + | global_env_path = joinpath(homedir(),".julia/environments/v$(VersionFloat(VERSION))") |
|
209 | + | ||
210 | + | """ |
|
211 | + | symbol_server, symbol_extends = get_symbol_server(module_sym::Vector{Symbol}, env_path = global_env_path) |
|
212 | + | symbol_server, symbol_extends = get_symbol_server(module_sym::Symbol) |
|
213 | + | symbol_server, symbol_extends = get_symbol_server(module_sym::Nothing = nothing) |
|
214 | + | ||
215 | + | Get symbols for the given module or current environment |
|
216 | + | """ |
|
217 | + | function get_symbol_server(module_sym::Vector{Symbol}, env_path = global_env_path) |
|
218 | + | # TODO write these to a file |
|
219 | + | printstyled("Getting the symbols. Please wait....", color = :yellow) |
|
220 | + | env = SymbolServer.getenvtree(module_sym) |
|
221 | + | # symbol_server = SymbolServer.symbols(env) |
|
222 | + | symbol_server = getstore(SymbolServerInstance(env_path), env_path)[2] |
|
223 | + | symbol_extends = SymbolServer.collect_extended_methods(env) |
|
224 | + | return symbol_server, symbol_extends |
|
225 | + | end |
|
226 | + | ||
227 | + | get_symbol_server(module_sym::Symbol) = get_symbol_server([module_sym]) |
|
228 | + | ||
229 | + | function get_symbol_server(module_sym::Nothing = nothing) |
|
230 | + | symbol_server = SymbolServer.stdlibs |
|
231 | + | symbol_extends = SymbolServer.collect_extended_methods(SymbolServer.stdlibs) |
|
232 | + | return symbol_server, symbol_extends |
|
233 | + | end |
|
234 | + | ||
205 | 235 | function _precompile_() |
|
206 | 236 | ccall(:jl_generating_output, Cint, ()) == 1 || return nothing |
|
207 | 237 | Base.precompile(Tuple{Type{SymbolServer.DataTypeStore},SymbolServer.FakeTypeName,SymbolServer.FakeTypeName,Array{Any,1},Array{Any,1},Array{Symbol,1},Array{Any,1},String,Bool}) |
Files | Coverage |
---|---|
src | 70.16% |
Project Totals (5 files) | 70.16% |
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file.
The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files.
The size and color of each slice is representing the number of statements and the coverage, respectively.