feat(schemas): versioned JSON contracts for metadata, describe and explain (G6)
VoidBuildSystem CI / 1 · Requirements (push) Successful in 3s
VoidBuildSystem CI / 2B · Windows Wine build (debug) (push) Successful in 1m48s
VoidBuildSystem CI / 2A · Linux build (debug) (push) Successful in 4m22s
VoidBuildSystem CI / 2A · Linux build (coverage) (push) Successful in 4m46s
VoidBuildSystem CI / 2A · Linux build (sanitizers) (push) Successful in 6m5s
VoidBuildSystem CI / 2B · Windows Wine build (relwithdebinfo) (push) Successful in 3m24s
VoidBuildSystem CI / 2A · Linux build (relwithdebinfo) (push) Successful in 5m57s
VoidBuildSystem CI / 3B · Windows Wine test (debug) (push) Successful in 24s
VoidBuildSystem CI / 3B · Windows Wine test (relwithdebinfo) (push) Successful in 20s
VoidBuildSystem CI / 3A · Linux test (coverage) (push) Failing after 1m39s
VoidBuildSystem CI / 3A · Linux test (sanitizers) (push) Successful in 1m10s
VoidBuildSystem CI / 3A · Linux test (debug) (push) Failing after 7m21s
VoidBuildSystem CI / 3A · Linux test (relwithdebinfo) (push) Failing after 7m25s
VoidBuildSystem CI / 4A2 · VBS installers (linux target) (push) Skipped
VoidBuildSystem CI / 4A2 · VBS installers (windows target) (push) Skipped
VoidBuildSystem CI / 5 · Release (push) Skipped
VoidBuildSystem CI / 1 · Requirements (push) Successful in 3s
VoidBuildSystem CI / 2B · Windows Wine build (debug) (push) Successful in 1m48s
VoidBuildSystem CI / 2A · Linux build (debug) (push) Successful in 4m22s
VoidBuildSystem CI / 2A · Linux build (coverage) (push) Successful in 4m46s
VoidBuildSystem CI / 2A · Linux build (sanitizers) (push) Successful in 6m5s
VoidBuildSystem CI / 2B · Windows Wine build (relwithdebinfo) (push) Successful in 3m24s
VoidBuildSystem CI / 2A · Linux build (relwithdebinfo) (push) Successful in 5m57s
VoidBuildSystem CI / 3B · Windows Wine test (debug) (push) Successful in 24s
VoidBuildSystem CI / 3B · Windows Wine test (relwithdebinfo) (push) Successful in 20s
VoidBuildSystem CI / 3A · Linux test (coverage) (push) Failing after 1m39s
VoidBuildSystem CI / 3A · Linux test (sanitizers) (push) Successful in 1m10s
VoidBuildSystem CI / 3A · Linux test (debug) (push) Failing after 7m21s
VoidBuildSystem CI / 3A · Linux test (relwithdebinfo) (push) Failing after 7m25s
VoidBuildSystem CI / 4A2 · VBS installers (linux target) (push) Skipped
VoidBuildSystem CI / 4A2 · VBS installers (windows target) (push) Skipped
VoidBuildSystem CI / 5 · Release (push) Skipped
- schemas/ publishes JSON Schemas (draft 2020-12, additionalProperties false) for `vbs metadata`, `vbs describe` and `vbs explain --format json`, plus README documenting the versioning rule: any emitted-shape change bumps schema_version and adds a new -vN file; older schemas stay. - `vbs describe` now emits a StrictJson graph summary with schema_version, project/build roots, profile/compiler/os/arch, target and dependency counts and names. - `vbs explain --format json` carries schema_version. - Tests include a schema subset validator (types, required, enum, additionalProperties, items, minimum) and json_schemas_validate_metadata_describe_and_explain validates the real documents against the files, then proves the validator rejects a missing required key, a wrong enum value and an unexpected property. Verified: the schema test, vbs_core_tests and the CLI contract suite pass; clang-format clean.
This commit is contained in:
1 parent
455a403429
commit
f1cf277847
9 files changed
+648
-4
No files matched your search
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://void.build/schemas/explain-v1.schema.json",
|
||||
"title": "VoidBuildSystem action explanation (schema_version 1)",
|
||||
"description": "Emitted by `vbs explain --format json`. Any shape change bumps schema_version and adds a new schema file.",
|
||||
"type": "object",
|
||||
"required": ["schema_version", "profile", "total", "up_to_date", "would_run", "actions"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"schema_version": { "type": "integer", "enum": [1] },
|
||||
"profile": { "type": "string" },
|
||||
"total": { "type": "integer", "minimum": 0 },
|
||||
"up_to_date": { "type": "integer", "minimum": 0 },
|
||||
"would_run": { "type": "integer", "minimum": 0 },
|
||||
"actions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"target",
|
||||
"label",
|
||||
"action_key",
|
||||
"cacheable",
|
||||
"would_run",
|
||||
"restorable",
|
||||
"remote_hit",
|
||||
"reason",
|
||||
"changed_inputs",
|
||||
"changed_outputs",
|
||||
"command"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"id": { "type": "string" },
|
||||
"target": { "type": "string" },
|
||||
"label": { "type": "string" },
|
||||
"action_key": { "type": "string" },
|
||||
"cacheable": { "type": "boolean" },
|
||||
"would_run": { "type": "boolean" },
|
||||
"restorable": { "type": "boolean" },
|
||||
"remote_hit": { "type": "boolean" },
|
||||
"reason": { "type": "string" },
|
||||
"changed_inputs": { "type": "array", "items": { "type": "string" } },
|
||||
"changed_outputs": { "type": "array", "items": { "type": "string" } },
|
||||
"command": { "type": "string" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user