pharo icon indicating copy to clipboard operation
pharo copied to clipboard

Classes and methods unknown to spotter after removal and file-in

Open riuttner opened this issue 1 year ago • 1 comments
trafficstars

Bug description If I file out a class, remove it from image, and file it again, neither the class nor its methods are found via spotter or class references / method implementors. If a method name is unique in system, it is not know any more at all. If other implementors of the same selector exist, at least they are still found. Occurs in latest P13 as well as in stable P12.

To Reproduce

  1. Create a new package for this test. I did not test if the bug still exists for a package containing other classes.
  2. Create a new class (e.g. SomethingSimple) along with at least one inst var, ideally with a name where no implementors yet exist in the whole image (e.g. #zyxw).
  3. Create standard accessor methods for this class.
  4. File-out the class. (Class format used by Pharo for file-out is old-style, non-fluid.)
  5. Remove the created class from the package.
  6. Save and close the image. (Bug also appears without step 6 for methods, but not always for classes)
  7. Drag the fileout file to the empty package. Choose "Changelist browser", press "select all" and "file in". (BTW: Not choosing any file-in option and pressing "cancel" here leads to a DNU.)
  8. Now try to find the recreated class or any of the methods via spotter - will not work. Even writing the selector symbol to a playground and executing implementor keyboard shortcut answers "no implementors".

Expected behavior As the class and the methods are there, they should be found by the development tools.

Version information:

  • OS: Windows
  • Version: 10
  • Pharo Version 12 and 13

Expected development cost Hard to tell, but it looks like an issue of internal caching. At least it should be easy to reproduce.

riuttner avatar Jul 23 '24 14:07 riuttner

Thanks for opening your first issue! Please check the CONTRIBUTING documents for some tips about which information should be provided. You can find information of how to do a Pull Request here: https://github.com/pharo-project/pharo/wiki/Contribute-a-fix-to-Pharo

GitHub
Pharo is a dynamic reflective pure object-oriented language supporting live programming inspired by Smalltalk. - pharo-project/pharo

welcome[bot] avatar Jul 23 '24 14:07 welcome[bot]

This should be fixed by https://github.com/pharo-project/pharo/pull/18074

MarcusDenker avatar Apr 03 '25 11:04 MarcusDenker