-
Notifications
You must be signed in to change notification settings - Fork 60
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
Pack version does not include meta-data in cbuild*.yml
files
#1339
Comments
cbuild*.yml
files
According to Semantic Versioning meta data should be ignored by any comparison making the following versions equal It is possible to obtain meta-data from corresponding pack object by calling |
cbuild*.yml
filescbuild*.yml
files
cbuild*.yml
filescbuild*.yml
files
Hi @edriouk, According to https://semver.org, it's defining that build metadata should not be used for precedence, however, equality is equality and not the same as precedence. So, from understanding is that we need to store also the metadata in the cbuild*.yml files to ensure that the same pack will be selected next time when using the cbuild-pack.yml file. |
@Torbjorn-Svensson , you cannot install a pack with exact meta-data even if you know it, and it is not possible to install two pack versions that only differ by meta data. |
This seems to work when using This is the content of the pack root after adding the pack:
The pack named As far as I can tell, cpackget does the right thing and treat them as 2 different entities. |
cpackget behavior is actually a bug. Our pack infrastructure does not allow to use meta-data. It should not appear neither in directory nor in file names because other tools ignore that. |
Should we remove the support for the meta part from https://github.com/Open-CMSIS-Pack/devtools/blob/main/tools/projmgr/schemas/common.schema.json#L1071 and https://github.com/Open-CMSIS-Pack/Open-CMSIS-Pack-Spec/blob/main/schema/PACK.xsd#L1784 to help that it should not be used to identify the packs. Seems we could close this issue as "invalid" in that case as there should never be 2 packs published that only differs in meta? |
Yes, we can close this issue. I believe we should remove meta part from YAML scheme, but leave it for pdsc one. The latter can be useful for the pack publisher. |
I think we could still accept the build metadata in the schema but strip it when parsing/handling pack versions. On the other hand removing it from the schema would make it clear to the project developer that build metadata is not handled, but strictly speaking changes that can potentially break existing projects are not backward compatible and therefore require a major version increment. |
Following the discussion we had during this week Open-CMSIS-pack call, we aligned internally in ST and we concluded that we support Daniel's proposal:
Side comment: Reinhard pointed to Open-CMSIS-Spec related to Semantic versioning usage, "Build metadata" is mentioned this way in the SemVer spec however it is possible -and ST does it - to use this possibility to use metadata to have other tag than ".build.xxx" see example in the first post of this thread :
so I was wondering if in the Open-CMSIS-Pack spec, we could indicate just "metadata" rather than "Build metadata" to reflect this possibility |
I suggest that the CMSIS project uses the rules of Sematic Versioning 2.0. IMHO this means:
Public index files should not support I believe there is not "golden" way, but we should align in the way how |
Strip build metadata when handling pack versions. Throw a warning when specified metadata does not match the one from the loaded pack. Addresses #1339 (comment) Co-authored-by: Daniel Brondani <[email protected]>
I think we should be careful when talking about also ignoring the First, back on build-metadata, Semver.org only talks about precedence, not identification. Which means that there is no way to reliably determine which build-metadata is the "newest". This makes sense since one use-case for build-metadata is to e.g. put a git-commit hash in it, which means sorting as string would give unreliable results. (IMO this still could leave the option to still use it for identification, but I can agree, since precedence is unclear, let's say we always ignore it even for identification) For For this reason, we need to keep the same guarantees of stability that we have with the cbuild-pack.yml. It is fairly likely that alpha/beta packs are not exactly identical as final released ones. |
Sorry, got closed when merged a PR. |
@slhultgren here is the scenario that I believe we should support: pre-release information
How do you want to overcome this complexity when pre-release is part of build metadata Let's agree on these topics. |
Proposal: Add a new
This command always processes all This command shall be executed prior to committing solutions for distribution via packs. Simply removing the pre-release qualifier from |
This somewhat conflicts with #1450 - item 2. I would like to come to a conclusion as currently |
@jeromecoutant the initial problem is fixed in CMSIS-Toolbox 2.3.0 - hence I'm closing this isssue. Feel free to reopen if you disagree. #1484 now captures the proposal of a |
Hi
I got an issue during the convert procedure with packs with a version with metadata
csolution.yml file:
- pack: STMicroelectronics::mw_mbed_crypto
$ grep mw_mbed_crypto $CMSIS_PACK_ROOT/.Local/local_repository.pidx
<pdsc vendor="STMicroelectronics" name="mw_mbed_crypto" version="2.28.4+st.0.1.1" url="file:///C:/xxx/"/>
$ csolution convert -s xxx.csolution.yml -c xxx.GCC+B-U585I-IOT02A
generated cprj file has correct information:
<package name="mw_mbed_crypto" vendor="STMicroelectronics" version="2.28.4+st.0.1.1:2.28.4+st.0.1.1"/>
But generated cbuild-pack.yml is wrong:
- resolved-pack: STMicroelectronics::[email protected]
And generated cbuild.yml as well:
- pack: STMicroelectronics::[email protected]
csolution 2.2.1 for Windows
The text was updated successfully, but these errors were encountered: