vscode-powershell icon indicating copy to clipboard operation
vscode-powershell copied to clipboard

The menu 'Go to Definition' does not support 'Module-Qualified Cmdlet Names' syntax

Open LaurentDardenne opened this issue 3 years ago • 1 comments

Prerequisites

  • [X] I have written a descriptive issue title.
  • [X] I have searched all issues to ensure it has not already been reported.
  • [X] I have read the troubleshooting guide.
  • [X] I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • [X] I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.

Summary

Once added a module name to a function name, 'the menu' considers this syntax as a full function name.

see: https://github.com/PowerShell/vscode-powershell/issues/928

PowerShell Version

Name                           Value
----                           -----
PSVersion                      5.1.19041.1320
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0, 5.0, 5.1.19041.1320}
BuildVersion                   10.0.19041.1320
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Visual Studio Code Version

1.64.2
f80445acd5a3dadef24aa209168452a3d97cc326
x64

Extension Version

[email protected]
[email protected]
[email protected]

Steps to Reproduce

Use the 'Module-Qualified Cmdlet Names' syntax into a script.

Visuals

Before

inside the module image

inside a script image

After

inside a script image

inside the module image

Logs

No response

LaurentDardenne avatar Feb 19 '22 10:02 LaurentDardenne

Thanks @LaurentDardenne for opening this issue and for providing the repro steps! We dont have scheduled time for this fix at the moment but I will mark it as up for grabs

SydneyhSmith avatar Feb 22 '22 22:02 SydneyhSmith

This is mostly fixed. That is, the problem where the command name's when qualified with a module name treated the whole string as the command name has been fixed by stripping the module name when building the reference tables. However, we still have a separate "problem" where we can't jump to definition (or find references) in modules that are only imported via the import statement in a piece of code; the actual definition/references must be in script files within the workspace.

andyleejordan avatar Feb 22 '23 19:02 andyleejordan

This issue has been marked as fixed. It has been automatically closed for housekeeping purposes.

ghost avatar Feb 22 '23 22:02 ghost