microsoft / microsoft/TypeScript
SkipLibCheck fails to work in multi-project set-up
まだ誰も着手していません。
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.4k
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 117
説明
TypeScript Version: 3.8. Beta
Search Terms:
skiplibcheck
Steps to reproduce
- Extract the attached zip file to a folder and open
repro.slnin Visual Studio (I'm using 2019) - Expand the
npmfolder on project B and install the missing@azure/storage-blobpackage. - Rebuild the solution.
Expected behavior:
No build errors.
Actual behavior:
2 errors:
error TS2740: Build:Type 'Buffer' is missing the following properties...
error TS2345: Build:Argument of type 'ErrnoException' is not assignable...
Explanation
We want have a custom definition for NodeJS. The npm package imported in Project B also has its own (incomplete) definition. So, we've added skiplibcheck to all the projects.
Project B builds fine by itself.
Project C references some NodeJS types. Project C also builds fine by itself.
Project A references types from both B and C.
When attempting to build A, we get the error above. But the error is for project C.
Basically, when building Project A, the skiplibcheck option is being ignored and the incomplete NodeJS definition from the imported package is being used.
Further Observations
Curiously, if file A/foo/bar.ts is moved to A/bar.ts (and the imports amended) the build compiles fine.
Attachment
Repro.zip
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Repro.zip を展開して Visual Studio で repro.sln を開き、プロジェクト A、B、C を含むソリューションを再ビルドします。A/foo/bar.ts を A/bar.ts に移動した場合の動作を比較し、skiplibcheck 周辺のプロジェクト設定を調べます。完了の条件は、報告されている TS2740 および TS2345 エラーなしでマルチプロジェクト ビルドが完了することです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- typescript
- 領域
- build-system, compilers
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100