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
Discussion: YAML versus JSON file format in the context of 'projmgr' #31
Comments
Some extract from this week discussions, to be completed / corrected by all with more inputs: YAML Pros: ability to comment, easier to edit manually, used in github, (seems it) can benefit from json schema Bottom line, one needs to be selected and tried. Proposal from Reinhard: start with YAML as it was the initial plan and see if we face technical issues in the future development. In case of such issue, re-open the topic. One action though : try and experiment schema with yaml. |
Indentation might be error prone and is too permissive in my opinion to keep it maintainable (then it becomes not easy for a human to read it): Probably we need to define rules to avoid that indentation becomes chaotic ? Nevertheless, I am also puzzled by the human-readable/human-modifiable criteria. I wonder also how we are going to handle the comments, unless my assumption that we will try to handle these files with a UI and avoid the user looking at it is wrong ? Maybe the assumption is more to let users write clayer and other projects files manually ? Today in Keil uVision I do not need to edit such files manually and I can even manage CMSIS components and CMSIS packs graphically. |
I haven't yet read enough to understand of These two formats we are discussing are very similar. I am happy with any of these two (rather than xml that I don't like maintaining due to its readability).
You get an early error to show this. Also if we choose a format that does not require indentation, it is good practice to set a tool to ident it for you anyway. Otherwise spaces, indentation becomes a problem when manual edits are done or generated by external/internal tools - both should result with the same output (helps when comparing different versions - this might be one of the use cases why I would vote for readable format and have set of styling rules to follow).
Lot of projects use 4 spaces or so anyway even if the format does not require it. Styling issues are the ones I don't want to have as everyone has different opinion if not predefined by a project.
Command line tools - CI won't open IDE and select via click boxes or so, it uses cmd with files discussed here, they are generated and provided via cmd. So someone needs to maintain these files and edit via cmd. |
Hi Martin, interesting point about CLI indeed. I thought that CI would use preconfigured projects. Regarding the styling : actually I am not concerned only about using 4 spaces or 2. |
We have experimented and demonstrated the schema files for YML formatted files and e.g. integration with Visual Studio Code giving a good user experience including help with "wrong" indentations. |
In issue #12 YAML is proposed to be used for the input files: ctarget, cproject, clayer
We shall review pros and cons of either file formats, create and agree on a format in the context of this project and capture it in an Architecture Design Record (ADR).
Criteria:
The text was updated successfully, but these errors were encountered: