Skip to content
This repository was archived by the owner on Jun 22, 2024. It is now read-only.

Commit cea8862

Browse files
committed
Fix dummy module error
1 parent 86b119f commit cea8862

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## 2.4.2
4+
* Dummy module did always precede real ones leading to bad completion behavior
5+
36
## 2.4.1
47
* Extension did not work correctly
58
* Can now be disabled by `"sde.enable": false`

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"url": "https://github.com/vknabel"
99
},
1010
"license": "Apache-2.0",
11-
"version": "2.4.1",
11+
"version": "2.4.2",
1212
"publisher": "vknabel",
1313
"icon": "icons/icon.png",
1414
"galleryBanner": {

src/server/server.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ function gatherAllSwiftFilesInPath(root: string): string[] {
9393

9494
export function getAllSourcePaths(srcPath: string): string[] {
9595
const sp = path.dirname(srcPath)
96-
for (let [m, p] of allModulePaths) {
97-
if (p === sp) {
98-
let ss = allModuleSources.get(m)
96+
for (let [moduleName, modulePath] of allModulePaths) {
97+
if (moduleName != null && path.normalize(modulePath) === path.normalize(sp)) {
98+
let ss = allModuleSources.get(moduleName)
9999
// trace("**getAllDocumentPaths** ", Array.from(ss).join(","))
100100
return Array.from(ss)
101101
}

0 commit comments

Comments
 (0)