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

[projmgr] enforced component selection using extended component identifier #774

Closed
jkrech opened this issue Feb 28, 2023 · 6 comments
Closed
Assignees
Labels
cmsis-toolbox 2 Features in scope for "stable" baseline CMSIS-Toolbox csolution csolution management tool documentation Improvements or additions to documentation enhancement New feature or request proposal Proposal for change or extension

Comments

@jkrech
Copy link
Member

jkrech commented Feb 28, 2023

The fundamental principle of CMSIS-Pack components is that componentIDs are unique after the filter conditions for each component have been checked.
This proposal is introducing a way to uniquely identify a component independently of the filter conditions by specifying the full <packID> and <conditionID> in addition to the <componentID>.

Extend the components node in cproject.yml/clayer.yml :

  components:
    - component: <componentID>
      from-pack: <packID>
      condition: <conditionID>

Note: this is the notation being used in cbuild.yml already today.

A component with such an extended component identifier will be always be included in the processing, regardless of the result of the condition evaluation just like any other component.

  • convert (write: *.cprj, *.cbuild.yml)
  • generator (read: *.cbuild.yml)
  • build (read: *.cprj)

If several components with the same <componentID> exist in the pack, it is required to add the <conditionID> to identify the exact component to be included otherwise an error will be issued.

@jkrech jkrech added documentation Improvements or additions to documentation enhancement New feature or request csolution csolution management tool proposal Proposal for change or extension cmsis-toolbox 2 Features in scope for "stable" baseline CMSIS-Toolbox labels Feb 28, 2023
@edriouk
Copy link
Collaborator

edriouk commented Mar 15, 2023

I've got some remarks and questions to this issue:

  1. I would suggest using term "primary key" for full component identification, similar to relational database model
  2. Should the tool issue a warning if the enforced component does not pass filtering?
  3. Should the component's files be filtered or also enforced?
  4. May two or more components be enforced if they belong to the same exclusive API or cause conflicts?
  5. Should generated components have priority over the enforced ones?

@jkrech
Copy link
Member Author

jkrech commented Mar 20, 2023

  1. "primary component ID" to make it more specific to the subject
  2. probably not by default but maybe in a dedicated validation mode or verbose mode of list dependencies ?
  3. In the absence of the condition evaluation, we have no criteria to choose the files. I suggest not to copy configuration files that have a condition
  4. In my view, having multiple components being selected for a single exclusive "api" needs to be checked and reported regardless how a component is specified.
  5. Similar to point 4 I think we should not have different rules ... but open for feedback.

@ReinhardKeil
Copy link
Collaborator

  1. component + condition must be unique for the selected meaning that just one component fulfills this filter.
  2. specifying a pack: for a component bypasses component filtering by conditions.
  3. I believe we should copy config files for the component for consistency, but open for discussion.
  4. yes that should cause a conflict (-> error or warning message)
  5. when a pack: is specified, the component is taken from the pack:; if there is a conflict with other components issue error or warning.

@mcgordonite
Copy link

In the absence of the condition evaluation, we have no criteria to choose the files. I suggest not to copy configuration files that have a condition

I believe that all files from a component can have conditions, not just config files. E.g. two copies of the "same" source file, one for ARMC6 and one for GCC. In that case I think we'd need to take some filtering into account when running the build.

@ReinhardKeil
Copy link
Collaborator

@mcgordonite you are right, so a filter for conditions at file level needs to be applied.

grasci-arm pushed a commit to ARM-software/devtools that referenced this issue Apr 20, 2023
…-CMSIS-Pack#774 (Open-CMSIS-Pack#516)

* enforced component selection using extended component identifier Open-CMSIS-Pack#774

Co-authored-by: Evgueni Driouk <evgueni.driouk@arm.com>
edriouk pushed a commit that referenced this issue Apr 20, 2023
…#516) (#850)

* enforced component selection using extended component identifier #774

Co-authored-by: Evgueni Driouk <evgueni.driouk@arm.com>
@jkrech jkrech changed the title [projmgr] enforced component selection using extended component identifier (proposal) [projmgr] enforced component selection using extended component identifier Apr 24, 2023
@jkrech
Copy link
Member Author

jkrech commented May 8, 2023

@slhultgren please review the updated implementation for 1.7.0 and raise a new issue in case this does not meet your expectations.

@jkrech jkrech closed this as completed May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmsis-toolbox 2 Features in scope for "stable" baseline CMSIS-Toolbox csolution csolution management tool documentation Improvements or additions to documentation enhancement New feature or request proposal Proposal for change or extension
Projects
No open projects
Status: Done
Development

No branches or pull requests

4 participants