From 9e8bfaff4ad40e8c073518063810efcf93a8c37c Mon Sep 17 00:00:00 2001 From: slipher Date: Tue, 17 Mar 2026 05:50:56 -0500 Subject: [PATCH] Remove compat-break bool from ABI detection protocol In discussion of https://github.com/DaemonEngine/Daemon/pull/1933 it has been observed that this causes issues with the version check when using the server list on an unstable branch, and that the bool is unnecessary complexity. Instead of having the bool we can just add something in the version string to indicate the unstable ABI. The only thing lost by removing DAEMON_HAS_COMPATIBILITY_BREAKING_SYSCALL_CHANGES is the log message advising that the unstable ABI branch is being used. --- src/common/IPC/Common.h | 14 ++++++-------- src/engine/framework/VirtualMachine.cpp | 14 +------------- src/shared/VMMain.cpp | 1 - 3 files changed, 7 insertions(+), 22 deletions(-) diff --git a/src/common/IPC/Common.h b/src/common/IPC/Common.h index 7041b54c2f..a1797792fb 100644 --- a/src/common/IPC/Common.h +++ b/src/common/IPC/Common.h @@ -71,17 +71,15 @@ namespace IPC { }; // Version of the protocol for detecting what ABI version the VM has upon startup - constexpr uint32_t ABI_VERSION_DETECTION_ABI_VERSION = 4; + constexpr uint32_t ABI_VERSION_DETECTION_ABI_VERSION = 5; // Version for the syscall signatures between engine and VM. This must change if the syscall // IDs, argument types, or return types change, or if serialization procedures change. - // Follows Daemon major versions. - // This should be updated only by update-version-number.py when a "major" release is indicated - constexpr const char* SYSCALL_ABI_VERSION = "0.55"; - - // This should be manually set to true when starting a 'for-X.Y.Z/sync' branch. - // This should be set to false by update-version-number.py when a (major) release is created. - constexpr bool DAEMON_HAS_COMPATIBILITY_BREAKING_SYSCALL_CHANGES = true; + // For the master branch with a stable ABI, this follows Daemon major versions. + // For next-release branches, the convention is to use "testing/" On + // the next-release branch the ABI is unstable so any two commits may be incompatible. + // This is updated by update-version-number.py when a "major" release is indicated. + constexpr const char* SYSCALL_ABI_VERSION = "testing/0.56.0"; /* * The messages sent between the VM and the engine are defined by a numerical diff --git a/src/engine/framework/VirtualMachine.cpp b/src/engine/framework/VirtualMachine.cpp index 482c6336d5..35feb7645e 100644 --- a/src/engine/framework/VirtualMachine.cpp +++ b/src/engine/framework/VirtualMachine.cpp @@ -60,8 +60,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. static Cvar::Cvar abiVersionCvar( "version.daemon.abi", "Virtual machine IPC ABI version", Cvar::SERVERINFO | Cvar::ROM, - std::string(IPC::SYSCALL_ABI_VERSION) + - (IPC::DAEMON_HAS_COMPATIBILITY_BREAKING_SYSCALL_CHANGES ? "+compatbreak" : "")); + IPC::SYSCALL_ABI_VERSION); static Cvar::Cvar workaround_naclArchitecture_arm64_disableQualification( "workaround.linux.arm64.naclDisableQualification", @@ -533,17 +532,6 @@ void VMBase::Create() this->name, vmABI, IPC::SYSCALL_ABI_VERSION); } - bool vmCompatBreaking = reader.Read(); - if (vmCompatBreaking && !IPC::DAEMON_HAS_COMPATIBILITY_BREAKING_SYSCALL_CHANGES) { - Sys::Drop("Couldn't load the %s gamelogic module: it has compatibility-breaking ABI changes but Daemon engine uses the vanilla %s ABI", - this->name, IPC::SYSCALL_ABI_VERSION); - } else if (!vmCompatBreaking && IPC::DAEMON_HAS_COMPATIBILITY_BREAKING_SYSCALL_CHANGES) { - Sys::Drop("Couldn't load the %s gamelogic module: Daemon has compatibility-breaking ABI changes but the VM uses the vanilla %s ABI", - this->name, IPC::SYSCALL_ABI_VERSION); - } else if (IPC::DAEMON_HAS_COMPATIBILITY_BREAKING_SYSCALL_CHANGES) { - Log::Notice("^6Using %s VM with unreleased ABI changes", this->name); - } - Log::Notice("Loaded %s VM module in %d msec", this->name, Sys::Milliseconds() - loadStartTime); } diff --git a/src/shared/VMMain.cpp b/src/shared/VMMain.cpp index 5c0ab8c68c..68e64e517b 100644 --- a/src/shared/VMMain.cpp +++ b/src/shared/VMMain.cpp @@ -69,7 +69,6 @@ static void CommonInit(Sys::OSHandle rootSocket) Util::Writer writer; writer.Write(IPC::ABI_VERSION_DETECTION_ABI_VERSION); writer.Write(IPC::SYSCALL_ABI_VERSION); - writer.Write(IPC::DAEMON_HAS_COMPATIBILITY_BREAKING_SYSCALL_CHANGES); VM::rootChannel.SendMsg(writer); // Start the main loop