mirror of
https://github.com/denoland/deno.git
synced 2025-01-18 03:44:05 -05:00
chore(lsp): revert respect shouldCreateNewSourceFile (#23535)
Reverts https://github.com/denoland/deno/pull/23515 but adds a comment for why this is ignored
This commit is contained in:
parent
ded6afccf2
commit
c1bd9503dd
1 changed files with 3 additions and 5 deletions
|
@ -609,7 +609,9 @@ delete Object.prototype.__proto__;
|
||||||
specifier,
|
specifier,
|
||||||
languageVersion,
|
languageVersion,
|
||||||
_onError,
|
_onError,
|
||||||
shouldCreateNewSourceFile,
|
// this is not used by the lsp because source
|
||||||
|
// files are created in the document registry
|
||||||
|
_shouldCreateNewSourceFile,
|
||||||
) {
|
) {
|
||||||
if (logDebug) {
|
if (logDebug) {
|
||||||
debug(
|
debug(
|
||||||
|
@ -624,10 +626,6 @@ delete Object.prototype.__proto__;
|
||||||
// Needs the original specifier
|
// Needs the original specifier
|
||||||
specifier = normalizedToOriginalMap.get(specifier) ?? specifier;
|
specifier = normalizedToOriginalMap.get(specifier) ?? specifier;
|
||||||
|
|
||||||
if (shouldCreateNewSourceFile) {
|
|
||||||
sourceFileCache.delete(specifier);
|
|
||||||
}
|
|
||||||
|
|
||||||
let sourceFile = sourceFileCache.get(specifier);
|
let sourceFile = sourceFileCache.get(specifier);
|
||||||
if (sourceFile) {
|
if (sourceFile) {
|
||||||
return sourceFile;
|
return sourceFile;
|
||||||
|
|
Loading…
Add table
Reference in a new issue