Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[csolution] Syntax problem in *.yml file not caught; generates error at CMake level #1937

Open
ReinhardKeil opened this issue Jan 29, 2025 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@ReinhardKeil
Copy link
Collaborator

ReinhardKeil commented Jan 29, 2025

The *.cproject.yml file contains

        - CMSIS_device_header: \"sam.h\

instead of

        - CMSIS_device_header: \"sam.h\"

This problem is not flagged by csolution. Instead it generates a CMake error that cannot be understood.

CMake Error at CMakeLists.txt:51:
  Parse error.  Function missing ending ")".  Instead found bad character
  with text "\".

To Reproduce

Use Test.zip project and run cbuild test.csolution.yml --context-set.

Environment (please complete the following information):

  • CMSIS-Toolbox 2.7.0
  • OS: Windows
@ReinhardKeil ReinhardKeil added the bug Something isn't working label Jan 29, 2025
@brondani
Copy link
Collaborator

A missing quote would be a yml syntax problem, however in this case it is valid because the quote is escaped so it is treated as any other allowed character.
Can we safely assume that every opening escaped quote must have a corresponding closing one? Should the tool throw an error or rather a warning?

@ReinhardKeil
Copy link
Collaborator Author

ReinhardKeil commented Jan 29, 2025

Can we safely assume that every opening escaped quote must have a corresponding closing one?

For define: yes

@brondani brondani moved this to Todo in CMSIS-Toolbox 2.8.0 Jan 30, 2025
@jkrech jkrech changed the title Syntax problem in *.yml file not catch; generates error at CMake level [csolution] Syntax problem in *.yml file not caught; generates error at CMake level Feb 4, 2025
@brondani brondani assigned soumeh01 and unassigned brondani Feb 12, 2025
@soumeh01 soumeh01 moved this from Todo to In Progress in CMSIS-Toolbox 2.8.0 Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: In Progress
Development

No branches or pull requests

3 participants