summaryrefslogtreecommitdiff
path: root/cli/tsc/99_main_compiler.js
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-04-24 15:39:26 -0400
committerGitHub <noreply@github.com>2024-04-24 15:39:26 -0400
commitc1bd9503dd0288a3c209ca2724d2a1de9d5d122b (patch)
tree355bcb72449ce50384c7b3498fc782d460d39800 /cli/tsc/99_main_compiler.js
parentded6afccf21f0f6804fa5ff8bd7e5be6275092d5 (diff)
chore(lsp): revert respect shouldCreateNewSourceFile (#23535)
Reverts https://github.com/denoland/deno/pull/23515 but adds a comment for why this is ignored
Diffstat (limited to 'cli/tsc/99_main_compiler.js')
-rw-r--r--cli/tsc/99_main_compiler.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/cli/tsc/99_main_compiler.js b/cli/tsc/99_main_compiler.js
index 97378076a..e5b51cab0 100644
--- a/cli/tsc/99_main_compiler.js
+++ b/cli/tsc/99_main_compiler.js
@@ -609,7 +609,9 @@ delete Object.prototype.__proto__;
specifier,
languageVersion,
_onError,
- shouldCreateNewSourceFile,
+ // this is not used by the lsp because source
+ // files are created in the document registry
+ _shouldCreateNewSourceFile,
) {
if (logDebug) {
debug(
@@ -624,10 +626,6 @@ delete Object.prototype.__proto__;
// Needs the original specifier
specifier = normalizedToOriginalMap.get(specifier) ?? specifier;
- if (shouldCreateNewSourceFile) {
- sourceFileCache.delete(specifier);
- }
-
let sourceFile = sourceFileCache.get(specifier);
if (sourceFile) {
return sourceFile;