Open-CMSIS-Pack / devtools

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

[csolution]: minor issue: $SolutionDir()$ is not expanded when used in cproject.yml `layer:` node #1765

Open ReinhardKeil opened 2 months ago

ReinhardKeil commented 2 months ago

Describe the bug

In cproject.yml files, the layer: node seems not to accept classic access sequences.

To Reproduce

Use a reference application and change the layers: in the cproject.yml file as follows:

  layers:
#   - layer: $Board-Layer$                                           # works
#   - layer: ../Board/B-U585I-IOT02A/Board.clayer.yml                # works
    - layer: $SolutionDir()$/Board/B-U585I-IOT02A/Board.clayer.yml   # fails
      type: Board

Environment:

brondani commented 2 months ago

This is intended behavior, in the current specification layer: is not among the nodes that accept access sequences: https://github.com/Open-CMSIS-Pack/cmsis-toolbox/blob/main/docs/YML-Input-Format.md#access-sequences layer: must be a relative path to the *.cproject.yml file where it is defined and it can be indirectly defined via variables.

jkrech commented 2 months ago

Are there any objections to extend the specification to also support Access Sequences in layers, e.g. assuming that no layer detection but solution and/or context specific layers should be selected? Any potential for "over engineering"?