Skip to content
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

Renaming a class when the message browser is open breaks #4268

Closed
Ducasse opened this issue Aug 10, 2019 · 3 comments
Closed

Renaming a class when the message browser is open breaks #4268

Ducasse opened this issue Aug 10, 2019 · 3 comments

Comments

@Ducasse
Copy link
Member

Ducasse commented Aug 10, 2019

handleClassRenamed: anAnnouncement
| items selectedIndex |
items := self messages
collect: [ :rgMethod |
| interestedClassName interestedClass |
interestedClassName := anAnnouncement oldName.
interestedClass := anAnnouncement classRenamed.
rgMethod isMetaSide
^^^^^^^^^^^^^^^^^^^^^^^^^
ifTrue: [ interestedClassName := interestedClassName , ' class'.
interestedClass := interestedClass classSide ].
rgMethod parentName = interestedClassName
ifTrue: [ (interestedClass >> rgMethod selector) asFullRingDefinition ]
ifFalse: [ rgMethod ] ].
selectedIndex := messageList selectedIndex.
self messages: items.
self setSelectedIndex: selectedIndex

@Ducasse
Copy link
Member Author

Ducasse commented Aug 10, 2019

This is because a ring method does not have the same api than a compile method and that isMetaSide is only defined on RG.

Solution should probably be

  • check compiledMethod and Ring Method
  • check what is the status of Ring
  • make sure that both are compatible

@hilaire
Copy link

hilaire commented Apr 9, 2020

Confirmed in release Pharo8.0-SNAPSHOT-64bit-278304f.
No idea in which state it lets the code.

@MarcusDenker
Copy link
Member

Fixed in the spec repository. Will be be merged in the image withe the next merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants