-
Notifications
You must be signed in to change notification settings - Fork 5
Add verbose modes #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
67e49a1
to
9117c7b
Compare
src/PkgCacheInspector.jl
Outdated
function show_verbose_external_methods(io::IO, info::PkgCacheInfo) | ||
# Separate truly external methods from internal ones | ||
truly_external_methods = [] | ||
internal_method_specializations = [] | ||
|
||
for ci in info.external_methods | ||
if isa(ci, Core.CodeInstance) && isa(ci.def, Core.MethodInstance) | ||
mi = ci.def | ||
if isa(mi.def, Method) | ||
method = mi.def | ||
# Check if this method is truly external (not from package's own modules) | ||
if method.module ∉ info.modules | ||
push!(truly_external_methods, (ci, method, mi)) | ||
else | ||
push!(internal_method_specializations, (ci, method, mi)) | ||
end | ||
end | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure if I just misunderstood what info.external_methods
is but it seems some are internal? Note the filtering
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this means the counts are wrong / misleading too, so this should probably be fixed in the info constructor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may also include methods that were defined in this module that extend functions owned by other packages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely sure. If you have a chance to play with this PR and if it's making sense to you I can continue to work on it. Otherwise this is a bit of a Claude expedition that I've not spent time to fully understand.
Totally fair if it's not appealing to spend your time on in this state.
9117c7b
to
a59a8bc
Compare
a59a8bc
to
41cf976
Compare
41cf976
to
74051cd
Compare
74051cd
to
7aa42e4
Compare
Do you think this might be better as a filter rather than a printer? It seems you can do more if you pass back the subset of methods rather than just printing them. |
I think there's uses for both. With "verbose" stuff it's kind of useful to just dump things into a text file etc. |
7aa42e4
to
00998ee
Compare
On top of #36
i.e.