PowerShell / PowerShell/vscode-powershell

Command Explorer lists multiple commands with the same name

オープン
#1,685 コメント 4 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Area-Command Explorer Issue-Bug
主要言語
TypeScript
スター
1.9k
フォーク
548
PR マージ指標
30日以内にマージされた PR はありません

説明

System Details

System Details Output

### VSCode version: 1.31.0-insider 28e7467661d67c05c3662ff900ee1984f7e2fbcc x64
(node:27697) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

### VSCode extensions:
DavidAnson.vscode-markdownlint@0.23.0
EditorConfig.EditorConfig@0.12.6
eg2.tslint@1.0.42
ms-vscode.csharp@1.17.1
ms-vscode.PowerShell@1.10.2
msjsdiag.debugger-for-chrome@4.11.1


### PSES version: 1.10.2.0

### PowerShell version:

Name                           Value
----                           -----
PSVersion                      6.1.1
PSEdition                      Core
GitCommitId                    6.1.1
OS                             Linux 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27)
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
Issue Description

While working on an enhancement to the Command Explorer, I noticed a number of command names showed up twice. I also noted that they didn't duplicate in pwsh at the terminal. It appears they are being duplicated when you have multiple versions of the same module (in my case I have versions 1.6.7 and 2.0.3 of PowerShellGet installed).

I ran the command Microsoft.PowerShell.Core\Get-Command -CommandType @("Function","Cmdlet","ExternalScript") | Microsoft.PowerShell.Utility\Select-Object -Property @("Name","ModuleName") | Microsoft.PowerShell.Utility\Sort-Object -Property Name and I don't see the double commands.

Expected Behaviour

When refreshing the Command Explorer, should return a single instance of each command.

Actual Behaviour

Getting duplicate commands:
image

Attached Logs

logs.zip

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

Command Explorer の更新エントリポイントから開始し、複数のバージョンの PowerShellGet がインストールされている状態で問題を再現します。返されたコマンドを、提供されている Get-Command パイプラインと比較します。更新時にエクスプローラーに各コマンド名のインスタンスが 1 つだけ表示されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
powershell, typescript
領域
tooling
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
38/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。