*If* you can locate one example, you may be able to manually examine the
compiled method itself to see what distinguishes it in terms of the
reference to a missing object. e.g. what's in the literal pool for a method
which references a non-existent class? You could create one such example
explicitly and then use what you  learn from that to track down the real
ones.

VW has a MethodCollector class which allows a variety of selection options
for methods, including an arbitrary block of clode. I don't know if Pharo
has something comparable. Worst case scenario, you use a poor mon's
approach. It is easy enough to enumerate all classes and traverse their
class and instance methods. That would pretty much be what you would want
from a MethodCollector anyway when using an arbitrary block for selection.

VW also has an Undeclared namespace. I know Pharo doesn't have namespaces,
per se, but it may still track undeclared references in some manner.



On Sun, Mar 10, 2024 at 11:04 AM Russ Whaley <whaley.r...@gmail.com> wrote:

> Tim,
> Another anomaly I found with the above, even with my code that does not
> reference the missing classes - but is contained within the same package of
> classes that do reference the missing classes (clear?)... my application
> crashes with an error that the reference could not be found. This may be
> something introduced after build #913 - where I wasn't getting these
> errors... and by build #1258 they appeared (may have also appeared earlier,
> but I don't recall).
>
> I had hoped to use the allReferences you listed above, but I had to run
> through all my classes and methods to find missing classes - the methods
> are highlighted, but lots of methods are highlighted for various reasons.
> When I found the offending methods - I had to "comment out" the references
> to get the method to then save... most of these were maintenance methods
> that are only still around for reference/documentation... I need to find
> another way :)
>
> It sure would be good to be able to see ANY missing references in one call
> so I could run that periodically to keep things clean.
>
> On Sun, Mar 10, 2024 at 8:43 AM Tim Mackinnon <Tim@testit.works> wrote:
>
>> Hi - I was convinced in earlier Pharo’s, if you had a code reference to a
>> non existent class you could find it by searching for references to its
>> symbol name eg #MyMissingClass allReferences (or find references in the
>> UI). This doesn’t seem to work in Pharo 11?  I loaded a package with a
>> missing class, and when running something it complained about the missing
>> class (it was an announcement), but I couldn't find an easy way to find it
>> in my code to correct it? I ended up creating the fake class to then find
>> references to it (as I then had a class), which seems way over the top?
>>
>> I haven't had a chance to try this in Pharo 12, but shouldn't what I have
>> done work? Or is there some new way to do this? I asked on Discord users,
>> but didn't get a reply other than it rang a bell.
>>
>> I know there has been a lot of work in the area of how things are
>> represented and I wonder if something has got broken by mistake?
>>
>> Tim
>>
>
>
> --
> Russ Whaley
> whaley.r...@gmail.com
>

Reply via email to