Various small fixes for 0.2.1 (#150)
* Various small fixes for 0.2.1 * Some tuning of showing/hiding output channel.
This commit is contained in:
Родитель
4a02fb0df3
Коммит
a157d1aae0
|
@ -493,7 +493,7 @@ export function getCommandForConfiguration(configuration: string | undefined): v
|
|||
let makefileUsed: string | undefined = makefileConfiguration?.makefilePath || makefilePath;
|
||||
if (makefileUsed) {
|
||||
configurationMakeArgs.push("-f");
|
||||
configurationMakeArgs.push(makefileUsed);
|
||||
configurationMakeArgs.push(`"${makefileUsed}"`);
|
||||
// Need to rethink this (GitHub 59).
|
||||
// Some repos don't work when we automatically add -C, others don't work when we don't.
|
||||
// configurationMakeArgs.push("-C");
|
||||
|
|
|
@ -36,6 +36,7 @@ export class CppConfigurationProvider implements cpp.CustomConfigurationProvider
|
|||
|
||||
if (!sourceFileConfiguration) {
|
||||
logger.message(`Configuration for file ${norm_path} was not found. CppTools will set a default configuration.`);
|
||||
logger.showOutputChannel();
|
||||
}
|
||||
|
||||
return sourceFileConfiguration;
|
||||
|
|
22
src/make.ts
22
src/make.ts
|
@ -293,6 +293,11 @@ export async function buildTarget(triggeredBy: TriggeredBy, target: string, clea
|
|||
telemetry.logEvent("build", telemetryProperties, telemetryMeasures);
|
||||
|
||||
cancelBuild = false;
|
||||
|
||||
if (retc !== ConfigureBuildReturnCodeTypes.success) {
|
||||
logger.showOutputChannel();
|
||||
}
|
||||
|
||||
return retc;
|
||||
},
|
||||
);
|
||||
|
@ -525,8 +530,6 @@ export async function preConfigure(triggeredBy: TriggeredBy): Promise<number> {
|
|||
return ConfigureBuildReturnCodeTypes.blocked;
|
||||
}
|
||||
|
||||
logger.showOutputChannel();
|
||||
|
||||
let preConfigureStartTime: number = Date.now();
|
||||
|
||||
let scriptFile: string | undefined = configuration.getPreConfigureScript();
|
||||
|
@ -588,6 +591,11 @@ export async function preConfigure(triggeredBy: TriggeredBy): Promise<number> {
|
|||
telemetry.logEvent("preConfigure", telemetryProperties, telemetryMeasures);
|
||||
|
||||
cancelPreConfigure = false;
|
||||
|
||||
if (retc !== ConfigureBuildReturnCodeTypes.success) {
|
||||
logger.showOutputChannel();
|
||||
}
|
||||
|
||||
return retc;
|
||||
},
|
||||
);
|
||||
|
@ -637,11 +645,11 @@ export async function runPreConfigureScript(progress: vscode.Progress<{}>, scrip
|
|||
if (process.platform === 'win32') {
|
||||
runCommand = "cmd";
|
||||
scriptArgs.push("/c");
|
||||
scriptArgs.push(wrapScriptFile);
|
||||
scriptArgs.push(`"${wrapScriptFile}"`);
|
||||
} else {
|
||||
runCommand = "/bin/bash";
|
||||
scriptArgs.push("-c");
|
||||
scriptArgs.push(`"source ${wrapScriptFile}"`);
|
||||
scriptArgs.push(`"source '${wrapScriptFile}"'`);
|
||||
}
|
||||
|
||||
try {
|
||||
|
@ -811,8 +819,6 @@ export async function configure(triggeredBy: TriggeredBy, updateTargets: boolean
|
|||
return ConfigureBuildReturnCodeTypes.saveFailed;
|
||||
}
|
||||
|
||||
logger.showOutputChannel();
|
||||
|
||||
// Same start time for configure and an eventual pre-configure.
|
||||
let configureStartTime: number = Date.now();
|
||||
|
||||
|
@ -991,6 +997,10 @@ export async function configure(triggeredBy: TriggeredBy, updateTargets: boolean
|
|||
if (retc !== ConfigureBuildReturnCodeTypes.cancelled) {
|
||||
extension.setCompletedConfigureInSession(true);
|
||||
}
|
||||
|
||||
if (retc !== ConfigureBuildReturnCodeTypes.success) {
|
||||
logger.showOutputChannel();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -353,7 +353,8 @@ async function parseLineAsTool(
|
|||
}
|
||||
|
||||
return {
|
||||
pathInMakefile: toolPathInMakefile,
|
||||
// don't use join and neither paths/filenames processed above if we want to keep the exact text in the makefile
|
||||
pathInMakefile: match[1] + match[2],
|
||||
fullPath: toolFullPath,
|
||||
arguments: match[match.length - 1],
|
||||
found: toolFound
|
||||
|
@ -875,6 +876,14 @@ export async function parseCustomConfigProvider(cancel: vscode.CancellationToken
|
|||
currentPath = currentPathHistory[currentPathHistory.length - 1];
|
||||
|
||||
let compilerTool: ToolInvocation | undefined = await parseLineAsTool(line, compilers, currentPath);
|
||||
|
||||
// If ccache wraps the compiler, parse again the remaining command line and we should obtain
|
||||
// the real compiler name.
|
||||
if (compilerTool && path.parse(compilerTool.pathInMakefile).name.endsWith("ccache")) {
|
||||
line = line.replace(`${compilerTool.pathInMakefile}`, "");
|
||||
compilerTool = await parseLineAsTool(line, compilers, currentPath);
|
||||
}
|
||||
|
||||
if (compilerTool) {
|
||||
logger.message("Found compiler command: " + line, "Verbose");
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче