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.
|
||||
|
||||
## 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
|
||||
|
||||
- Addressed feedback from 0.1
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"name": "makefile-tools",
|
||||
"displayName": "Makefile Tools",
|
||||
"description": "Provide makefile support in VS Code: C/C++ IntelliSense, build, debug/run.",
|
||||
"version": "0.1.1",
|
||||
"version": "0.1.2",
|
||||
"publisher": "ms-vscode",
|
||||
"preview": true,
|
||||
"icon": "res/makefile-logo.png",
|
||||
|
@ -349,7 +349,7 @@
|
|||
"makefile.configurationCachePath": {
|
||||
"type": "string",
|
||||
"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"
|
||||
},
|
||||
"makefile.dryrunSwitches": {
|
||||
|
|
|
@ -770,7 +770,7 @@ export async function initFromStateAndSettings(): Promise<void> {
|
|||
if (extension.getState().configureDirty && configureOnEdit) {
|
||||
if ((extension.getCompletedConfigureInSession())
|
||||
&& !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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -325,7 +325,7 @@ function parseLineAsTool(
|
|||
return {
|
||||
pathInMakefile: toolPathInMakefile,
|
||||
fullPath: toolFullPath,
|
||||
arguments: match[3],
|
||||
arguments: match[match.length - 1],
|
||||
found: toolFound
|
||||
};
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ export function logEvent(eventName: string, properties?: Properties, measures?:
|
|||
}
|
||||
|
||||
// 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") {
|
||||
let dryrunSwitches: string[] = value;
|
||||
let filteredSwitches: string[] | undefined = dryrunSwitches.map(sw => {
|
||||
|
@ -85,6 +85,15 @@ function filterSetting(value: any, key: string) : string {
|
|||
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 "...";
|
||||
}
|
||||
|
||||
|
@ -161,7 +170,9 @@ function filterKey(key: string): string {
|
|||
// 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.
|
||||
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;
|
||||
|
||||
// Skip anything else if the current setting represents a function.
|
||||
|
@ -179,7 +190,9 @@ 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.
|
||||
// Not all package.json constructs have a type (example: configuration properties list)
|
||||
// but the workspace setting type sees them as object.
|
||||
if (jsonType !== type && jsonType !== undefined && (type !== "object" || jsonType !== "array")) {
|
||||
if (jsonType !== type &&
|
||||
jsonType !== undefined && type !== undefined &&
|
||||
(type !== "object" || jsonType !== "array")) {
|
||||
logger.message(`Settings versus package.json type mismatch for "${key}".`);
|
||||
}
|
||||
|
||||
|
@ -212,14 +225,14 @@ export function analyzeSettings(setting: any, key: string, propSchema: any, igno
|
|||
// Apply allow-lists for strings.
|
||||
case "string":
|
||||
if (telemetryProperties) {
|
||||
telemetryProperties[filterKey(key)] = filterSetting(setting, key);
|
||||
telemetryProperties[filterKey(key)] = filterSetting(setting, key, propSchema.default);
|
||||
}
|
||||
break;
|
||||
|
||||
case "array":
|
||||
// We are interested in logging arrays of basic types
|
||||
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;
|
||||
}
|
||||
/* falls through */
|
||||
|
|
Загрузка…
Ссылка в новой задаче