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

[csolution] Add flag on list commands (e.g. --json) to obtain data in a machine readable format #1159

Closed
acabarbaye opened this issue Oct 20, 2023 · 6 comments
Labels
discussion done indicates an issue's discussion is completed discussion Indicates an issue being in discussion enhancement New feature or request

Comments

@acabarbaye
Copy link

The output of the listing commands or the commands returning information about the csolution will be used by machine processes to retrieve information about the csolution projects in an abstracted and robust way. Therefore, having the output defined in a machine readable format would greatly improve the robustness of the parsing process.

The format could be json and the flag --json but could also be any other machine readable format which are considered more suitable.

@acabarbaye acabarbaye added the enhancement New feature or request label Oct 20, 2023
@ReinhardKeil
Copy link
Collaborator

I think this is a duplicate of #1158 (or is this a clarification of the request)

@jkrech jkrech changed the title [csolution] Add flag on listing commands to obtain data in a machine readable format [csolution] Add flag on list commands (e.g. --json) to obtain data in a machine readable format Oct 25, 2023
@jkrech
Copy link
Member

jkrech commented Oct 25, 2023

These are two independent change requests:
#1158 will display devices and boards used by <solution>.csolution.yml using the boardID and deviceID notation used by the YAML project format and the origin pack. E.g.:

  STMicroelectronics::STM32U5A9VJTxQ (Keil::STM32U5xx_DFP@2.1.0)
  STMicroelectronics::STM32F407IGHx (Keil::STM32F4xx_DFP@2.7.0)

This issue requests the output to be machine readable e.g. in json format assuming a --json flag being specified.

["STMicroelectronics::STM32U5A9VJTxQ (Keil::STM32U5xx_DFP@2.1.0)", "STMicroelectronics::STM32F407IGHx (Keil::STM32F4xx_DFP@2.7.0)"]

@ReinhardKeil ReinhardKeil added the discussion Indicates an issue being in discussion label Oct 25, 2023
@madchutney
Copy link
Contributor

The JSON would be more machine readable if a key value format was used, e.g.

[
   {
      "Vendor":"STMicroelectronics",
      "Name":"STM32U5A9VJTxQ",
      "Pack":{
         "Vendor":"Keil",
         "Name":"STM32U5xx_DFP",
         "Version":"2.1.0"
      }
   },
   {
      "Vendor":"STMicroelectronics",
      "Name":"STM32F407IGHx",
      "Pack":{
         "Vendor":"Keil",
         "Name":"STM32F4xx_DFP",
         "Version":"2.7.0"
      }
   }
]

@ReinhardKeil
Copy link
Collaborator

I wonder if this approach does not duplicate the content of the Build Information Files.

Which problem are we trying to address here?

@madchutney
Copy link
Contributor

There are two problems that we are trying to solve:

  1. Interpret a solution / project files to determine the list of devices/boards/toolchains the solution supports.
  2. Present that information in a format that be easily read by machine.

@ReinhardKeil
Copy link
Collaborator

We believe the answer is in #1177

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion done indicates an issue's discussion is completed discussion Indicates an issue being in discussion enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants