dotnet type lookup breaks after importing SharePointServer PowerShell module
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 35/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- csharp, powershell
研究方向
Reproduce the failure in a PowerShell 5.1 session by comparing type completion before and after Import-Module SharePointServer. Start with the type-name completion path associated with TabExpansion2 and the reported completion handler error. Done means [date completes again with Tab and Ctrl+Space after the module import, while cmdlet and method completion continue to work.
由索引模型根據 Issue 內容生成。
描述
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues, especially the pinned issues.
Exception report
N/A
Screenshot
N/A
Environment data
PS Version: 5.1.20348.2849
PS HostName: ConsoleHost
PSReadLine Version: 2.4.1-beta1
PSReadLine EditMode: Windows
OS: 10.0.20348.1 (WinBuild.160101.0800)
BufferWidth: 120
BufferHeight: 9001
Steps to reproduce
Try to autocomplete a dotnet type after importing the SharePointServer PowerShell module.
Applies both to tab completion and selection using Ctrl + Space.
- Start a new PowerShell session
- Test type autocomplete by for example typing
[dateand then pressing Ctrl + Space - Auto complete suggestions come up.
- Import module with
Import-Module SharePointServer - Test autocomplete with
[dateand then pressing Ctrl + Space
Expected behavior
Autocomplete should work both before and after importing the SharePointServer module.
Actual behavior
After the module import, autocomplete is broken for dotnet objects.
More specifically the function to complete types names is broken.
Autocomplete for Cmdlets and methods of types is working, but type name is not.
- Typing
Get-Moand pressing Ctrl + Space gives options to complete. - Typing
[datetime]and pressing Ctrl + Space gives method suggestions. - Typing
[dateand pressing Ctrl + Space (or pressing just Tab) gives no results.
Additonal info:
While PSReadline itself does not seem to generate a visible exception, there is some exceptions generated in VSCode with the PowerShell extension, so I'm adding it here if possibly relevant.
But the reproduction steps has been run directly in PowerShell outside of VSCode.
2025-03-25 15:01:05.940 [info] [PSES] [Error - 3:01:05 PM] <Error>Microsoft.PowerShell.EditorServices.Handlers.PsesCompletionHandler: Error Occurred in TabExpansion2 |
2025-03-25 15:01:05.945 [info] [PSES] [Warn - 3:01:05 PM] <Warning>Microsoft.PowerShell.EditorServices.Handlers.PsesCompletionHandler: Exception occurred while running handling completion request - System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.PowerShell.EditorServices.Handlers.PsesCompletionHandler.<GetCompletionsInFileAsync>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerShell.EditorServices.Handlers.PsesCompletionHandler.<Handle>d__13.MoveNext() |
````
- 主要語言
- C#
- 星號
- 4.4k
- 分支
- 341
- PR 合併指標
- 30 天內沒有已合併 PR
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
PowerShell/PSReadLine 的其他 Issue
-
Needs-Triage :mag:
難度 2/5 1-3 小時 新手友好度 78/100
PowerShell/PSReadLine#5205 ·
-
Needs-Triage :mag:
難度 2/5 1-3 小時 新手友好度 68/100
PowerShell/PSReadLine#5195 ·
-
Needs-Triage :mag:
難度 2/5 1-3 小時 新手友好度 72/100
PowerShell/PSReadLine#5121 ·
-
Needs-Triage :mag:
難度 2/5 1-3 小時 新手友好度 64/100
PowerShell/PSReadLine#5045 ·
-
Area-CommandHelp Issue-Enhancement
難度 1/5 1 小時以內 新手友好度 68/100
PowerShell/PSReadLine#3470 · 3 個 reaction ·
查看 PowerShell/PSReadLine 的全部 Issue
相似的 Issue
-
core dependencies
難度 1/5 1 小時以內 新手友好度 80/100
-
bug frontend good first issue
難度 2/5 1-3 小時 新手友好度 75/100
-
NavigationViewItemAutomationPeer implements IInvokeProvider but never advertises the Invoke pattern 未關閉
難度 2/5 1-3 小時 新手友好度 75/100
unoplatform/uno#24629 ·
-
agentic-workflows Needs: Triage :mag: State: In-PR
難度 2/5 1-3 小時 新手友好度 70/100
-
Down / Waiting for removal
難度 2/5 1-3 小時 新手友好度 70/100