-
Notifications
You must be signed in to change notification settings - Fork 1
Use YAML output for variantlib plugins get-configs
#125
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Michał Górny <[email protected]>
Signed-off-by: Michał Górny <[email protected]>
Signed-off-by: Michał Górny <[email protected]>
Can we do this with json or toml too instead of introducing a third format? |
Sure. My thinking was that it's "user-readable output that happens to be valid YAML" but I'm fine with a true machine-readable format. Perhaps we should modify other plugin commands to use the same format too. |
TOML output isn't particularly pleasing: [[amd]]
name = "rocm_version"
multi_value = false
values = [
"7.10",
"7.9",
"7.8",
"7.7",
"7.6",
"7.5",
"7.4",
"7.3",
"7.2",
"7.1",
"7.0",
"6.4",
"6.3",
]
[[amd]]
name = "gfx_arch"
multi_value = true
values = [
"gfx900",
"gfx906",
"gfx908",
"gfx90a",
"gfx942",
"gfx1030",
"gfx1100",
"gfx1101",
"gfx1102",
"gfx1200",
"gfx1201",
]
[[x86_64]]
name = "level"
multi_value = false
values = [
"v4",
"v3",
"v2",
"v1",
]
[[x86_64]]
name = "avx_vnni"
multi_value = false
values = [
"on",
]
[[x86_64]]
name = "cppc"
multi_value = false
values = [
"on",
]
... JSON: {
"amd": [
{
"name": "rocm_version",
"values": [
"7.10",
"7.9",
"7.8",
"7.7",
"7.6",
"7.5",
"7.4",
"7.3",
"7.2",
"7.1",
"7.0",
"6.4",
"6.3"
],
"multi_value": false
},
{
"name": "gfx_arch",
"values": [
"gfx900",
"gfx906",
"gfx908",
"gfx90a",
"gfx942",
"gfx1030",
"gfx1100",
"gfx1101",
"gfx1102",
"gfx1200",
"gfx1201"
],
"multi_value": true
}
],
"x86_64": [
{
"name": "level",
"values": [
"v4",
"v3",
"v2",
"v1"
],
"multi_value": false
},
{
"name": "avx_vnni",
"values": [
"on"
],
"multi_value": false
},
{
"name": "cppc",
"values": [
"on"
],
"multi_value": false
},
{
"name": "ibrs_enhanced",
"values": [
"on"
],
"multi_value": false
},
... Which poison do you choose? |
idk, TOML looks well diff-able. |
I honestly don't mind. All 3 are fine with me. @mgorny approved you can merged when you made your decision. |
I really don't know which one to do! Technically, JSON is less code and I haven't figured out how to fix weird spacing in TOML (i.e. empty lines between AoT elements but not between AoTs). |
Yeah merge at your disgression. |
If JSON is less code then do JSON ;) |
No description provided.