From 9318c6c981501d067c607f47634e070ed9716bad Mon Sep 17 00:00:00 2001 From: Derek Bailey Date: Tue, 21 Jan 2025 21:01:00 -0800 Subject: [PATCH] Update Evolution doc --- docs/source/evolution.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/source/evolution.md b/docs/source/evolution.md index 19ec6e96f..0f22cac72 100644 --- a/docs/source/evolution.md +++ b/docs/source/evolution.md @@ -253,3 +253,24 @@ your schema changes have been committed, ensuring consistency with the rest of the world. If this is not practical for you, use explicit field `id`s, which should always generate a merge conflict if two people try to allocate the same id. + +## Checking Conformity + +To check that schema are properly evolved, the [`flatc`](flatc.md) compiler has +a [option](flatc.md#additional-options) to do just that: + +```sh +--conform FILE +``` + +Where `FILE` is the base schema the rest of the input schemas must evolve from. +It returns `0` if they are properly evolved, otherwise returns a non-zero value +and provides errors on the reason why the schema are not properly evolved. + +As an example, the following checks if `schema_v2.fbs` is properly evolved from +`schema_v1.fbs`. + +```sh +flatc --conform schema_v1.fbs schema_v2.fbs +``` +