You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Find All References does not work on function definition #810
VS Code version: 1.20.0
Python Extension version: 2018.1.0
Python Version: 3.6, 64-bit
OS and version: Windows 10
Actual behavior
In the project, if you right click on the function definition for "configure_params" in the contrived.py file, and click "Find All References", it will not find any references outside of the current file. However, if you click "Find All References" in the prove_its_broken.py, it will find two references - one from prove_its_broken.py and the other from contrived.py.
Expected behavior
I would expect ALL references to be found when you click find all references on the function header.
Steps to reproduce:
Git clone my project from the link I provided
Right click on "configure_params" in the contrived.py file, and click "Find All References"
I get 'can't import contrived' from pylint in the cloned solution which might explain why references are not found. If I place files one next to another, references are found.
Mikhail Arkhipov (@MikhailArkhipov) The docs say that I should be able to set the PYTHONPATH in the .env file with a relative path. I am using Pylint in my solution as well and I get no such error - the imports are resolved just fine. You can also explicitly set PYTHONPATH in Powershell using $env:PYTHONPATH="whatever".
Even if there is an import error, which in my solution there isn't, there is still some sort of bug here.
Don Jayamanne (@DonJayamanne) That did not solve the issue for me. I made the change you suggested in the .env file, closed VS Code, reopened, and click find all references. I get the same result - only a single reference to the function definition is found. Thanks for looking into this issue, which I'm sure seems minor.
Please could you go into the Core/prove_its_broken.py file and then right click on the configure_params method and select the menu option Go To Definition.
Please check whether the above works.
If this works, then its most likely a bug in Jedi.
Activity
MikhailArkhipov commentedon Feb 17, 2018
I get 'can't import contrived' from pylint in the cloned solution which might explain why references are not found. If I place files one next to another, references are found.
KyleMoser commentedon Feb 19, 2018
Mikhail Arkhipov (@MikhailArkhipov) The docs say that I should be able to set the PYTHONPATH in the .env file with a relative path. I am using Pylint in my solution as well and I get no such error - the imports are resolved just fine. You can also explicitly set PYTHONPATH in Powershell using $env:PYTHONPATH="whatever".
Even if there is an import error, which in my solution there isn't, there is still some sort of bug here.
DonJayamanne commentedon Feb 19, 2018
Please change the entry as follows:
PYTHONPATH="./PyCommons"Please confirm that fixes the issue.
Accidentally closed the issue.
KyleMoser commentedon Feb 19, 2018
Don Jayamanne (@DonJayamanne) That did not solve the issue for me. I made the change you suggested in the .env file, closed VS Code, reopened, and click find all references. I get the same result - only a single reference to the function definition is found. Thanks for looking into this issue, which I'm sure seems minor.
DonJayamanne commentedon Feb 19, 2018
Please could you go into the
Core/prove_its_broken.pyfile and then right click on theconfigure_paramsmethod and select the menu optionGo To Definition.Please check whether the above works.
If this works, then its most likely a bug in Jedi.
KyleMoser commentedon Feb 20, 2018
Don Jayamanne (@DonJayamanne) Yes, go to definition is working fine. I will open a bug report on the Jedi repo and see what they think. Thanks!