microsoft / microsoft/TypeScript

VSCode errors when refactoring JavaScript to new file

オープン
#60,180 コメント 7 件 リアクション 8 件 担当者 0 名 GitHub で見る

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

Needs More Info
主要言語
Go
スター
111k
フォーク
14.4k
平均マージ
1日 19時間
マージ済み PR(30日)
117

説明

Type: Bug

I was trying to copy some JavaScript functions to a new file using Refactor. I clicked Move to file and got the following notification:

<semantic> TypeScript Server Error (5.6.2)
Debug Failure. False expression: No interactive refactor arguments available
Error: Debug Failure. False expression: No interactive refactor arguments available
    at Object.getRefactorEditsToMoveToFile [as getEditsForAction] (/home/procode/.vscode-server/bin/d78a74bcdfad14d5d3b1b782f87255d802b57511/extensions/node_modules/typescript/lib/typescript.js:144294:11)
    at Object.getEditsForRefactor (/home/procode/.vscode-server/bin/d78a74bcdfad14d5d3b1b782f87255d802b57511/extensions/node_modules/typescript/lib/typescript.js:143422:31)
    at getEditsForRefactor2 (/home/procode/.vscode-server/bin/d78a74bcdfad14d5d3b1b782f87255d802b57511/extensions/node_modules/typescript/lib/typescript.js:150903:32)
    at Proxy.<anonymous> (/home/procode/.vscode-server/extensions/vue.volar-2.1.6/node_modules/typescript-vue-plugin-bundle/index.js:5:1894)
    at IpcIOSession.getEditsForRefactor (/home/procode/.vscode-server/bin/d78a74bcdfad14d5d3b1b782f87255d802b57511/extensions/node_modules/typescript/lib/typescript.js:192236:49)
    at getEditsForRefactor (/home/procode/.vscode-server/bin/d78a74bcdfad14d5d3b1b782f87255d802b57511/extensions/node_modules/typescript/lib/typescript.js:190435:43)
    at /home/procode/.vscode-server/bin/d78a74bcdfad14d5d3b1b782f87255d802b57511/extensions/node_modules/typescript/lib/typescript.js:192655:15
    at IpcIOSession.executeWithRequestId (/home/procode/.vscode-server/bin/d78a74bcdfad14d5d3b1b782f87255d802b57511/extensions/node_modules/typescript/lib/typescript.js:192644:14)
    at IpcIOSession.executeCommand (/home/procode/.vscode-server/bin/d78a74bcdfad14d5d3b1b782f87255d802b57511/extensions/node_modules/typescript/lib/typescript.js:192653:29)
    at IpcIOSession.onMessage (/home/procode/.vscode-server/bin/d78a74bcdfad14d5d3b1b782f87255d802b57511/extensions/node_modules/typescript/lib/typescript.js:192701:68)
    at process.<anonymous> (/home/procode/.vscode-server/bin/d78a74bcdfad14d5d3b1b782f87255d802b57511/extensions/node_modules/typescript/lib/tsserver.js:525:14)
    at process.emit (node:events:519:28)
    at emit (node:internal/child_process:951:14)
    at process.processTicksAndRejections (node:internal/process/task_queues:83:21)

This happens when I use Move to existing file, not Move to new file.

VS Code version: Code 1.94.0 (d78a74bcdfad14d5d3b1b782f87255d802b57511, 2024-10-02T13:08:12.626Z)
OS version: Windows_NT x64 10.0.22631
Modes:
Remote OS version: Linux x64 5.15.153.1-microsoft-standard-WSL2

System Info
Item Value
CPUs Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz (8 x 1190)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 15.77GB (2.26GB free)
Process Argv --crash-reporter-id f7f8d6dd-eb4b-4368-b4e3-4ee787923cae
Screen Reader no
VM 0%
Item Value
Remote WSL: Ubuntu-24.04
OS Linux x64 5.15.153.1-microsoft-standard-WSL2
CPUs Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz (8 x 0)
Memory (System) 7.64GB (5.23GB free)
VM 0%
Extensions (38)
Extension Author (truncated) Version
vscode-github-actions git 0.27.0
volar Vue 2.1.6
rtf ale 2.8.0
Handlebars and 0.4.1
icons-carbon ant 0.2.6
codeswing cod 0.0.25
vsc-material-theme Equ 34.7.5
vscode-firefox-debug fir 2.9.10
codespaces Git 1.17.3
remotehub Git 0.64.0
vscode-drawio hed 1.6.6
fluent-icons mig 0.0.18
symbols mig 0.0.20
dotenv mik 1.0.1
theme-monokai-pro-vscode mon 1.3.2
vscode-edge-devtools ms- 2.1.6
jupyter-keymap ms- 1.1.2
remote-containers ms- 0.388.0
remote-ssh ms- 0.115.0
remote-ssh-edit ms- 0.87.0
remote-wsl ms- 0.88.4
vscode-remote-extensionpack ms- 0.25.0
remote-explorer ms- 0.4.3
remote-repositories ms- 0.42.0
remote-server ms- 1.5.2
vs-keybindings ms- 0.2.1
vscode-speech ms- 0.10.0
material-icon-theme PKi 5.11.1
material-product-icons PKi 1.7.1
sqlite-viewer qwt 0.7.3
ayu tea 1.0.5
pdf tom 1.2.2
windows-terminal Tyr 0.7.0
roblox-lua Und 1.0.5
vscode-icons vsc 12.9.0
JavaScriptSnippets xab 1.8.0
jetbrains-product-icons yat 0.0.8
material-theme zhu 3.17.5

(21 theme extensions excluded)

A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
vscaat:30438848
c4g48928:30535728
azure-dev_surveyone:30548225
a9j8j154:30646983
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonnoceb:30805159
asynctok:30898717
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
accentitlementsc:30995553
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
f3je6385:31013174
a69g1124:31058053
dvdeprecation:31068756
dwnewjupytercf:31046870
impr_priority:31102340
nativerepl1:31139838
refactort:31108082
pythonrstrctxt:31112756
flighttreat:31134774
wkspc-onlycs-t:31132770
nativeloc2:31134642
wkspc-ranged-t:31151552
cf971741:31144450
defaultse:31146405
iacca2:31150323
notype1:31151523
5fd0e150:31146321

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

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

はじめの一歩

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

調査の方向性

まず、TypeScript 5.6.2 を使用する VS Code 1.94 で Move to existing file を再現し、スタックトレースに示された getRefactorEditsToMoveToFile と getEditsForRefactor のパスを調査します。Move to new file と比較して回帰テストを作成します。選択した JavaScript 関数を移動したときに、interactive refactor arguments error が報告されなくなれば完了です。

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

評価

技術スタック
javascript, typescript, vscode
領域
developer-experience, tooling
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

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

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