-
Notifications
You must be signed in to change notification settings - Fork 99
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
Rename is not updating all usages. #222
Comments
package a;
import a.MainClass;
class MainClass {
var main:MainClass;
} EDIT: Find usages works fine. |
Ok, so, the things is, rename renames class and file, but when it proceeds to usages, it checks if references can be resolved, after renaming class, they are no longer valid anymore of course |
So we have to collect all of the references before you allow the rename to proceed. Right? Don't we have to do this anyway, in order to put up the dialog? |
I'm not sure now, I don't get it yet, but it seems like HaxeReferenceExpression, has bindToElement, which create new reference to file/package, not sure about class I think it might be close, basically it changes reference to point to certain file or package, but should it do it for class |
I think Move File functionality may be similar to this, but still I don't really understand how in old version this compiles and works fine, but in new we have to implement it. |
My solution is to check out an old version (eb94f32 is just before we started the ClassHierarchy work), watch it work, then git bisect until I find the checkin that broke it. Takes about 12 builds and I usually have the change in 20 minutes. Then, I inspect the change (git bisect visualize), check out the immediately previous (working) code and make little independent changes until I figure out which one broke things. If git bisect doesn't work for you, then you might have to do some more sleuthing to see if it was ever implemented. |
was reviewing Move functioning on Friday, found that -
unfortunately, it was only fixing part of findUsages returned list... it wasn't fixing "import" statement occurrences. There wasn't any implementation for Move earlier - it was using underlying common implementation of open api. But now, there's a need to fix this! @as3boyan When I look at the diff of the commits you mentioned above... it is not clear how rename/move broke between those 2 commits :( I'll try to figure out either how Move broke? or implement the Move file/package functionality over next 2-3 days. |
I was testing commits before these, this one may be breaking be548c1 It seems like this commit broke If we could build every commit and see when something got broken, that would be awesome. About |
I got
I understand, but I would prefer that common implementation. |
So previous (common) implementation didn't worked for this case? |
@as3boyan Today, I was about to start working on Thanks, |
4b82210 may break |
@as3boyan I see a PR was merged for this. Is this fixed? |
@EBatTiVo It was for |
858ef3a is indeed broke the move file and package because |
But it's different error, and if I revert change in master branch - that doesn't fixes the issue. |
It has to do something with resolving/checking each usage using |
#272 should fix this issue |
Fixed with #272. Closing. |
Class needs to be imported elsewhere. Or just rename without import first.
Anyway, even in this case, plugin should understand that it's the same class, and rename all references.
About Travis CI: it's a great and very interesting opportunity, but currently it spams me with failing cases on each commit in pull request, so I have to disable email notifications.
The text was updated successfully, but these errors were encountered: