Skip to content

Commit 9e8bfaf

Browse files
committed
Remove compat-break bool from ABI detection protocol
In discussion of #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.
1 parent 3f0cd52 commit 9e8bfaf

3 files changed

Lines changed: 7 additions & 22 deletions

File tree

src/common/IPC/Common.h

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,15 @@ namespace IPC {
7171
};
7272

7373
// Version of the protocol for detecting what ABI version the VM has upon startup
74-
constexpr uint32_t ABI_VERSION_DETECTION_ABI_VERSION = 4;
74+
constexpr uint32_t ABI_VERSION_DETECTION_ABI_VERSION = 5;
7575

7676
// Version for the syscall signatures between engine and VM. This must change if the syscall
7777
// IDs, argument types, or return types change, or if serialization procedures change.
78-
// Follows Daemon major versions.
79-
// This should be updated only by update-version-number.py when a "major" release is indicated
80-
constexpr const char* SYSCALL_ABI_VERSION = "0.55";
81-
82-
// This should be manually set to true when starting a 'for-X.Y.Z/sync' branch.
83-
// This should be set to false by update-version-number.py when a (major) release is created.
84-
constexpr bool DAEMON_HAS_COMPATIBILITY_BREAKING_SYSCALL_CHANGES = true;
78+
// For the master branch with a stable ABI, this follows Daemon major versions.
79+
// For next-release branches, the convention is to use "testing/<next release version>" On
80+
// the next-release branch the ABI is unstable so any two commits may be incompatible.
81+
// This is updated by update-version-number.py when a "major" release is indicated.
82+
constexpr const char* SYSCALL_ABI_VERSION = "testing/0.56.0";
8583

8684
/*
8785
* The messages sent between the VM and the engine are defined by a numerical

src/engine/framework/VirtualMachine.cpp

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6060

6161
static Cvar::Cvar<std::string> abiVersionCvar(
6262
"version.daemon.abi", "Virtual machine IPC ABI version", Cvar::SERVERINFO | Cvar::ROM,
63-
std::string(IPC::SYSCALL_ABI_VERSION) +
64-
(IPC::DAEMON_HAS_COMPATIBILITY_BREAKING_SYSCALL_CHANGES ? "+compatbreak" : ""));
63+
IPC::SYSCALL_ABI_VERSION);
6564

6665
static Cvar::Cvar<bool> workaround_naclArchitecture_arm64_disableQualification(
6766
"workaround.linux.arm64.naclDisableQualification",
@@ -533,17 +532,6 @@ void VMBase::Create()
533532
this->name, vmABI, IPC::SYSCALL_ABI_VERSION);
534533
}
535534

536-
bool vmCompatBreaking = reader.Read<bool>();
537-
if (vmCompatBreaking && !IPC::DAEMON_HAS_COMPATIBILITY_BREAKING_SYSCALL_CHANGES) {
538-
Sys::Drop("Couldn't load the %s gamelogic module: it has compatibility-breaking ABI changes but Daemon engine uses the vanilla %s ABI",
539-
this->name, IPC::SYSCALL_ABI_VERSION);
540-
} else if (!vmCompatBreaking && IPC::DAEMON_HAS_COMPATIBILITY_BREAKING_SYSCALL_CHANGES) {
541-
Sys::Drop("Couldn't load the %s gamelogic module: Daemon has compatibility-breaking ABI changes but the VM uses the vanilla %s ABI",
542-
this->name, IPC::SYSCALL_ABI_VERSION);
543-
} else if (IPC::DAEMON_HAS_COMPATIBILITY_BREAKING_SYSCALL_CHANGES) {
544-
Log::Notice("^6Using %s VM with unreleased ABI changes", this->name);
545-
}
546-
547535
Log::Notice("Loaded %s VM module in %d msec", this->name, Sys::Milliseconds() - loadStartTime);
548536
}
549537

src/shared/VMMain.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ static void CommonInit(Sys::OSHandle rootSocket)
6969
Util::Writer writer;
7070
writer.Write<uint32_t>(IPC::ABI_VERSION_DETECTION_ABI_VERSION);
7171
writer.Write<std::string>(IPC::SYSCALL_ABI_VERSION);
72-
writer.Write<bool>(IPC::DAEMON_HAS_COMPATIBILITY_BREAKING_SYSCALL_CHANGES);
7372
VM::rootChannel.SendMsg(writer);
7473

7574
// Start the main loop

0 commit comments

Comments
 (0)