@@ -674,7 +674,7 @@ class IdeVSCode(IdeBase):
IdeBase.update_json_file(
self.dot_code_dir(modified_recipe), launch_file, launch_dict)
- def vscode_tasks_binary(self, args, image_recipe, modified_recipe):
+ def vscode_tasks_binary(self, args, image_recipe, modified_recipe, build_task=None):
run_install_deploy = modified_recipe.gen_install_deploy_script(args, image_recipe.nfs_deploy_dir)
install_task_name = "install && deploy-target %s" % modified_recipe.recipe_id_pretty
deploy_args = ["--target", resolve_deploy_target(args, image_recipe.nfs_deploy_dir)]
@@ -689,9 +689,21 @@ class IdeVSCode(IdeBase):
"args": deploy_args,
"problemMatcher": []
}
+ tasks = [build_task] if build_task else []
+ install_task = {
+ "label": install_task_name,
+ "type": "shell",
+ "command": run_install_deploy,
+ "args": deploy_args,
+ "problemMatcher": []
+ }
+ if build_task:
+ install_task["dependsOn"] = [build_task["label"]]
+ install_task["dependsOrder"] = "sequence"
+ tasks.append(install_task)
tasks_dict = {
"version": "2.0.0",
- "tasks": [install_task]
+ "tasks": tasks
}
for cross_debug_config in self.cross_debug_configs:
if cross_debug_config.modified_recipe is not modified_recipe:
Let binary task generation optionally insert a build task and make install/deploy depend on it. Cargo builds outside BitBake, so this ordering ensures its artifacts exist before do_install and deploy-target run. AI-Generated: Uses GitHub Copilot Signed-off-by: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com> --- scripts/lib/devtool/ide_plugins/ide_code.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-)