Skip to content

Commit dd5003c

Browse files
committed
Look for lock file in workspace folders
1 parent 696c792 commit dd5003c

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

server/src/incrementalCompilation.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { fileCodeActions } from "./codeActions";
1414
import { projectsFiles } from "./projectFiles";
1515
import { getRewatchBscArgs, RewatchCompilerArgs } from "./bsc-args/rewatch";
1616
import { BsbCompilerArgs, getBsbBscArgs } from "./bsc-args/bsb";
17+
import { workspaceFolders } from "./server";
1718

1819
export function debug() {
1920
return (
@@ -262,6 +263,12 @@ function triggerIncrementalCompilationOfFile(
262263
}
263264

264265
const projectRewatchLockfiles = [
266+
...Array.from(workspaceFolders).map((w) =>
267+
path.resolve(w, c.rewatchLockPartialPath),
268+
),
269+
...Array.from(workspaceFolders).map((w) =>
270+
path.resolve(w, c.rescriptLockPartialPath),
271+
),
265272
path.resolve(projectRootPath, c.rewatchLockPartialPath),
266273
path.resolve(projectRootPath, c.rescriptLockPartialPath),
267274
];

server/src/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import { projectsFiles } from "./projectFiles";
3131

3232
// Absolute paths to all the workspace folders
3333
// Configured during the initialize request
34-
const workspaceFolders = new Set<string>();
34+
export const workspaceFolders = new Set<string>();
3535

3636
// This holds client capabilities specific to our extension, and not necessarily
3737
// related to the LS protocol. It's for enabling/disabling features that might

0 commit comments

Comments
 (0)