-
-
Notifications
You must be signed in to change notification settings - Fork 511
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 all references does not work on function definition #1047
Comments
Usages has been broken since forever. Sorry for that. I'll try to fix it once the next version is out. But for a good fix we need a good index. Otherwise this is just too slow. So there's a lot of work ahead of me. At least a year, probably. |
Today 5 february, let's start countdown? |
#1059 is the relevant ticket. I'm currently not working a lot on Jedi - I doubt this will happen soon - if ever. This is an enormous amount of work - probably half a year fulltime - that I don't have. I'm not paid. |
That ticket says "the lazy approach is not good enough." Can we expand on "not good enough."? Is there a stopgap that could be off by default but people with small projects could turn it on? Alternatively: could you educate me on any alternatives for "find usages" in python? I'm only aware of https://github.com/microsoft/python-language-server |
The python-language-server is probably your best option, if you don't want to use PyCharm. There's pretty much nothing else. For very very small projects we could probably do it, but as soon as you start to analyze more than 100 files it gets very very slow, I feel like. What is a small project for you? |
@moribellamy Thanks for the hint. I realized that it's probably possible to at least service smaller projects. At the moment the limit is opening 2000 files and parsing 30 files. This should make it so finding references doesn't take longer than a few seconds and mostly works in <1s. The relevant changes are mostly in ed36efa, the full diff is 4cd2b9a..9d7858e. Now since this obviously doesn't fix all cases (I'm looking at people searching usages for Also searching usages for Oh and please test! It's all on master and should be working fine. I'm happy to receive bug reports. |
I was pointed here by the guys who maintain the Microsoft Visual Studio Code Python extension. The issue is that if I click on my function definition and click "Find All References", only the current function is shown; but if I right click the function name somewhere else (e.g. in a different file where it is being called), it successfully finds every reference in the project.
A full description with a project demonstrating the issue is found in the link below.
microsoft/vscode-python#810
The text was updated successfully, but these errors were encountered: