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

Definition mismatch between Cvariant in pdsc and component in cproject yml file #600

Closed
jeromecoutant opened this issue Nov 25, 2022 · 8 comments · Fixed by #732
Closed
Assignees
Labels
cmsis-toolbox 2 Features in scope for "stable" baseline CMSIS-Toolbox discussion done indicates an issue's discussion is completed

Comments

@jeromecoutant
Copy link
Contributor

From https://github.com/Open-CMSIS-Pack/Open-CMSIS-Pack-Spec/blob/main/schema/PACK.xsd#L329
Seems that variant name could be a string "with no condition"

In https://github.com/Open-CMSIS-Pack/devtools/blob/main/tools/projmgr/schemas/common.schema.json#L340
component and variant name are not "full" string and doesn't accept "(" for example

@jkrech
Copy link
Member

jkrech commented Nov 29, 2022

@jeromecoutant this is something to discuss for all parts of the componentID.
Probably this should become a change request for the PACK.xsd schema to restrict the allowed characters and then align them with cproject/clayer schema file.

What exact requirements do you have/see?

[\-_a-zA-Z0-9]

@jeromecoutant
Copy link
Contributor Author

jeromecoutant commented Dec 2, 2022

Maybe space ?

edit: and "/" ?

ex:

ARM.CMSIS.pdsc:    <component Cclass="Device" Cgroup="Startup" Cvariant="C Startup"
Keil/MDK-Middleware/7.15.0/Keil.MDK-Middleware.pdsc:      <component Cgroup="CORE" Cvariant="IPv4/IPv6 Release"

@jkrech
Copy link
Member

jkrech commented Dec 6, 2022

Analyzing current package descriptions listed in https://www.keil.com/pack/index.pidx we find in:
Cbundle, Cclass, Cgroup, Csub, Cvariant

A-Za-z0-9
space
_ - + . :' ( ) /

In conditions we additionally find * ?

No leading: space - + . ' / ( ) found

: today found in some Csub component descriptions is used as separator for component reference names in yml.

If we limit the use of : to Csub the parts should still be uniquely identified:

[Cvendor::] Cclass [&Cbundle] :Cgroup [:Csub] [&Cvariant] [@[~ | >=]Cversion]

because once Csub starts any further : needs to be considered being part of Csub.

@ReinhardKeil ReinhardKeil added the discussion Indicates an issue being in discussion label Jan 2, 2023
@ReinhardKeil
Copy link
Collaborator

@jkrech can we come to a conclusion here? Are there changes suggested? What exactly should change?

@jkrech jkrech added discussion done indicates an issue's discussion is completed cmsis-toolbox 2 Features in scope for "stable" baseline CMSIS-Toolbox and removed discussion Indicates an issue being in discussion labels Jan 17, 2023
@jkrech
Copy link
Member

jkrech commented Jan 17, 2023

Both the Pack Schema File (https://github.com/Open-CMSIS-Pack/Open-CMSIS-Pack-Spec/tree/main/schema) as well as the csolution, cproject, clayer json schema files (https://github.com/Open-CMSIS-Pack/devtools/tree/main/tools/projmgr/schemas) shall be refined to restrict the allowed characters in componentIDs and to align on the exact same restrictions.

<xs:pattern value="[A-Za-z0-9_-+ . :' \(\)/ ]*"

jkrech added a commit to Open-CMSIS-Pack/Open-CMSIS-Pack-Spec that referenced this issue Feb 6, 2023
@jkrech
Copy link
Member

jkrech commented Feb 6, 2023

@soumeh01, could you please check the restrictions now present in PACK.xsd and match them with the componentID schema for the yml files so we are consistent.

@jkrech
Copy link
Member

jkrech commented Feb 21, 2023

Will be part of cmsis-toolbox 1.5.0

@jkrech jkrech linked a pull request Feb 27, 2023 that will close this issue
@jkrech jkrech closed this as completed Feb 27, 2023
@jkrech
Copy link
Member

jkrech commented Feb 27, 2023

fixed in CMSIS-Toolbox 1.5.0

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 discussion done indicates an issue's discussion is completed
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants