-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
avoid recomputing project roots and ReScript versions as much as poss…
…ible
- Loading branch information
Showing
3 changed files
with
73 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import * as cp from "node:child_process"; | ||
import * as p from "vscode-languageserver-protocol"; | ||
|
||
export type filesDiagnostics = { | ||
[key: string]: p.Diagnostic[]; | ||
}; | ||
|
||
interface projectFiles { | ||
openFiles: Set<string>; | ||
filesWithDiagnostics: Set<string>; | ||
filesDiagnostics: filesDiagnostics; | ||
rescriptVersion: string | undefined; | ||
|
||
bsbWatcherByEditor: null | cp.ChildProcess; | ||
|
||
// This keeps track of whether we've prompted the user to start a build | ||
// automatically, if there's no build currently running for the project. We | ||
// only want to prompt the user about this once, or it becomes | ||
// annoying. | ||
// The type `never` means that we won't show the prompt if the project is inside node_modules | ||
hasPromptedToStartBuild: boolean | "never"; | ||
} | ||
|
||
export let projectsFiles: Map<string, projectFiles> = // project root path | ||
new Map(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters