caseykneale / Sherlock.jl

A high functioning package detective.
MIT License
58 stars 1 forks source link

Error with UnionAll type #29

Open baggepinnen opened 3 years ago

baggepinnen commented 3 years ago

When analyzing a package containing

const NativeChannel{QT} = Channel{QT}

I got the following error

ERROR: LoadError: KeyError: key Symbol("Channel{QT} where QT") not found
Stacktrace:
 [1] getindex(h::Dict{Symbol, Int64}, key::Symbol)
   @ Base ./dict.jl:482
 [2] typetype_edges(sher::Detective)
   @ Sherlock ~/.julia/packages/Sherlock/VE0HI/src/Utilities.jl:49
 [3] top-level scope
   @ ~/Juliet/Juliet_misc/sherlock/sherlock.jl:11
in expression starting at /home/fredrikb/Juliet/Juliet_misc/sherlock/sherlock.jl:11
caseykneale commented 3 years ago

In fully honesty, I don't think this tool was tested with UnionAll types. That said - I think it could be adapted to incorporate them. I'm a little rusty on this side of Julia having not touched this project for quite a while. When I get some time (might be a while), I'll have a go at this.

In the worst case scenario (that I can't incorporate it), I can at least get some error checking in that dictionary lookup. I forgot how quickly I made this... Anyways thank you and I will address this when I get time. Unfortunately time is a somewhat scarce resource right now.

Quick question: Are you running from Master or from the latest release?

baggepinnen commented 3 years ago

No worries! I was running from latest release but I've just tried on master and it looks the same. I also cannot run sherlock_UI() due to something that appears to be a WebIO error, but sherlockplot(d) produces an okay plot :)

caseykneale commented 3 years ago

Oh jeese I bet the electron bindings don't work in Julia anymore or something. That probably needs a second look too.

Wonder if light graphs has better plotting algorithms now. I've been meaning to write one, but - time.

I'll try to squeak some time into this, this weekend. Nothing sadder than a half broken package.

caseykneale commented 2 years ago

@baggepinnen - someone told me that Interact.jl is now unmaintained and dead (second hand from it's author). So this project in it's current state - from the GUI perspective - needs a bit of a rewrite.