Open-CMSIS-Pack / devtools

Open-CMSIS-Pack development tools - C++
Apache License 2.0
76 stars 58 forks source link

csolution run creates all contexts, even when just one context is selected #1860

Open ReinhardKeil opened 1 day ago

ReinhardKeil commented 1 day ago

Describe the bug

The csolution run command creates all contexts, even when just one context is selected. This may create unexpected errors that are hard to understand.

To Reproduce

>  csolution run c:\Test\Nov20\Network\Network.csolution.yml -g CubeMX -c BSD_Client.Debug+STM32F746NGHx
error csolution: no component was found with identifier 'Security:mbed TLS'
C:/Test/Nov20/Network/HTTPS_Server/HTTPS_Server.cproject.yml - warning csolution: dependency validation for context 'HTTPS_Server.Debug+STM32F746NGHx' failed:
MISSING Keil::Network&MDK:Service:Web Server Compact&HTTPS@8.0.0
  require Security:mbed TLS@3.1.0

Expected behavior

I propose that only the specified context is generated when using the run command.

Environment (please complete the following information):

brondani commented 1 day ago

Note that all contexts need to be processed in order to find siblings, in other words contexts sharing the same generator id, base-dir and cgen-file. This is along the lines with what has been discussed in https://github.com/Open-CMSIS-Pack/devtools/issues/1812 and https://github.com/ARM-software/vscode-cmsis-csolution/issues/121.