microsoft / pylance-release

Documentation and issues for Pylance
Creative Commons Attribution 4.0 International
1.68k stars 771 forks source link

move file refactoring doesn't work with `network folder` #5406

Closed heejaechang closed 5 months ago

heejaechang commented 5 months ago
  1. clone https://github.com/microsoft/pylance-release/tree/main/testing/single
  2. create a network folder NetworkFolder to the single folder
  3. open //NetworkFolder/single in vscode
  4. follow instructions on https://github.com/microsoft/pylance-release/blob/main/testing/single/src/moveFile.py

expected: file is moved and all references to it is updated.

actual: nothing happens.

... it also repro with 2023.12.1 so, not a regression. but it works fine with regular folder.

debonte commented 5 months ago

This looks like a duplicate of #5399 which I have a fix for. But I'm confused about why #5399 says it's a regression from 2023.12.1 and this one says it's not a regression.

heejaechang commented 5 months ago

no idea. path given by move file from vsocde and move symbol from us might use different path casing? since move file, path comes from vscode, and move symbol uses path we have in program (decl)? and path in decl could either from LSP request or our file system

debonte commented 5 months ago

Oh, I missed the "move file" vs. "move symbol" difference. This is not a dupe. The behavior is better with my fix for #5399, in that the rename preview is available, and when the rename is applied the import in renameByModule.py gets updated, but moveFile.py is not actually moved. We show "Moving moveFile.py" in the status bar with spinning arrows for about a minute and then this message box appears:

image

heejaechang commented 5 months ago

it works as expected with @debonte 's change. I am not getting the permission issue. his share might not have full permission such as creating a file but just have changing content.