pylance-release icon indicating copy to clipboard operation
pylance-release copied to clipboard

`Move symbol to ...` does nothing

Open erikologic opened this issue 1 year ago • 3 comments

Environment data

  • Language Server version: Release: Pylance language server 2023.12 Prerelease: Pylance language server 2024.1.104 (pyright version 1.1.348, commit cfb1de0c)

  • OS and version: Apple M1 Pro / 14.3 (23D56)

  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.9.17 / Pants 2.16.0

  • VSCode version: Version: 1.87.0-insider (Universal) Commit: 2af613979f646fc4dcebfeaedc7d14f138c7b072 Date: 2024-02-01T23:51:48.761Z Electron: 27.2.3 ElectronBuildId: 26495564 Chromium: 118.0.5993.159 Node.js: 18.17.1 V8: 11.8.172.18-electron.0 OS: Darwin arm64 23.3.0

Repro Steps

  1. Call the Quick Fix menu
  2. Use the "Move Symbol to ..." action

Expected behavior

I can choose a target file for the symbol

Actual behavior

Nothing happens

Logs

I have added "python.analysis.logLevel": "Trace" and confirmed it working by e.g. using the "Move symbol to new file" action (which is working fine) and observing a ton of extra logging in "Python Language Server".
Nothing shows up when calling the "Move symbol to ...." action, neither in "Python Language Server" nor in "Python".

Notes

Works on VSC stable: Version: 1.85.2 Commit: 8b3775030ed1a69b13e4f4c628c612102e30a681 Date: 2024-01-18T06:40:11.430Z Electron: 25.9.7 ElectronBuildId: 26354273 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Darwin arm64 23.3.0

Pylance language server 2023.12.1 (pyright a78e2b10)

### Tasks

erikologic avatar Feb 08 '24 15:02 erikologic

Behavior depends on the vscode version. Using Pylance 2024.1.104:

  • 1.86.1: Works
  • 1.87.0-insider: The file picker just flashes (appears and quickly disappears). It's fast enough that I had trouble catching it in a screen recording. In the recording below, it's only visible on the 4th try.

The equivalent refactoring in TypeScript works in 1.87.0-insider though.

movesymbol

debonte avatar Feb 08 '24 17:02 debonte

@heejaechang, how does vscode know to display the file picker for "Move symbol to ..." but not for "Move symbol to new file"?

debonte avatar Feb 08 '24 22:02 debonte

1.86.1: Works 1.87.0-insider: The file picker just flashes (appears and quickly disappears).

@mjbvz, any thoughts on this? Has anything changed in insiders that might have broken this? TypeScript in insiders works fine for me, but it's not clear to me how Pylance could be causing this behavior.

debonte avatar Feb 13 '24 05:02 debonte

This is fixed in the most recent vscode insiders release. I believe it was this issue: https://github.com/microsoft/vscode/issues/205498

Version: 1.87.0-insider (user setup) Commit: 01ce8d869e4220577e194b2dd57bfa12437dfcf5 Date: 2024-02-20T01:53:30.190Z Electron: 27.3.2 ElectronBuildId: 26836302 Chromium: 118.0.5993.159 Node.js: 18.17.1 V8: 11.8.172.18-electron.0 OS: Windows_NT x64 10.0.22631

debonte avatar Feb 20 '24 21:02 debonte