PowerShell / PowerShell/PowerShellEditorServices
Consider disabling module auto-loading during IntelliSense
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 767
- Forks
- 266
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 1
Description
Module auto-loading during IntelliSense is causing some issues for people, including session hangs and IntelliSense slowness. We use Get-Command to gather information about the currently active IntelliSense result. This causes the module containing the command to get loaded, and if the module misbehaves somehow, it can damage the rest of the session.
We should consider setting the $PSModuleAutoLoadingPreference to "none" before running Get-Command so that IntelliSense details are only gathered for modules that the user has loaded. To make sure we have cmdlet signature details, we could potentially just parse the tooltips of the completions if they're available without loading the module.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the IntelliSense path that uses Get-Command to gather details for the active completion result. Determine how to prevent that lookup from loading modules while retaining available cmdlet signature details; done means IntelliSense no longer causes session hangs or slowness from module auto-loading.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100