From f5d52b1a8a3de349db812c9356c7784987750a17 Mon Sep 17 00:00:00 2001 From: Rezwan ahmed sami Date: Wed, 19 Mar 2025 16:12:29 +0600 Subject: [PATCH 1/2] Fixed: [bug/lsp]panic: vfs: path is not absolute #670 --- internal/tsoptions/tsconfigparsing.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/tsoptions/tsconfigparsing.go b/internal/tsoptions/tsconfigparsing.go index a57260ef12..0fdfa45e56 100644 --- a/internal/tsoptions/tsconfigparsing.go +++ b/internal/tsoptions/tsconfigparsing.go @@ -1452,6 +1452,9 @@ func getFileNamesFromConfigSpecs( // Literal files are always included verbatim. An "include" or "exclude" specification cannot // remove a literal file. for _, fileName := range validatedFilesSpec { + if fileName == "" { + continue + } file := tspath.GetNormalizedAbsolutePath(fileName, basePath) literalFileMap.Set(keyMappper(fileName), file) } From 6ee2b02b7ad7a27b40374b7b17fbccf4cca07a07 Mon Sep 17 00:00:00 2001 From: Rezwan ahmed sami Date: Wed, 19 Mar 2025 22:28:52 +0600 Subject: [PATCH 2/2] updated --- internal/tsoptions/tsconfigparsing.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/internal/tsoptions/tsconfigparsing.go b/internal/tsoptions/tsconfigparsing.go index 0fdfa45e56..0067321468 100644 --- a/internal/tsoptions/tsconfigparsing.go +++ b/internal/tsoptions/tsconfigparsing.go @@ -1452,9 +1452,6 @@ func getFileNamesFromConfigSpecs( // Literal files are always included verbatim. An "include" or "exclude" specification cannot // remove a literal file. for _, fileName := range validatedFilesSpec { - if fileName == "" { - continue - } file := tspath.GetNormalizedAbsolutePath(fileName, basePath) literalFileMap.Set(keyMappper(fileName), file) } @@ -1506,13 +1503,19 @@ func getFileNamesFromConfigSpecs( } files := make([]string, 0, literalFileMap.Size()+wildcardFileMap.Size()+wildCardJsonFileMap.Size()) for file := range literalFileMap.Values() { - files = append(files, file) + if file != "" { + files = append(files, file) + } } for file := range wildcardFileMap.Values() { - files = append(files, file) + if file != "" { + files = append(files, file) + } } for file := range wildCardJsonFileMap.Values() { - files = append(files, file) + if file != "" { + files = append(files, file) + } } return files }