PTVS icon indicating copy to clipboard operation
PTVS copied to clipboard

Go to definition on module not working

Open bschnurr opened this issue 3 years ago • 3 comments

Describe the bug [A clear and concise description of the bug]

Steps to Reproduce

  1. Go to definition on 'decimal'
  2. click on any of the results in the search results window

Expected behavior [A clear and concise description of your expectation]

expected to jump to the pyi or py file location

Additional context and screenshots [Add any other information such as screenshots, error message, or stack trace] image

Sample Code

import decimal 

Configuration information (If you are providing a diagnostics file (see below), skip this section) VS Version: [Can be found under "Help->About Microsoft Visual Studio"] PTVS version: [Can be found under "Help->About Microsoft Visual Studio->Installed products->Python with Pylance"] Python version: Debugger Type (if applicable): [New debugger or legacy debugger?]

Diagnostics file The diagnostics file contains information such as the Python version, environments, loaded assemblies, configuration options, etc. This file makes it easier for us to reproduce and fix bugs, so we would really appreciate it if you could provide it to us. This file can be generated by going to Tools->Options->Python->Diagnostics. You can attach the file to this issue or email it to us at [email protected]. If you email it, please add a link to this issue.

XXX

bschnurr avatar Jun 09 '22 23:06 bschnurr

Looks like the control-click go to definition is being implemented. https://devdiv.visualstudio.com/DevDiv/_search?text=go%20to%20definition&type=workitem&pageSize=25&filters=Projects%7BDevDiv%7D

StellaHuang95 avatar Jul 27 '22 22:07 StellaHuang95

I believe this is a bug in the VSLanguageClient. They're not doing path translation correctly for find all reference results.

This code here just uses .localPath directly: https://dev.azure.com/devdiv/DevDiv/_git/VSLanguageServerClient?path=/src/product/RemoteLanguage/Impl/Features/FindReference/ReferenceEntryFactory.cs&version=GBdevelop&line=270&lineEnd=270&lineStartColumn=34&lineEndColumn=61&lineStyle=plain&_a=contents

It should be using this instead: https://dev.azure.com/devdiv/DevDiv/_git/VSLanguageServerClient?path=/src/product/RemoteLanguage/Impl/Utilities.cs&version=GC1c3dbb9a513db2b41ff8f930fd5396ea32176632&line=148&lineEnd=148&lineStartColumn=32&lineEndColumn=44&lineStyle=plain&_a=contents

rchiodo avatar Jul 24 '23 23:07 rchiodo

Going to transfer this to the VSLanguageClient team.

rchiodo avatar Jul 24 '23 23:07 rchiodo

https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1859975/

rchiodo avatar Jul 24 '23 23:07 rchiodo