Open-CMSIS-Pack / devtools

Open-CMSIS-Pack development tools - C++
Apache License 2.0
74 stars 57 forks source link

Review `cbuild setup` flow for Reference Applications #1664

Closed ReinhardKeil closed 1 month ago

ReinhardKeil commented 3 months ago

The Problem To Be Solved

Explore the complete user end-to-end scenario with Reference Examples.

When a user starts with a reference application (i.e. Sensor SDK) it should be assumed that no pack is installed on the local computer. On the local computer only the reference application (csolution.yml) is there that refers to some packs (i.e. NXP::ISSDK) in the cproject.yml and is configured for a board (with BSP and DFP pack references).

The user (or IDE) steps so far:

Then the command cbuild setup *.csolution.yml --update-rte --packs --context-set is used to:

The user (or IDE) can then add this missing information to the *.csolution.yml.

The next step could be:

Does this flow make sense?

We should also consider an offline mode where packs are not download (--packs option not applied). What error messages are issued to the user in case of missing packs. Can these be displayed nicely in an IDE?

brondani commented 3 months ago

For the command cbuild setup I was expecting the argument --update-rte enabled by default, as agreed in https://github.com/Open-CMSIS-Pack/devtools/issues/1265. Was it intentionally kept optional?

ReinhardKeil commented 3 months ago

I was not aware that option defaults for cbuild depend on a command, hence I used explicitly --update-rte.

Should we really make defaults different depending on a command?

brondani commented 3 months ago

It has been requested that the build operation should not touch user input files/directories, due to the fact when consumed by an online build service the user workspace has read-only permissions. On the other hand as part of project management, and therefore before the building phase, the csolution convert updates RTE files by default. This has been the behaviour historically. Of course it's not written on stone and can be changed if there is a good reason.

However having cbuild setup as a mandatory step in the workflow and having the update-rte behaviour as it was agreed previously, the suggested calls sequence could be simplified: Verify setup with cbuild setup *.csolution.yml --packs --context-set (does the update-rte implicitly) Build project with cbuild *.csolution.yml --context-set (RTE files and packs are already updated in the setup phase)

ReinhardKeil commented 1 month ago

This is implemented.