-
Notifications
You must be signed in to change notification settings - Fork 771
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
Symbol renaming not working in open file mode #1300
Comments
Your template is missing trace logs; can you please provide them? https://github.com/microsoft/pylance-release/blob/main/TROUBLESHOOTING.md#filing-an-issue You need to enable a specific setting to get trace logs, and if that's enabled there will definitely be lots of info. |
@jakebailey Thanks. I've added the trace logs in the python language panel above. All the logs were generated before renaming. No additional output was produced when I clicked "Rename Symbol" and tried to rename the variable. Can you please see what's going wrong? |
Thanks. I'm a bit concerned by this: "/Users/yuan/tests/issue/bin/python3" What is your folder structure? Are you opening the virtual environment itself? I don't think your workspace should be containing the python binary itself, as that confuses what is actually the interpreter versus your user code. |
@jakebailey Thanks for reminding me. I'm new to However, the problem still exists when editing a python script with no folders or workspaces open (using file>open to open a python script, with system-wide interpreter). I've updated my issue with the corresponding info. |
If you're using open file mode, then this is likely similar to #1301; the open folder / workspace modes are pretty well tested, but opening single files is less so. |
I have the exact same problem, symbol renaming only works in open folder mode. I've tried to investigate the issue myself with no result (no pun intended). |
Just wanted to chime in here that it is still a problem for me to rename symbols on a ** standalone ** (i.e. not in a virtual env) python file that is ** already saved **. VSCode still returns "No Result" with no renaming actually performed if I tried to rename any symbol. I could not get trace log even after setting python.analysis.logLevel to 'Trace'. My environment |
This will be fixed in the next release. When in "single-file mode", the rename will be performed only within the current file. In "workspace mode", the rename will be performed across the workspace. |
fixed in 2021.8.0 release. |
I'am editing a python script with no folders or workspaces open (using file>open to open a python script, with system-wide interpreter).
When renaming variable
foo
in the following code, the messageNo result.
pops up.Note that symbol renaming works fine if I'm editing a python script in a workspace, either with the system-wide interpreter or a
virtualenv
interpreter.The output generated in python language server panel is shown below.
The text was updated successfully, but these errors were encountered: