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

find symbol gets confused after rename file or dir #91

Closed
benedekfazekas opened this issue Jun 27, 2015 · 6 comments
Closed

find symbol gets confused after rename file or dir #91

benedekfazekas opened this issue Jun 27, 2015 · 6 comments

Comments

@benedekfazekas
Copy link
Member

if in namespace A i define a symbol and refer and use it in namespace B find usages returns 2 occurrences one for the definition of the symbol and one for the usage. If i rename namespace A (or the directory it lives in) find usages only returns one of the occurrences depending on where you call it from: only returns the definition of the symbol if called from renamed namespace A and only returns the usage if you call it from namespace B

@expez
Copy link
Member

expez commented Jul 4, 2015

Didn't you fix this the other day by rebuilding the ast in more places?

@benedekfazekas
Copy link
Member Author

good question. will retest

@benedekfazekas
Copy link
Member Author

still can reproduce

@benedekfazekas
Copy link
Member Author

this seems to be the core of the problem:

after renaming energy-pricing.greeter => energy-pricing.newgreeter

(ns-resolve (find-ns 'energy-pricing.dependent) 'greet)
;;=> #'energy-pricing.greeter/greet

it should return:

;;=> #'energy-pricing.newgreeter/greet

@expez
Copy link
Member

expez commented Oct 4, 2015

It's temping to call cider-refresh after this op, then. The only caveat is that I've experienced tools.namespace getting confused when reloading files that have been moved. I'm not sure this is still an issue, but perhaps it would be better, although slower, to also a load the file when we're visiting to fix the indentation of the ns-form.

@benedekfazekas
Copy link
Member Author

fixed via 9bc3914

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

2 participants