Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9e496f7

Browse files
committedOct 24, 2024·
enable incremental typechecking by default
1 parent 5705458 commit 9e496f7

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed
 

‎server/src/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export interface extensionConfiguration {
1717
forConstructorPayloads?: boolean;
1818
};
1919
incrementalTypechecking?: {
20-
enabled?: boolean;
20+
enable?: boolean;
2121
acrossFiles?: boolean;
2222
debugLogging?: boolean;
2323
};
@@ -46,7 +46,7 @@ let config: { extensionConfiguration: extensionConfiguration } = {
4646
forConstructorPayloads: true,
4747
},
4848
incrementalTypechecking: {
49-
enabled: false,
49+
enable: true,
5050
acrossFiles: false,
5151
debugLogging: false,
5252
},

‎server/src/server.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ let deleteProjectDiagnostics = (projectRootPath: string) => {
174174
});
175175

176176
projectsFiles.delete(projectRootPath);
177-
if (config.extensionConfiguration.incrementalTypechecking?.enabled) {
177+
if (config.extensionConfiguration.incrementalTypechecking?.enable) {
178178
ic.removeIncrementalFileFolder(projectRootPath);
179179
}
180180
}
@@ -259,7 +259,7 @@ let openedFile = (fileUri: string, fileContent: string) => {
259259
if (projectRootPath != null) {
260260
let projectRootState = projectsFiles.get(projectRootPath);
261261
if (projectRootState == null) {
262-
if (config.extensionConfiguration.incrementalTypechecking?.enabled) {
262+
if (config.extensionConfiguration.incrementalTypechecking?.enable) {
263263
ic.recreateIncrementalFileFolder(projectRootPath);
264264
}
265265
const namespaceName =
@@ -354,7 +354,7 @@ let openedFile = (fileUri: string, fileContent: string) => {
354354
let closedFile = (fileUri: string) => {
355355
let filePath = fileURLToPath(fileUri);
356356

357-
if (config.extensionConfiguration.incrementalTypechecking?.enabled) {
357+
if (config.extensionConfiguration.incrementalTypechecking?.enable) {
358358
ic.handleClosedFile(filePath);
359359
}
360360

@@ -388,7 +388,7 @@ let updateOpenedFile = (fileUri: string, fileContent: string) => {
388388
let filePath = fileURLToPath(fileUri);
389389
assert(stupidFileContentCache.has(filePath));
390390
stupidFileContentCache.set(filePath, fileContent);
391-
if (config.extensionConfiguration.incrementalTypechecking?.enabled) {
391+
if (config.extensionConfiguration.incrementalTypechecking?.enable) {
392392
ic.handleUpdateOpenedFile(filePath, fileContent, send, () => {
393393
if (config.extensionConfiguration.codeLens) {
394394
sendCodeLensRefresh();
@@ -862,7 +862,7 @@ function format(msg: p.RequestMessage): Array<p.Message> {
862862
}
863863

864864
let updateDiagnosticSyntax = (fileUri: string, fileContent: string) => {
865-
if (config.extensionConfiguration.incrementalTypechecking?.enabled) {
865+
if (config.extensionConfiguration.incrementalTypechecking?.enable) {
866866
// The incremental typechecking already sends syntax diagnostics.
867867
return;
868868
}

‎server/src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ export let runAnalysisAfterSanityCheck = (
224224
...process.env,
225225
RESCRIPT_VERSION: rescriptVersion,
226226
RESCRIPT_INCREMENTAL_TYPECHECKING:
227-
config.extensionConfiguration.incrementalTypechecking?.enabled === true
227+
config.extensionConfiguration.incrementalTypechecking?.enable === true
228228
? "true"
229229
: undefined,
230230
RESCRIPT_PROJECT_CONFIG_CACHE:

0 commit comments

Comments
 (0)
Please sign in to comment.