PSModulePath mutated during script changes

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

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

評価

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

調査の方向性

まず PowerShell Integrated Console (PSIC) で問題を再現します。PSModulePath を記録し、スクリプトを編集して、もう一度比較します。次に、runspace の作成と初期化を追跡します。issue には、runspace の起動によって PSModulePath が更新される可能性があると記載されています。スクリプトを編集しても既存の PSModulePath が予期せず変更されなくなれば完了です。

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

説明

Area-Engine Issue-Performance

Issue Description

PSModulePath is modified with every edit to a file.

Steps to repo

Run this in the PSIC:

$env:PSModulePath
$env:PSModulePath = "C:\Users\tyleonha\.vscode-insiders\extensions\ms-vscode.powershell-preview-2019.5.0\modules"
$env:PSModulePath

Verify it changed.

Now make a single edit to a script and check the PSModulePath once more... It should look like:

C:\Users\tyleonha\Documents\PowerShell\Modules;C:\Users\tyleonha.vscode-insiders\extensions\ms-vscode.powershell-preview-2019.5.0\modules;C:\Program Files\PowerShell\Modules;c:\program files\powershell\7-preview\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules

Apparently, the PSModulePath is updated every time you spin up a Runspace so I wonder if we're doing something like that...

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.18362
VSCode 1.35.0-insider
PowerShell Extension Version 2019.5.0

PowerShell Information

Name Value
PSVersion 7.0.0-preview.1
PSEdition Core
GitCommitId 7.0.0-preview.1
OS Microsoft Windows 10.0.18362
Platform Win32NT
PSCompatibleVersions 1.0 2.0 3.0 4.0 5.0 5.1.10032.0 6.0.0 7.0.0-preview.1
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

Visual Studio Code Extensions

Visual Studio Code Extensions(Click to Expand)
Extension Author Version
azure-account ms-vscode 0.8.4
csharp ms-vscode 1.19.1
horizon-theme-vscode jolaleye 1.8.1
powershell-preview ms-vscode 2019.5.0
remote-containers ms-vscode-remote 0.57.0
remote-ssh ms-vscode-remote 0.41.0
remote-ssh-edit ms-vscode-remote 0.41.0
remote-ssh-explorer ms-vscode-remote 0.41.0
remote-wsl ms-vscode-remote 0.36.0
vscode-azurefunctions ms-azuretools 0.17.1
vscode-remote-extensionpack ms-vscode-remote 0.14.0
主要言語
TypeScript
スター
1.9k
フォーク
548
PR マージ指標
30日以内にマージされた PR はありません

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

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

はじめの一歩

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

PowerShell/vscode-powershell のほかの issue

PowerShell/vscode-powershell の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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