Open-CMSIS-Pack / devtools

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

Clarify the difference between add-path and files with include category #1300

Open mcgordonite opened 9 months ago

mcgordonite commented 9 months ago

Describe The Problem To Be Solved

The Toolbox documentation specifies two ways to add to the include path:

  1. The add-path property.
  2. A file with category "include": https://github.com/Open-CMSIS-Pack/devtools/blob/76d2052c3a5e5898e3cc17f0b61fadedf610e823/tools/projmgr/schemas/common.schema.json#L488-L491

The documentation could be clearer on which is the preferred method.

(Optional): Suggest A Solution

The file categories are in the schema but not documented in the user guide. Should they be removed from the schema?

jkrech commented 9 months ago

The description of FileCategoryType mentions that it is used for component files and therefore are used in *.cbuild.yml files in the context of component node but not in csolution, cproject or clayer CMSIS solution project files.

mcgordonite commented 9 months ago

The description of FileCategoryType mentions that it is used for component files and therefore are used in *.cbuild.yml files in the context of component node but not in csolution, cproject or clayer CMSIS solution project files.

In the schema, FileCategoryType is used in FileType, which is eventually used by GroupsType to describe the user files in cproject or clayer files. Perhaps there's an error there, and there should be two different FileType definitions in the schema.

jkrech commented 9 months ago

@mcgordonite is this a blocker for you? What is the impact? Does this need to be fixed in 2.3.0

mcgordonite commented 9 months ago

This is not a blocker, but it is potentially redundancy in the spec that might confuse users. Not required for 2.3.0 if it won't fit.

jkrech commented 6 months ago

@mcgordonite , @soumeh01 is this just a modification required in the schema? Matt would you have bandwidth to create a PR?

brondani commented 5 months ago

As per my comment in #1471 the include and other includeX enums could/should be removed from the schema for input user files, since add-path is preferred for the same purpose. However the removal of enums from the schema potentially breaks backward compatibility, for this reason I would suggest to reject the PR which anyway needs rework and postpone the change to the next major increase.