Skip to content
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

Go to definition needs to be pressed twice #15727

Closed
djplt opened this issue Mar 19, 2021 · 11 comments
Closed

Go to definition needs to be pressed twice #15727

djplt opened this issue Mar 19, 2021 · 11 comments
Assignees
Labels
area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. bug Issue identified by VS Code Team member as probable bug regression Bug didn't exist in a previous release

Comments

@djplt
Copy link

djplt commented Mar 19, 2021

Go to definition on an object
Get the message "Definition of xx" could not be found
Go to definition again and it works

This seems to occur at the start of opening a workspace/folder and occurs a short time after.

Using the previous python-vscode version of 2021.2.636928669 makes the issue go away.

Environment data

  • VS Code version: 1.54.3
  • Extension version (available under the Extensions sidebar): 2021.3.658691958
  • "git bisect" showed the commit to cause this bug is 3288ba4
  • Python version: 2 & 3
  • Windows build: Windows 10 Pro 1909
  • Value of the python.languageServer setting: Pylance/JediLSP/Microsoft

Bug does not appear when any one of the following is set:

  • python-vscode being on version 2021.2 (or pre 2012.3)
  • python.languageServer is set to 'Jedi' (Not 'JediLSP')

Steps to reproduce:

vscode-python-bug

@djplt djplt added triage-needed Needs assignment to the proper sub-team bug Issue identified by VS Code Team member as probable bug labels Mar 19, 2021
@brettcannon
Copy link
Member

You list all language servers. So are you saying this happens on all three of them?

@brettcannon brettcannon added the info-needed Issue requires more information from poster label Mar 19, 2021
@Haibao425
Copy link

Haibao425 commented Mar 20, 2021

Yes, I have same issues after upgrading new python extension version.
Happened on Python.

Language server is pylance.

@karthiknadig
Copy link
Member

@djplt What is the OS?

@Haibao425
Copy link

@djplt What is the OS?

Mine is MacOS

@djplt
Copy link
Author

djplt commented Mar 20, 2021

You list all language servers. So are you saying this happens on all three of them?

So it doesn't happen when the language server is set to 'Jedi', the other three ('Microsoft', 'JediLSP' & 'Pylance') cause the bug to appear.

@djplt
Copy link
Author

djplt commented Mar 20, 2021

@djplt What is the OS?

Windows 10 Pro 1909

I've updated the information in my original post.

djplt added a commit to djplt/vscode-python-1 that referenced this issue Mar 21, 2021
@djplt
Copy link
Author

djplt commented Mar 21, 2021

Found that the commit that caused this is 3288ba4

I've created a branch that appears to fix this issue
(below 8d088d8)

@karthiknadig karthiknadig added area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. triage labels Mar 22, 2021
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Mar 22, 2021
@jakebailey
Copy link
Member

Yep, that's the bug and I probably committed that. The ExP code removal changed the code path and the sendTelemetry change meant we dropped the result. @bschnurr was debugging this from the Pylance side and will submit something for this.

@kimadeline
Copy link

Hi everyone, we released a new version of the extension that includes the fix above, could you give it a try and see if this solves the issues you've been encountering?

Thank you!

@djplt
Copy link
Author

djplt commented Mar 24, 2021

Initial dabble shows it's fixed for me!

@kimadeline
Copy link

Thank you for reporting back! Closing this issue as resolved.

@ghost ghost removed the needs PR label Mar 24, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. bug Issue identified by VS Code Team member as probable bug regression Bug didn't exist in a previous release
Projects
None yet
Development

No branches or pull requests

6 participants