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
CMSIS-Build Gap Analysis #11
Comments
thanks @jkrech for summing up CBuild/CPRJ related notes. I'm just missing the flags override attribute like the 'add' and 'delete' attributes, as far as I remember we were partially OK on this point. is it possible to add this to the GAPs list ? |
@tarek-bochkati good catch. I did miss it above. I have added it to the list of gaps, however I also added the conclusion from the discussion, that in the rare case of an override, this should be achieved by specifying the 'remove' with the complete flags and specifying the complete set of new flags using the 'add' attribute. |
Another item that would be useful, probably in cprj, is how to handle the source code of project components. |
Any initiative to specify static libraries (.a) dependencies order (maybe reading order is way to do today?) ? Kind of corner case but sounds to me required thinking reproducible builds. |
'/cprj/files/.../file' 'name' attribute : do you consider support of some variable describing path to get resource ? Today relative (or absolute path if supported ?) are not helping project structure revisit (resource(s) repository(ies) renaming, move, ...). |
Today files are specified relative to cprj file only, since absolute paths do not allow to relocate the project (projects shall be copied out of packs using a recursive copy of a base folder). Renaming and moving of files is probably a feature that a tool shall provide rather than burdening the project format with? |
Added to the description above. |
Added to the description above. |
Another topic is "lockfile" concept. Since the .cprj file allows working with version ranges, and since the condition resolving of components are non-obvious to users it would be very helpful to record the exact used packs and components in a ".cprj.lock" file. This will allow for a similar workflow as with "package.json/yarn.lock" from NodeJS ecosystem, where the ".cprj" describes what CAN be used, and the ".cprj.lock" describes what IS used. This way, there is no fear when moving a project from one computer to another computer with different CMSIS_PACK_ROOT contents, since the .cprj.lock file will guarantee that we still build with the same contents. |
It seems the "lockfile" would have precisely the content of the file generated with the cbuildgen
@slhultgren can you please confirm it? |
Regarding the lockfile, one feature we had to add to one package manager - related to the lockfile. I could create a new request for it rather than here if interested. Fetch all dependencies that are in the lockfile and store it in the project folder. When we were releasing software, we used to fetch dependencies, basically local copy of all deps - complete software pack. |
@brondani, --update does solve the reprodicibility of builds, but I'm not sure I understand how to actually implement this in my workflow to support the flexibility I want. Basically, I want to have my project description slightly loosely defined (using ranges for packs, not specifying everything for the components I use), while still being able to:
In this case I need to have both a "loose.cprj" and a "updated-fixed.cprj", put both of these in GIT to share, and always build the "updated-fixed.cprj". An issue with this approach to locking (--update) is that it cannot support both reproducible builds in a team and still keeping the project definition fairly loose. Also, having the lockfile separate could allow to make it more explicit as well, e.g. for each component record "$PACK_ID $COMPONENT_ID" where the condition of the component is also shown. That would allow a simple way to locate/identify when some components/files change in the build. @0xc0170 Simplifying offline builds is very interesting also indeed. Did this lockfile also include which components were used? (including the condition that resolved it) |
@slhultgren I believe you misunderstood the
|
@brondani hmm not sure? This will create possibly different lock.cprj files using different Packs on different computers depending on CMSIS_PACK_ROOT contents? I want to avoid this while still keeping my loose description in the project. I thought the --update was a pure output operation, or is it also reading some "locking" information from the --update file? This is pretty standard use case for various package managers where you in the project file describe a range/* for the versions that you want to work with, then the .lock file actually locks to an explicit version, allowing colleagues, CI, to build the same thing. NPM/yarn example again: The yarn.lock is not changed when I just update the scripts section of package.json => similar to I don't want to change the packs used when I just add a -D to my project. I hope this makes sense :) |
@slhultgren It is a pure output operation. In this example Edit: From your example I believe the answer to my very first question is no, the proposed "lockfile" does not have the same content of the generated cprj file. Actually it only stores dependencies version information while the cprj is self-contained. I appreciate there can be vantages/disadvantages even if the scope is similar. Let's discuss it in the meeting. |
@0xc0170 Isn't it just a matter of setting the CMSIS_PACK_ROOT to a project subfolder? |
I don't know if this this @0xc0170 idea, but my understanding would rather be to get all the dependencies (most probably only the applicable subset of CMSIS_PACK_ROOT content for a given project) into the project folder / file system tree so that user can zip it. That process may require to configure the project to point to those local copies thanks to a project-level local_repository.pidx. We think this is something users will want to do. |
We agree, we should have additional locations where packs are stored. Just CMSIS_PACK_ROOT seems not sufficient. Specifically during development of new packs there must be a way to work with other repo's that contain a pack. Also it should be possible to add non-public packs. |
Would come back on:
I'm fully sensitive to reproductible builds argument but sounds to me, if some part of sources are not components, today file base .cprj content is not safe enough. If some not components resources, we may guess some local end user files here. Pointing them explicitly as a file is not at all locking their own content. Except if adding to file path description some checksum attribute we have no guarantee about reproductible build. Today current proposal is fine to me considering .cprj PLUS local project resources (.cprj is part of) under some source control. If source control I foresee no issue to reproductible build adding folder based support. According to me supporting folder based support is a must thinking alive projects end user is playing with Thanks his favorite IDE. |
The following items are collected from the discussion of the Shadowfax Componentization WG exploration team investigating requirements for a project format and a build management CLI tool.
Discussion was based on CMSIS-Build 0.10.0 https://github.com/ARM-software/CMSIS_5/releases/download/5.7.0/cbuild_install.0.10.0.sh
note: a number of limiting items raised in the discussion have been fixed in version 0.10.2:
Gaps:
Limitations
Conclusions from the discussion:
The text was updated successfully, but these errors were encountered: