From 3bdc9f22ce119f856a3e809a1ab813d92f59dc17 Mon Sep 17 00:00:00 2001 From: Lou Amadio Date: Thu, 15 Jul 2021 13:07:42 -0700 Subject: [PATCH] Dev/lamadio/container fixes (#501) * Change was dropped, and missing symlink for colcon * Better way of detecting a colcon workspace --- src/build-tool/catkin.ts | 2 +- src/build-tool/colcon.ts | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/build-tool/catkin.ts b/src/build-tool/catkin.ts index 36e376ce..05d90116 100644 --- a/src/build-tool/catkin.ts +++ b/src/build-tool/catkin.ts @@ -8,7 +8,7 @@ import * as common from "./common"; import * as rosShell from "./ros-shell"; function makeCatkin(command: string, args: string[], category?: string): vscode.Task { - const task = rosShell.make({type: command, command, args: ['--directory', extension.baseDir, ...args]}, category) + const task = rosShell.make({type: command, command, args: ['--directory', extension.baseDir, '-DCMAKE_BUILD_TYPE=RelWithDebInfo',...args]}, category) task.problemMatchers = ["$catkin-gcc"]; return task; diff --git a/src/build-tool/colcon.ts b/src/build-tool/colcon.ts index f4d33e81..7dcb55f2 100644 --- a/src/build-tool/colcon.ts +++ b/src/build-tool/colcon.ts @@ -10,8 +10,9 @@ import * as common from "./common"; import * as rosShell from "./ros-shell"; function makeColcon(command: string, verb: string, args: string[], category?: string): vscode.Task { - const task = rosShell.make({type: command, command, args: [verb, '--base-paths', extension.baseDir, `--cmake-args`, `-DCMAKE_BUILD_TYPE=RelWithDebInfo`,...args]}, + const task = rosShell.make({type: command, command, args: [verb, '--symlink-install', '--event-handlers', 'console_cohesion+', '--base-paths', extension.baseDir, `--cmake-args`, `-DCMAKE_BUILD_TYPE=RelWithDebInfo`,...args]}, category) + task.problemMatchers = ["$catkin-gcc"]; return task; } @@ -36,13 +37,13 @@ export class ColconProvider implements vscode.TaskProvider { } export async function isApplicable(dir: string): Promise { - const srcDir = path.join(dir, "src", "*") let colconCommand: string; + const srcDir = path.join(dir, "src") if (process.platform === "win32") { - colconCommand = `colcon --log-base nul list --paths "\"${srcDir}\"`; + colconCommand = `colcon --log-base nul list --base-paths \"${srcDir}\"`; } else { - colconCommand = `colcon --log-base /dev/null list --paths "\"${srcDir}\"`; + colconCommand = `colcon --log-base /dev/null list --base-paths ${srcDir}`; } const { stdout, stderr } = await child_process.exec(colconCommand);