Skip to content

Commit

Permalink
Dev/lamadio/container fixes (#501)
Browse files Browse the repository at this point in the history
* Change was dropped, and missing symlink for colcon

* Better way of detecting a colcon workspace
  • Loading branch information
ooeygui authored Jul 15, 2021
1 parent ad5823c commit 3bdc9f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/build-tool/catkin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 5 additions & 4 deletions src/build-tool/colcon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -36,13 +37,13 @@ export class ColconProvider implements vscode.TaskProvider {
}

export async function isApplicable(dir: string): Promise<boolean> {
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);
Expand Down

0 comments on commit 3bdc9f2

Please sign in to comment.