Open-CMSIS-Pack / devtools

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

Why generating cprj when gpdsc is missing ? #337

Closed fred-r closed 2 years ago

fred-r commented 2 years ago
> csolution.exe -s gpio-toggle.csolution.yml convert
...\STM32_basic_trace.gpdsc - warning csolution: generator 'STM32Cube_BasicTrace_CodeGen' from component 'STMicroelectronics::Utility:Debug:basic trace&Configurable@0.0.1': reading gpdsc failed
...\STM32_basic_trace.gpdsc - warning csolution: generator 'STM32Cube_BasicTrace_CodeGen' from component 'STMicroelectronics::Utility:Debug:basic trace&Configurable@0.0.1': reading gpdsc failed
...\STM32_basic_trace.gpdsc - warning csolution: generator 'STM32Cube_BasicTrace_CodeGen' from component 'STMicroelectronics::Utility:Debug:basic trace&Configurable@0.0.1': reading gpdsc failed
.../gpio-toggle.AC6+B-U585I-IOT02A.cprj - info csolution: file generated successfully
.../gpio-toggle.GCC+B-U585I-IOT02A.cprj - info csolution: file generated successfully
.../gpio-toggle.IAR+B-U585I-IOT02A.cprj - info csolution: file generated successfully

==> why generating a cprj which might be wrong as the gpdsc is missing ?

brondani commented 2 years ago

The behaviour here is coherent with all other dependency evaluation failings that throw a warning and proceed with the CPRJ generation.

@fred-r @jkrech What is your expectation? All such cases should have error severity or only missing gpdsc should be an error and other dependency failings are warnings?

fred-r commented 2 years ago

In fact to me this should not be a warning. The project manager (csolution) determines that the project is not complete because generators need to be run. So I think that generating a CPRJ for an incomplete project is a bit misleading ?

Or maybe we can do so but the warning should concern the cprj as well to indicate it deals with an incomplete project.

I would prefer that csolution reports the generators to be invoked.

jkrech commented 2 years ago

@brondani I tend to agree that a failure of reading the gpdsc file is as if a specified component cannot be found. This should be an error. Whether or not to continue continue generating the cprj file is probably a separate discussion. If you continue the generation is must be clear from the message that a cprj file was created but that there have been errors.

brondani commented 2 years ago

@fred-r This should have been fixed, can you please test it with the latest CMSIS-Toolbox? Thanks!