microsoft / microsoft/TypeScript

Documented server plugin example fails with relative path

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

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

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

説明

TypeScript Version: 4.0.3 & 4.1.0-dev.20201003

Search Terms: plugin link path

Code

Writing a Language Service Plugin | Putting it all together
https://github.com/microsoft/TypeScript/wiki/Writing-a-Language-Service-Plugin#putting-it-all-together

Summary:

I have recreated the example plugin found in the documentation at Writing a Language Service Plugin.

The example works when using 'npm link', but not with relative paths.

I referred to the plugin in tsconfig like this:

"plugins": [{
	"name": "../plugin"
}]

I have also tried to refer to ../plugin/index and ../plugin/index.js, but neither of them works.

Expected behavior:

Be able to refer to the plugin with a relative path.

Actual behavior:

Silently fails without the plugin being loaded.

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

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

はじめの一歩

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

調査の方向性

リンクされている「Writing a Language Service Plugin」の例から始め、相対パス ../plugin を使用して、その tsconfig の plugin 設定を再現します。その設定がどのように plugin を解決するかを追跡し、続いて、ドキュメント化された例が npm link なしで plugin を読み込み、もはや暗黙に失敗しないことを確認します。

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

評価

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

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

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