From e4c7447fb91ba4b963e893f10671fd240d0cc12c Mon Sep 17 00:00:00 2001 From: Alexandre Bique Date: Thu, 18 Apr 2024 18:30:13 +0200 Subject: [PATCH] make the delta forward compatible as a requirement --- include/clap/ext/draft/undo.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/clap/ext/draft/undo.h b/include/clap/ext/draft/undo.h index d31068f2..1fe13d7c 100644 --- a/include/clap/ext/draft/undo.h +++ b/include/clap/ext/draft/undo.h @@ -84,6 +84,12 @@ typedef struct clap_host_undo { // name: mandatory null terminated string describing the change, this is displayed to the user // detlas: optional, they are binary blobs used to perform the undo and redo. When not available // the host will save of the plugin and use state->load() instead. + // + // Note: the provided delta **must** be serialized in a forward compatible way, because they may be used + // for incremental state saving and crash recovery. If the plugin is updated after the host crash, + // then we must be able to use delta created with an older version of the plugin. + // Worst case plugin->apply_delta() will fail but this is a scenario we prefer to avoid. + // // [main-thread] void(CLAP_ABI *complete_change)(const clap_host_t *host, const char *name,