Showing 1 of 1 files from the diff.

@@ -123,7 +123,7 @@
Loading
123 123
    Method[x[3]::Method for x in ms]
124 124
end
125 125
126 -
function cache_methods(@nospecialize(f), env)
126 +
function cache_methods(@nospecialize(f), name, env)
127 127
    if isa(f, Core.Builtin)
128 128
        return MethodStore[]
129 129
    end
@@ -166,17 +166,17 @@
Loading
166 166
        end
167 167
    end
168 168
169 -
    func_vr = VarRef(VarRef(parentmodule(f)), nameof(f))
169 +
    func_vr = VarRef(VarRef(parentmodule(f)), name)
170 170
    for i = 1:length(ms)
171 171
        mvr = VarRef(ms[i][1])
172 172
        modstore = _lookup(mvr, env)
173 173
        if modstore !== nothing
174 -
            if !haskey(modstore, ms[i][2].name)
175 -
                modstore[ms[i][2].name] = FunctionStore(VarRef(mvr, nameof(f)), MethodStore[ms[i][2]], "", func_vr, false)
176 -
            elseif !(modstore[ms[i][2].name] isa DataTypeStore || modstore[ms[i][2].name] isa FunctionStore)
177 -
                modstore[ms[i][2].name] = FunctionStore(VarRef(mvr, nameof(f)), MethodStore[ms[i][2]], "", func_vr, false)
174 +
            if !haskey(modstore, name)
175 +
                modstore[name] = FunctionStore(VarRef(mvr, name), MethodStore[ms[i][2]], "", func_vr, false)
176 +
            elseif !(modstore[name] isa DataTypeStore || modstore[name] isa FunctionStore)
177 +
                modstore[name] = FunctionStore(VarRef(mvr, name), MethodStore[ms[i][2]], "", func_vr, false)
178 178
            else
179 -
                push!(modstore[ms[i][2].name].methods, ms[i][2])
179 +
                push!(modstore[name].methods, ms[i][2])
180 180
            end
181 181
        else
182 182
        end
@@ -341,11 +341,11 @@
Loading
341 341
            if Base.unwrap_unionall(x) isa DataType # Unions aren't handled here.
342 342
                if parentmodule((x)) === m
343 343
                    cache[s] = DataTypeStore(x, m, s in getnames(m))
344 -
                    cache_methods(x, env)
344 +
                    cache_methods(x, s, env)
345 345
                elseif nameof(x) !== s
346 346
                    # This needs some finessing.
347 347
                    cache[s] = DataTypeStore(x, m, s in getnames(m))
348 -
                    cache_methods(x, env)
348 +
                    cache_methods(x, s, env)
349 349
                else
350 350
                    # These are imported variables that are reexported.
351 351
                    cache[s] = VarRef(VarRef(parentmodule(x)), nameof(x))
@@ -353,7 +353,7 @@
Loading
353 353
            elseif x isa Function
354 354
                if parentmodule(x) === m || (x isa Core.IntrinsicFunction && m === Core.Intrinsics)
355 355
                    cache[s] = FunctionStore(x, m, s in getnames(m))
356 -
                    cache_methods(x, env)
356 +
                    cache_methods(x, s, env)
357 357
                elseif !haskey(cache, s)
358 358
                    # This will be replaced at a later point by a FunctionStore if methods for `x` are defined within `m`.
359 359
                    if x isa Core.IntrinsicFunction
@@ -420,7 +420,7 @@
Loading
420 420
    let f = cache[:Base][:include]
421 421
        cache[:Base][:include] = FunctionStore(f.name, cache[:Base][:MainInclude][:include].methods, f.doc, f.extends, true)
422 422
    end
423 -
    # append!(cache[:Base][:include].methods, cache_methods(Base.MainInclude.include, cache))
423 +
424 424
    cache[:Base][Symbol("@.")] = cache[:Base][Symbol("@__dot__")]
425 425
    cache[:Core][:Main] = GenericStore(VarRef(nothing, :Main), FakeTypeName(Module), _doc(Main), true)
426 426
    # Add built-ins
@@ -487,10 +487,10 @@
Loading
487 487
        true)
488 488
    push!(cache[:Core].exportednames, :ccall)
489 489
    cache[:Core][Symbol("@__doc__")] = FunctionStore(VarRef(VarRef(Core), Symbol("@__doc__")), [], "", VarRef(VarRef(Core), Symbol("@__doc__")), true)
490 -
    cache_methods(getfield(Core, Symbol("@__doc__")), cache)
490 +
    cache_methods(getfield(Core, Symbol("@__doc__")), Symbol("@__doc__"), cache)
491 491
    # Accounts for the dd situation where Base.rand only has methods from Random which doesn't appear to be explicitly used.
492 492
    # append!(cache[:Base][:rand].methods, cache_methods(Base.rand, cache))
493 -
    for m in cache_methods(Base.rand, cache)
493 +
    for m in cache_methods(Base.rand, :rand, cache)
494 494
        push!(cache[:Base][:rand].methods, m[2])
495 495
    end
496 496
@@ -520,10 +520,17 @@
Loading
520 520
521 521
getallns() = let allns = Base.IdSet{Symbol}(); SymbolServer.oneverything((m, s, x, state)->push!(allns, s)); allns end
522 522
523 +
"""
524 +
    split_module_names(m::Module, allns)
525 +
526 +
Return two lists of names accessible from calling getfield(m, somename)`. The first
527 +
contains those symbols returned by `Base.names(m, all = true)`. The second contains
528 +
all others, including imported symbols and those introduced by the `using` of modules.
529 +
"""
523 530
function split_module_names(m::Module, allns)
524 531
    internal_names = getnames(m)
525 532
    availablenames = Set{Symbol}([s for s in allns if isdefined(m, s)])
526 -
    usinged_names = Set{Symbol}()
533 +
    # usinged_names = Set{Symbol}()
527 534
528 535
    for n in availablenames
529 536
        if (n in internal_names)
@@ -534,7 +541,8 @@
Loading
534 541
    for u in get_used_modules(m, allms)
535 542
        for n in unsorted_names(u)
536 543
            if n in availablenames
537 -
                push!(usinged_names, pop!(availablenames, n))
544 +
                pop!(availablenames, n)
545 +
                # push!(usinged_names, pop!(availablenames, n))
538 546
            end
539 547
        end
540 548
    end
Files Coverage
src 76.52%
Project Totals (5 files) 76.52%
codecov-umbrella
Build #154639400 -
unittests
codecov-umbrella
Build #154639400 -
unittests
codecov-umbrella
Build #154639400 -
unittests
codecov-umbrella
Build #154639400 -
unittests
codecov-umbrella
Build #154639400 -
unittests
codecov-umbrella
Build #154639400 -
unittests
codecov-umbrella
Build #154639400 -
unittests
codecov-umbrella
Build #154639400 -
unittests
codecov-umbrella
Build #154639400 -
unittests
codecov-umbrella
Build #154639400 -
unittests
codecov-umbrella
Build #154639400 -
unittests
codecov-umbrella
Build #154639400 -
unittests
codecov-umbrella
Build #154639400 -
unittests
codecov-umbrella
Build #154639400 -
unittests
codecov-umbrella
Build #154639400 -
unittests
codecov-umbrella
Build #154639400 -
unittests
codecov-umbrella
Build #154639400 -
unittests
codecov-umbrella
Build #154639400 -
unittests
codecov-umbrella
Build #154639400 -
unittests
codecov-umbrella
Build #154639400 -
unittests
codecov-umbrella
Build #154639400 -
unittests
codecov-umbrella
Build #154639400 -
unittests
codecov-umbrella
Build #154639400 -
unittests

No yaml found.

Create your codecov.yml to customize your Codecov experience

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.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading