Support dot imports#68
Conversation
|
@rogpeppe any updates on it? I have tested it for a while now and I haven't found any problems. |
|
It doesn't look as if it will work properly to me. If issue #19 is to be fixed, I think it needs to be done at a lower level. Consider this example: I haven't tried it, but I strongly suspect that if used the code in this PR and tried jumping to the definition of A on the To do it right, I think the fix needs to go into the By the way, IMHO no-one should use dot imports. You never need them. That's the main reason why I haven't spent more time trying to fix the issue, although if someone does present a decent PR that properly fixes the issue (and has some decent tests, ideally), I'd be happy to accept it. |
|
@rogpeppe Yes, you're right. I mistakenly thought that only dot imports in current file need to be processed, and I neglected the case you have given. Some projects that I'm working on used dot imports to help their refactoring. Some developers want to move some types and functions out of a package into a new one, without changing too much existing codes. So I think maybe dot import is useful in some situations. Thank you. I will try to fix this problem. |
I'd suggest using gofmt -r 'MovedFunction -> externalPackage.MovedFunction' -w . |
Solution for issue #19