Skip to content

Guard the WindowWrapper include with TOOLS_ENABLED - #475

Merged
limbonaut merged 1 commit into
limbonaut:masterfrom
Th3D0c0:fix-window-wrapper-tools-guard
Sep 4, 2026
Merged

limbonaut merged 1 commit into
limbonaut:masterfrom
Th3D0c0:fix-window-wrapper-tools-guard

Conversation

@Th3D0c0

@Th3D0c0 Th3D0c0 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

compat/compat_window_wrapper.h includes the engine's editor/gui/window_wrapper.h under LIMBOAI_MODULE without a TOOLS_ENABLED guard. As far as I can tell it is the only unguarded engine editor include in the module — compat/editor.cpp, compat/editor_settings.h, blackboard/blackboard_plan.cpp, util/limbo_utility.cpp and editor/debugger/* are all guarded already.

It normally goes unnoticed, for two reasons: the header is still on disk in a template build, and compat_window_wrapper.cpp compiles to nothing there anyway, since its whole body is #ifdef LIMBOAI_GDEXTENSION.

It becomes visible when building the module against a Godot checkout whose editor directory has been removed. Godot's own CI does exactly that for any non-editor target — .github/actions/godot-build/action.yml runs rm -rf editor, to catch editor code reaching export templates — and every template job then fails with:

modules/limboai/compat/compat_window_wrapper.h:37:10: fatal error:
'editor/gui/window_wrapper.h' file not found

Nothing needs the macros in a template build: CompatWindowWrapper's only consumers are limbo_debugger_plugin and the editor plugin, both already inside TOOLS_ENABLED. So guarding the include is sufficient, and editor builds are unaffected. The LIMBOAI_GDEXTENSION branch is left alone.

Verified by building the module as part of Godot 4.7.1 for both target=editor and target=template_release.

🤖 Generated with Claude Code

compat_window_wrapper.h includes the engine's editor/gui/window_wrapper.h
under LIMBOAI_MODULE unconditionally. Every other editor include in the
module is guarded; this is the only one that is not.

It goes unnoticed in a normal checkout because the header is still on disk
in a template build, and compat_window_wrapper.cpp compiles to nothing
there anyway - its whole body is #ifdef LIMBOAI_GDEXTENSION. But Godot's
own CI deletes the editor tree for any non-editor target, precisely to
catch editor code reaching template builds, and then every template job
fails with:

  compat/compat_window_wrapper.h:37:10: fatal error:
  'editor/gui/window_wrapper.h' file not found

Nothing needs the macros in a template build - CompatWindowWrapper's only
consumers are limbo_debugger_plugin and the editor plugin, both already
inside TOOLS_ENABLED - so guarding the include is sufficient and changes
no editor behaviour. The LIMBOAI_GDEXTENSION branch is left alone.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A4XimeYTjpo3crzdyNFrcn
Th3D0c0 added a commit to Th3D0c0/WAIFU_GODOT that referenced this pull request Sep 4, 2026
Reverting the modules/SCsub skip along with the leak fix was wrong. The
leak was not the only thing wrong with that suite, and re-enabling it
broke every template job.

dev_mode implies tests=yes for template targets too, so CI runs --test on
every binary it produces, including template_release. limboai's tests had
therefore never actually run in that configuration - originally the
template jobs died at compile time, and after that the skip removed them -
so nothing had ever exercised them without DEBUG_ENABLED.

tests/test_call_method.h crashes there. Its "Should fail with 0 arguments"
subcase calls a method with the wrong argument count and expects
BTTask::FAILURE, which relies on argument-count validation that Godot
compiles out when DEBUG_ENABLED is off. In template_release the call goes
through and takes the process with it:

  test_call_method.h(27): FATAL ERROR: test case CRASHED:
  Unhandled SEH exception caught

That is exit 1 on the Windows template jobs and 132 on the Linux Mono one.
Whether more of its tests assume a debug build is unknown, since doctest
stops at the first crash - which is reason enough not to re-enable the
suite on the strength of having fixed one bug in it.

The two upstream fixes stand and are open as limbonaut/limboai#475 and
godotengine#476. 2cb92a8 is what let godot-build/action.yml go back to upstream's
`rm -rf editor`, and that revert stays.

Verified locally: template_release with tests=yes now runs 1376 passed /
0 failed, exit 0, where before this it crashed after 28 cases.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A4XimeYTjpo3crzdyNFrcn
@limbonaut
limbonaut merged commit 059ed26 into limbonaut:master Sep 4, 2026
18 checks passed
tscrypter pushed a commit to HeroicHoundGames/godot that referenced this pull request Sep 12, 2026
Repoints the limboai submodule from limbonaut/limboai to
HeroicHoundGames/limboai, pinned to a commit that includes:
- Upstream fix: guard editor/gui/window_wrapper.h include with
  TOOLS_ENABLED (limbonaut/limboai#475), which was breaking all
  template (non-editor) builds.
- New fix: handle PROPERTY_HINT_AUDIO_BUS in
  LimboUtility::get_property_hint_text()'s switch, which was breaking
  all editor builds compiled with -Werror -Wswitch.

Fixes 17 of 20 failing jobs in run
https://github.com/HeroicHoundGames/godot/actions/runs/34660372147

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
tscrypter pushed a commit to HeroicHoundGames/godot that referenced this pull request Oct 9, 2026
Repoints the limboai submodule from limbonaut/limboai to
HeroicHoundGames/limboai, pinned to a commit that includes:
- Upstream fix: guard editor/gui/window_wrapper.h include with
  TOOLS_ENABLED (limbonaut/limboai#475), which was breaking all
  template (non-editor) builds.
- New fix: handle PROPERTY_HINT_AUDIO_BUS in
  LimboUtility::get_property_hint_text()'s switch, which was breaking
  all editor builds compiled with -Werror -Wswitch.

Fixes 17 of 20 failing jobs in run
https://github.com/HeroicHoundGames/godot/actions/runs/34660372147

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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