Some of the semantic diagnostics use fileName and not relative file name as part of semantic diagnostics and it makes tsbuildinfo unportable

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

@sheetalkamat がすでに取り組んでいます。

2024年9月5日 から。

評価

この issue はまだ評価されていません。

説明

🔎 Search Terms

semantic diagnostics file name, tsbuildinfo

🕗 Version & Regression Information
  • This changed between versions ______ and _______
  • This changed in commit or PR _______
  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
  • I was unable to test this on prior versions because _______
⏯ Playground Link

No response

💻 Code
// Your code here

Errors like File_0_is_not_a_module use file name directly and that means they will have full paths in buildInfo making it report incorrect path if tsbuildInfo is ported.
Also need to search through code base to see if there are more such cases and use relative file name instead:
In Checker:
error(errorNode, resolutionDiagnostic, moduleReference, resolvedModule.resolvedFileName)
error(errorNode, diag, moduleReference, resolvedModule!.resolvedFileName)
error(errorNode, Diagnostics.Output_file_0_has_not_been_built_from_source_file_1, redirect, resolvedModule.resolvedFileName);
chainDiagnosticMessages( errorInfo, Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type, moduleReference, resolvedFileName, ),

🙁 Actual behavior

File '/b.ts' is not module.

🙂 Expected behavior

File 'relativeToFileReportedIn("/b.ts")' not module.

Additional information about the issue

No response

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

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

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

はじめの一歩

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

microsoft/TypeScript のほかの issue

microsoft/TypeScript の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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