Skip to content

Intellicode breaks Python Rename #84

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

Closed
h-bex opened this issue Apr 7, 2019 · 1 comment
Closed

Intellicode breaks Python Rename #84

h-bex opened this issue Apr 7, 2019 · 1 comment

Comments

@h-bex
Copy link

h-bex commented Apr 7, 2019

Product and Version [VSCode]: 1.33.0
OS Version [Windows]: Windows 10 (Windows_NT x64 10.0.17763)
IntelliCode Extension Version: 1.1.5
Target Platform or Language: Python
** Installed Extensions**: Python 2019.3.6352; Vim 1.3.0; IntelliCode

Steps to Reproduce / Scenario:

  1. First make sure you have a code installation that never has the IntelliCode Extension installed.
  2. Open an empty folder an enter a new python file (see Attachement MyTestFile.py)
  3. Try to rename function function_to_be_renamed to renamed_function (set cursor to function name and press F2 enter new name and press Enter --> Rename works as specified.
  4. Install Intellicode Extension; Reload the folder and press the button Enable it and Reload Window in the dialog IntelliCode Python support requires ...
  5. Do the same steps as in Step 3: --> Nothing happens BUG
  6. Restart VSCode and repeat Step 3: --> Nothing happens BUG
  7. Disable Visual Studio IntelliCode, reload and repeat Step 3: --> Nothing happens BUG
  8. Restart Visual Studio Code and repeat Step 3: --> Nothing happens BUG
  9. Deinstall IntelliCode, restart Visual Studio Code and repeat Step 3: --> Nothing happens BUG
  10. Remove .vscode from home directory; install python extension again and repeat Step 3: --> Nothing happens BUG
  11. Remove directory %APPDATA%\Code and repeat Step 3: --> Rename happens as expected

Conclusion: Something is in %APPDATA%\Code installed with IntelliCode preventing python refactoring working in a correct way.

MyTestFile.py.txt
IntelliCode-Output.txt

@jkeech
Copy link
Contributor

jkeech commented Apr 7, 2019

@h-bex, this looks like a problem with the new Microsoft Python Language Server (which IntelliCode requires). Your steps 7-9 confirm that this behavior exists even if you don't have IntelliCode enabled/installed, but you do have the new Language Server enabled (which is what the "Enable it and Reload Window" prompt does). You should also be able to reproduce this problem without ever installing IntelliCode by changing to the Microsoft language server after installing the Python extension by setting "python.jediEnabled": false. Can you please file an issue on https://github.com/Microsoft/python-language-server for the broken rename/refactor behavior in the new language server?

You can set the setting "python.jediEnabled": true in order to switch back to the Jedi language server instead of the Microsoft language server, although the Microsoft language server team would like to understand and fix this problem in the new language server as well.

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