From 2619914e7337090d78768ee9d1c2eb2baf173f47 Mon Sep 17 00:00:00 2001 From: Colen Garoutte-Carson Date: Thu, 6 Feb 2025 15:50:17 -0800 Subject: [PATCH 1/2] Remove system include/framework paths from config defaults --- Extension/src/LanguageServer/configurations.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Extension/src/LanguageServer/configurations.ts b/Extension/src/LanguageServer/configurations.ts index 62718852a..fa60287d9 100644 --- a/Extension/src/LanguageServer/configurations.ts +++ b/Extension/src/LanguageServer/configurations.ts @@ -120,8 +120,6 @@ export interface CompilerDefaults { knownCompilers: KnownCompiler[]; cStandard: string; cppStandard: string; - includes: string[]; - frameworks: string[]; windowsSdkVersion: string; intelliSenseMode: string; trustedCompilerFound: boolean; @@ -295,8 +293,6 @@ export class CppProperties { this.knownCompilers = compilerDefaults.knownCompilers; this.defaultCStandard = compilerDefaults.cStandard; this.defaultCppStandard = compilerDefaults.cppStandard; - this.defaultIncludes = compilerDefaults.includes; - this.defaultFrameworks = compilerDefaults.frameworks; this.defaultWindowsSdkVersion = compilerDefaults.windowsSdkVersion; this.defaultIntelliSenseMode = compilerDefaults.intelliSenseMode !== "" ? compilerDefaults.intelliSenseMode : undefined; this.trustedCompilerFound = compilerDefaults.trustedCompilerFound; @@ -349,7 +345,7 @@ export class CppProperties { } private async applyDefaultIncludePathsAndFrameworks() { - if (this.configurationIncomplete && this.defaultIncludes && this.defaultFrameworks && this.vcpkgPathReady) { + if (this.configurationIncomplete && this.vcpkgPathReady) { const configuration: Configuration | undefined = this.CurrentConfiguration; if (configuration) { this.applyDefaultConfigurationValues(configuration); From 0da20f1f6916cace110c5eceb467ef2ad35a4c6c Mon Sep 17 00:00:00 2001 From: Colen Garoutte-Carson Date: Thu, 6 Feb 2025 15:52:47 -0800 Subject: [PATCH 2/2] Remove the other sets of fields as well --- Extension/src/LanguageServer/configurations.ts | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/Extension/src/LanguageServer/configurations.ts b/Extension/src/LanguageServer/configurations.ts index fa60287d9..e9c7a86b2 100644 --- a/Extension/src/LanguageServer/configurations.ts +++ b/Extension/src/LanguageServer/configurations.ts @@ -141,8 +141,6 @@ export class CppProperties { private knownCompilers?: KnownCompiler[]; private defaultCStandard: string | null = null; private defaultCppStandard: string | null = null; - private defaultIncludes: string[] | null = null; - private defaultFrameworks?: string[]; private defaultWindowsSdkVersion: string | null = null; private isCppPropertiesJsonVisible: boolean = false; private vcpkgIncludes: string[] = []; @@ -378,9 +376,6 @@ export class CppProperties { if (isUnset(settings.defaultDefines)) { configuration.defines = (process.platform === 'win32') ? ["_DEBUG", "UNICODE", "_UNICODE"] : []; } - if (isUnset(settings.defaultMacFrameworkPath) && process.platform === 'darwin') { - configuration.macFrameworkPath = this.defaultFrameworks; - } if ((isUnset(settings.defaultWindowsSdkVersion) || settings.defaultWindowsSdkVersion === "") && this.defaultWindowsSdkVersion && process.platform === 'win32') { configuration.windowsSdkVersion = this.defaultWindowsSdkVersion; } @@ -968,13 +963,6 @@ export class CppProperties { if (!configuration.windowsSdkVersion && !!this.defaultWindowsSdkVersion) { configuration.windowsSdkVersion = this.defaultWindowsSdkVersion; } - if (!origIncludePath && !!this.defaultIncludes) { - const includePath: string[] = configuration.includePath || []; - configuration.includePath = includePath.concat(this.defaultIncludes); - } - if (!configuration.macFrameworkPath && !!this.defaultFrameworks) { - configuration.macFrameworkPath = this.defaultFrameworks; - } } } else { // add compiler to list of trusted compilers