Bug fixes for 0.1.2 (#72)
This commit is contained in:
Родитель
d75bc12fe8
Коммит
d04162fe9e
|
@ -2,6 +2,11 @@
|
||||||
|
|
||||||
All notable changes to the "vscode-makefile-tools" extension will be documented in this file.
|
All notable changes to the "vscode-makefile-tools" extension will be documented in this file.
|
||||||
|
|
||||||
|
## 0.1.2
|
||||||
|
- Support suffixes/prefixes specific for version and cross compilers.
|
||||||
|
- Add the possibility to list only the makefile targets marked as .PHONY.
|
||||||
|
- Various bug fixes.
|
||||||
|
|
||||||
## 0.1.1
|
## 0.1.1
|
||||||
|
|
||||||
- Addressed feedback from 0.1
|
- Addressed feedback from 0.1
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"name": "makefile-tools",
|
"name": "makefile-tools",
|
||||||
"displayName": "Makefile Tools",
|
"displayName": "Makefile Tools",
|
||||||
"description": "Provide makefile support in VS Code: C/C++ IntelliSense, build, debug/run.",
|
"description": "Provide makefile support in VS Code: C/C++ IntelliSense, build, debug/run.",
|
||||||
"version": "0.1.1",
|
"version": "0.1.2",
|
||||||
"publisher": "ms-vscode",
|
"publisher": "ms-vscode",
|
||||||
"preview": true,
|
"preview": true,
|
||||||
"icon": "res/makefile-logo.png",
|
"icon": "res/makefile-logo.png",
|
||||||
|
@ -349,7 +349,7 @@
|
||||||
"makefile.configurationCachePath": {
|
"makefile.configurationCachePath": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "The path to a cache file storing the output of the last dry-run make command",
|
"description": "The path to a cache file storing the output of the last dry-run make command",
|
||||||
"default": "./configurationCache.log",
|
"default": ".vscode/configurationCache.log",
|
||||||
"scope": "resource"
|
"scope": "resource"
|
||||||
},
|
},
|
||||||
"makefile.dryrunSwitches": {
|
"makefile.dryrunSwitches": {
|
||||||
|
|
|
@ -770,7 +770,7 @@ export async function initFromStateAndSettings(): Promise<void> {
|
||||||
if (extension.getState().configureDirty && configureOnEdit) {
|
if (extension.getState().configureDirty && configureOnEdit) {
|
||||||
if ((extension.getCompletedConfigureInSession())
|
if ((extension.getCompletedConfigureInSession())
|
||||||
&& !make.blockedByOp(make.Operations.configure, false)) {
|
&& !make.blockedByOp(make.Operations.configure, false)) {
|
||||||
logger.message("Configuring clean after settings or makefile changes...");
|
logger.message("Configuring after settings or makefile changes...");
|
||||||
make.configure(make.TriggeredBy.configureAfterEditorFocusChange); // this sets configureDirty back to false if it succeeds
|
make.configure(make.TriggeredBy.configureAfterEditorFocusChange); // this sets configureDirty back to false if it succeeds
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -325,7 +325,7 @@ function parseLineAsTool(
|
||||||
return {
|
return {
|
||||||
pathInMakefile: toolPathInMakefile,
|
pathInMakefile: toolPathInMakefile,
|
||||||
fullPath: toolFullPath,
|
fullPath: toolFullPath,
|
||||||
arguments: match[3],
|
arguments: match[match.length - 1],
|
||||||
found: toolFound
|
found: toolFound
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ export function logEvent(eventName: string, properties?: Properties, measures?:
|
||||||
}
|
}
|
||||||
|
|
||||||
// Allow-lists for various settings.
|
// Allow-lists for various settings.
|
||||||
function filterSetting(value: any, key: string) : string {
|
function filterSetting(value: any, key: string, defaultValue: string) : string {
|
||||||
if (key === "makefile.dryrunSwitches") {
|
if (key === "makefile.dryrunSwitches") {
|
||||||
let dryrunSwitches: string[] = value;
|
let dryrunSwitches: string[] = value;
|
||||||
let filteredSwitches: string[] | undefined = dryrunSwitches.map(sw => {
|
let filteredSwitches: string[] | undefined = dryrunSwitches.map(sw => {
|
||||||
|
@ -85,6 +85,15 @@ function filterSetting(value: any, key: string) : string {
|
||||||
return filteredSwitches.join(";");
|
return filteredSwitches.join(";");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Even if the key represents a setting that shouldn't share its value,
|
||||||
|
// we can still record if it is undefined by the user (removed from settings.json)
|
||||||
|
// or equal to the default we set in package.json.
|
||||||
|
if (!value) {
|
||||||
|
return "undefined";
|
||||||
|
} else if (value === defaultValue) {
|
||||||
|
return defaultValue;
|
||||||
|
}
|
||||||
|
|
||||||
return "...";
|
return "...";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,7 +170,9 @@ function filterKey(key: string): string {
|
||||||
// inaccurate or incomplete telemetry information for makefile and launch configurations.
|
// inaccurate or incomplete telemetry information for makefile and launch configurations.
|
||||||
// This is not very critical since any of their state changes will update telemetry for them.
|
// This is not very critical since any of their state changes will update telemetry for them.
|
||||||
export function analyzeSettings(setting: any, key: string, propSchema: any, ignoreDefault: boolean, telemetryProperties: Properties | null): Properties | null {
|
export function analyzeSettings(setting: any, key: string, propSchema: any, ignoreDefault: boolean, telemetryProperties: Properties | null): Properties | null {
|
||||||
let type : string = typeof (setting);
|
// type can be undefined if setting is null,
|
||||||
|
// which happens when the user removes that setting.
|
||||||
|
let type : string | undefined = setting ? typeof (setting) : undefined;
|
||||||
let jsonType : string | undefined = propSchema.type ? propSchema.type : undefined;
|
let jsonType : string | undefined = propSchema.type ? propSchema.type : undefined;
|
||||||
|
|
||||||
// Skip anything else if the current setting represents a function.
|
// Skip anything else if the current setting represents a function.
|
||||||
|
@ -179,8 +190,10 @@ export function analyzeSettings(setting: any, key: string, propSchema: any, igno
|
||||||
// The type "array" defined in package.json is seen as object by the workspace setting type.
|
// The type "array" defined in package.json is seen as object by the workspace setting type.
|
||||||
// Not all package.json constructs have a type (example: configuration properties list)
|
// Not all package.json constructs have a type (example: configuration properties list)
|
||||||
// but the workspace setting type sees them as object.
|
// but the workspace setting type sees them as object.
|
||||||
if (jsonType !== type && jsonType !== undefined && (type !== "object" || jsonType !== "array")) {
|
if (jsonType !== type &&
|
||||||
logger.message(`Settings versus package.json type mismatch for "${key}".`);
|
jsonType !== undefined && type !== undefined &&
|
||||||
|
(type !== "object" || jsonType !== "array")) {
|
||||||
|
logger.message(`Settings versus package.json type mismatch for "${key}".`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Enum values always safe to report.
|
// Enum values always safe to report.
|
||||||
|
@ -212,14 +225,14 @@ export function analyzeSettings(setting: any, key: string, propSchema: any, igno
|
||||||
// Apply allow-lists for strings.
|
// Apply allow-lists for strings.
|
||||||
case "string":
|
case "string":
|
||||||
if (telemetryProperties) {
|
if (telemetryProperties) {
|
||||||
telemetryProperties[filterKey(key)] = filterSetting(setting, key);
|
telemetryProperties[filterKey(key)] = filterSetting(setting, key, propSchema.default);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "array":
|
case "array":
|
||||||
// We are interested in logging arrays of basic types
|
// We are interested in logging arrays of basic types
|
||||||
if (telemetryProperties && propSchema.items.type !== "object" && propSchema.items.type !== "array") {
|
if (telemetryProperties && propSchema.items.type !== "object" && propSchema.items.type !== "array") {
|
||||||
telemetryProperties[filterKey(key)] = filterSetting(setting, key);
|
telemetryProperties[filterKey(key)] = filterSetting(setting, key, propSchema.default);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* falls through */
|
/* falls through */
|
||||||
|
|
Загрузка…
Ссылка в новой задаче