-
Notifications
You must be signed in to change notification settings - Fork 768
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
Renaming packages/folders does not work #1175
Comments
Also tried doing it fully in Windows, without going through WSL, and I get a very lengthy error with Jedi:
The lines 211 and 272 loop afterwards for hundreds of lines. |
Tried in a completely clean environment with:
And I still get the Second test setup: System Info
A/B Experiments
|
@mrtolkien I will move this request to But for Use this setting in your user settings to get verbose logs from the language servers when using either Pylance or JediLSP. You should see logs in Output > Python Language Server panel.
|
Here is the feedback with JediLSP. Settings:
Error:
|
|
@mrtolkien I have file a bug on Leaving this open for continue |
Pylance doesn't currently support this functionality. I'll mark this as an enhancement and leave it open for upvotes. |
I see, I thought that might have been the case. Is it due to the complexity of the feature or is it due to a lack of interest? It seems like a pretty crucial feature to me as changing a folder/subpackage name for more clarity can be very useful, but can also have ripples in hundreds of files in big projects and is not really doable by hand. I would have loved to contribute but unfortunately |
I'm actually going to leave this open because it'll be a feature we want to look at. |
Are there any news on this? My installation (latest Pylance) on Windows 10, does not reflect folder renaming events. PyLance:
|
As for the original issue, we're working on a number of module related refactorings. Your issue sounds different, as you aren't trying to use VS Code's rename/refactor system to do that. If you are renaming things in the workspace, we should be detecting that the imports are now unresolved. I would file a new issue. |
This issue has been fixed in version 2022.3.4, which we've just released. You can find the changelog here: CHANGELOG.md |
Issue Type: Bug
Renaming packages, both from the symbol or from the folder name, doesn’t work:
Test setup:
This import syntax is right and works properly, and running
python PACKAGE/__init__.py
orimport PACKAGE
works.But trying to refactor
SUBPACKAGE
inPACKAGE/__init__.py
does not work:Refactor failed. Unknown Change [<FrameSummary file /home/tolki/.vscode-server/extensions/ms-python.python-2021.4.765268190/pythonFiles/refactor.py, line 380 in watch>, <FrameSummary file /home/tolki/.vscode-server/extensions/ms-python.python-2021.4.765268190/pythonFiles/refactor.py, line 346 in _process_request>, <FrameSummary file /home/tolki/.vscode-server/extensions/ms-python.python-2021.4.765268190/pythonFiles/refactor.py, line 259 in _rename>, <FrameSummary file /home/tolki/.vscode-server/extensions/ms-python.python-2021.4.765268190/pythonFiles/refactor.py, line 128 in refactor>, <FrameSummary file /home/tolki/.vscode-server/extensions/ms-python.python-2021.4.765268190/pythonFiles/refactor.py, line 163 in onRefactor>]
No result
VS Code version: Code 1.55.2 (3c4e3df9e89829dce27b7b5c24508306b151f30d, 2021-04-13T09:35:57.887Z)
OS version: Windows_NT x64 10.0.19042
Remote OS version: Linux x64 5.4.72-microsoft-standard-WSL2
System Info
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Extensions (13)
A/B Experiments
The text was updated successfully, but these errors were encountered: