Skip to content

Default to hot swapping on Linux as on Windows - #2628

Merged
bfiete merged 1 commit into
beefytech:masterfrom
robknopf:pr/linux-hotswap-default
Nov 30, 2026
Merged

bfiete merged 1 commit into
beefytech:masterfrom
robknopf:pr/linux-hotswap-default

Conversation

@robknopf

Copy link
Copy Markdown
Contributor

AllowHotSwapping defaulted to (platformType == .Windows) && !isRelease, from when WinDebugger was the only backend that could hot swap. Since #2527 the LLDB backend can too, so a Linux debug config now defaults to it.

A Linux platform selected from a Windows host is WSL, which launches through @gdb_wsl and never reaches the LLDB backend, so the condition goes through a new PlatformType.SupportsHotSwapping that excludes it.

The three places that decide the default now agree: SetupDefault, and the load and save defaults. The neighbouring Windows-only options (EnableRealtimeLeakCheck, EnableSideStack) are untouched, and a workspace that already stores AllowHotSwapping keeps what it stored.

Without this, every HotSwap_* script in IDE/Tests/Test1 fails on Linux with "Hot Compilation is not enabled" unless the workspace enables it explicitly.

The AllowHotSwapping default was '(platformType == .Windows) && !isRelease',
from when WinDebugger was the only backend that could hot swap. The LLDB
backend can now, so a Linux debug config defaults to it too.

Reading the platform directly would also catch a Linux platform selected from
a Windows host, which is WSL. Those launch through '@gdb_wsl' and so never
reach the LLDB backend, so the condition goes through a SupportsHotSwapping
property that excludes them.

Three places decide this and they now agree: SetupDefault, which is what a
workspace with nothing stored gets, and the load and save defaults either side
of it. The sibling Windows-only options next to them (EnableRealtimeLeakCheck,
EnableSideStack) are untouched, and a workspace that already stores
AllowHotSwapping keeps what it stored.

With this, IDE/Tests/Test1 goes from 24/41 to 41/41 on Linux with an unmodified
BeefSpace.toml; previously every HotSwap_* script failed with "Hot Compilation
is not enabled".

Depends on the LLDB hot compile support in beefytech#2527; without that the Linux
default would turn on a backend that cannot service it.
@bfiete
bfiete merged commit 333b71e into beefytech:master Nov 30, 2026
5 checks passed
@robknopf
robknopf deleted the pr/linux-hotswap-default branch November 30, 2026 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants