diff --git a/include/echoion/api/interfaces/CoreInterface.hpp b/include/echoion/api/interfaces/CoreInterface.hpp index db68a18..4bfb724 100644 --- a/include/echoion/api/interfaces/CoreInterface.hpp +++ b/include/echoion/api/interfaces/CoreInterface.hpp @@ -93,9 +93,6 @@ namespace Echoion::Api updateConfigJson(const std::string& configJson) = 0; [[nodiscard]] virtual Result getConfigJson() const = 0; - // Reload configuration from the config file on disk. - virtual Result reloadConfig() = 0; - // Hot reload - using serialization instead of HotReloadState // Returns opaque handle that Plugin just passes back [[nodiscard]] virtual Result prepareForHotReload() = 0; @@ -152,6 +149,15 @@ namespace Echoion::Api getConfigHandle() const = 0; virtual Result updateConfigFromHandle(AppConfigHandle config) = 0; + + // Reload configuration from the config file on disk. + // NOTE: append-only. ICoreInterface is the hot-reload ABI contract + // between the (already-loaded) Plugin and a freshly reloaded Core. + // Inserting/removing a virtual method anywhere above shifts every + // later vtable slot, so the old Plugin would call the wrong methods + // on the new Core (state-transfer corruption on hot reload). Only + // ever add new virtuals at the very end. + virtual Result reloadConfig() = 0; }; } // namespace Echoion::Api