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

Class rename also updates method sends (jadeite issue #513) #509

Closed
LisaAlmarode opened this issue Sep 24, 2019 · 2 comments
Closed

Class rename also updates method sends (jadeite issue #513) #509

LisaAlmarode opened this issue Sep 24, 2019 · 2 comments
Assignees

Comments

@LisaAlmarode
Copy link
Member

This issue reported on Jadeite, but due to underlying Rowan functionality; cf GemTalk/Jadeite#513

If you have a method send within a method that is the same as the class name, the method name gets updated.

The class is named RenameTest.
instance methods:

RenameTest
^self class
test
^self RenameTest

When I renamed RenameTest to NewName,
the RenameTest method was unchanged.
the test method was updated:

^self NewName

which will fail since there's no method NewName.

@dalehenrich
Copy link
Member

@LisaAlmarode, I'm afraid that @ericwinger is mistaken in thinking that Rowan is making changes to methods. If you look at RowanClassService >> renameClass:to:, you'll see that it is the RowanClassService code that is doing a replaceSubString:in:with: and then recompiling the method ... so this is Jadeite code written by @ericwinger that is incorrectly renaming a selector instead of a class ... Rowan is certainly recompiling these methods but the (incorrect) new source is generated by the RowanClassService code

@ericwinger
Copy link
Member

Yes, @dalehenrich is correct. I made a mistake and have made an initial improvement in the commit referenced in this commit GemTalk/Jadeite#513 (comment)

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