Skip to content

References/Go To Definition Does not work with aliases #2800

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

Closed
PrzemyslawKlys opened this issue Jul 9, 2020 · 4 comments · Fixed by PowerShell/PowerShellEditorServices#1662
Labels
Area-Symbols & References Issue-Enhancement A feature request (enhancement).

Comments

@PrzemyslawKlys
Copy link
Contributor

Issue Description

I am experiencing a problem with... references not showing aliases usage which gives false picture. Also go to definition doesn't work on aliases either.

image

Original function:

image

Results from search:

image

Attached Logs

Follow the instructions in the README about
capturing and sending logs.

Environment Information

Visual Studio Code

Name Version
Operating System Windows_NT x64 10.0.19041
VSCode 1.46.1
PowerShell Extension Version 2020.6.1

PowerShell Information

Name Value
PSVersion 5.1.19041.1
PSEdition Desktop
PSCompatibleVersions 1.0 2.0 3.0 4.0 5.0 5.1.19041.1
BuildVersion 10.0.19041.1
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

Visual Studio Code Extensions

Visual Studio Code Extensions(Click to Expand)
Extension Author Version
bracket-pair-colorizer-2 CoenraadS 0.2.0
code-settings-sync Shan 3.4.3
emojisense bierner 0.7.0
github-linker gimenete 0.2.3
gitlens eamodio 10.2.2
markdown-all-in-one yzhang 3.1.0
material-icon-theme PKief 4.2.0
powershell-preview ms-vscode 2020.6.1
project-manager alefragnani 11.1.0
vscode-markdownlint DavidAnson 0.36.1
vscode-pull-request-github GitHub 0.17.0
vscode-toggle-quotes BriteSnow 0.3.3
vscode-wakatime WakaTime 4.0.0
vscode-yaml redhat 0.8.0
xml DotJoshJohnson 2.5.0
@ghost ghost added the Needs: Triage Maintainer attention needed! label Jul 9, 2020
@PrzemyslawKlys PrzemyslawKlys changed the title References do not detect functions used with aliases References/Go To Definition Does not work with aliases Jul 9, 2020
@TylerLeonhardt
Copy link
Member

If you import the module that New-TableContent is in, does it work then?

@PrzemyslawKlys
Copy link
Contributor Author

Nope.

@SydneyhSmith
Copy link
Collaborator

Thanks @PrzemyslawKlys this is a feature that we took out for performance reason, so I will mark this as a feature request to work again

@SydneyhSmith SydneyhSmith added Area-Symbols & References Issue-Enhancement A feature request (enhancement). and removed Needs: Triage Maintainer attention needed! labels Jul 14, 2020
@SydneyhSmith SydneyhSmith added this to the vNext milestone Dec 17, 2020
@SydneyhSmith SydneyhSmith removed this from the vNext milestone Jan 26, 2021
@andyleejordan
Copy link
Member

So this is partially fixed. Both [alias(...)] and Set-Alias, if the script has been executed in the integrated console (i.e. with F8) then "Find References" will work (but go-to definition still does not). In order to not rely on querying the aliases in the runspace, we would need an AST way to find all the aliases instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Symbols & References Issue-Enhancement A feature request (enhancement).
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants