Skip to content

Sync upstream into main#4

Open
github-actions[bot] wants to merge 11 commits into
mainfrom
master
Open

Sync upstream into main#4
github-actions[bot] wants to merge 11 commits into
mainfrom
master

Conversation

@github-actions

Copy link
Copy Markdown

Automated upstream sync hit conflicts. Merge master (now level with beyond-all-reason/RecoilEngine) into main and resolve here.

MarkKropf and others added 11 commits June 18, 2026 21:11
A handful of SolLua bindings still referenced sol::nil / sol::type::nil
while the rest of the same files already use sol::lua_nil. sol::nil is a
thin alias for lua_nil (see lib/sol2/sol.hpp) and collides with the `nil`
macro that Objective-C headers define, so lua_nil is the portable
spelling. This brings the remaining spots in line with the prevailing
convention.

Extracted from cc3cad9 in beyond-all-reason#2991; cross-platform, no behavior change.
float3.h included lib/streflop/streflop_cond.h directly, ahead of
FastMath.h. FastMath.h defines MATH_SQRT_OVERRIDE before it includes
streflop_cond.h (so streflop does not define its own math::sqrt(float) --
FastMath provides a faster one). The direct include meant streflop_cond.h
could be processed before that override was set.

Drop the direct include; FastMath.h pulls in streflop_cond.h transitively
with the override in place. creg_cond.h keeps its original position --
it does not pull in streflop, so it does not need to move.

Surfaced by the macOS port (beyond-all-reason#2991, commit cc3cad9).

Co-authored-by: Mark Kropf <markkropf@gmail.com>
…son#3025)

`SafeUtil.h` uses `<memory>` for `std::addressof`, and `<type_traits>`
for `std::is_trivially_copyable` / `std::is_trivially_constructible_v`,
but pulled them in only transitively. Include them directly so the header
is self-contained and does not rely on include order elsewhere. Also use
`std::is_trivially_default_constructible` for the default-construction.

Extracted from cc3cad9 in beyond-all-reason#2991; cross-platform, no behavior change.

Co-authored-by: Mark Kropf <markkropf@gmail.com>
Co-authored-by: sprunk <spr.ng@o2.pl>
LuaTextures::Create returned an empty string on glTexImage failure with
no diagnostics. Log target/size/format/dataFormat/dataType/glError so
texture-creation failures can be diagnosed.

Extracted from 1e75080 in beyond-all-reason#2991; cross-platform, no behavior change
beyond the added log.
Engine crash thread: https://discordapp.com/channels/549281623154229250/1516994684591931535

Bugged Scenario: A reclaimer A is guarding another reclaimer B, while both reclaiming the same wreck. A can be notified of wreck death BEFORE the guarded unit B is notified, leading to trying to reclaim the same (actively-deleting) wreck because B's reference hasn't been cleaned up yet.

This leads to an eventual segfault.

So: the short term/easy fix is to skip reclaiming of a dead/dying target.
util_fileSelector was declared with a non-const struct dirent* on
__APPLE__ and const elsewhere. macOS scandir() expects the selector
argument as int(*)(const struct dirent*), so the non-const Apple variant
failed to compile under GCC:

  Util.c:500: error: passing argument 3 of 'scandir' from incompatible
  pointer type

Both branches were otherwise identical, so drop the __APPLE__ split and
use const struct dirent* unconditionally (matches POSIX scandir). No
effect on Linux/Windows.

Assisted by Claude Code; verified by compiling the macOS headless build.
The legacy build did find_package(X11 REQUIRED) under a plain if(UNIX)
guard. macOS is UNIX in CMake but does not use X11 (it uses Cocoa), so
configuring the engine on macOS failed at find_package(X11). An if(APPLE)
block already follows for Foundation, so exclude Apple from the X11
branch: if(UNIX AND NOT APPLE).

Surfaced configuring the spring-headless target on macOS (which reuses
the legacy Game target). No effect on Linux/Windows.

Assisted by Claude Code; verified by configuring the macOS build.
Modern 7-Zip ships its CLI as '7zz' (Homebrew's 'sevenzip' formula
installs /opt/homebrew/bin/7zz; recent Linux distros likewise package
'7zz'). FindSevenZip only searched for '7z'/'7za', so configure failed
with 'Could NOT find SevenZip (missing: SEVENZIP_BIN)' on such systems.

Add '7zz' to the searched NAMES. No effect where 7z/7za already exist.
rts/System/Platform/Mac/SDLMain.m and SDLMain.h are the classic SDL 1.2
Cocoa main wrapper (the Darrell Walisser / Max Horn template). They are:

- not listed in any CMakeLists (never compiled)
- not #included by any source file
- built on Carbon (<Carbon/Carbon.h>), which is 32-bit-only and
  unavailable on modern macOS / Apple Silicon

SDL2 provides its own SDL_main, so this wrapper is obsolete. Remove the
dead files so the macOS platform layer reflects what is actually built.
Updated the link for the SplinterFaction card to include the 'https://' prefix.

This has been broken for a very long time. I've asked Skyrbunny to fix it multiple times, but it has never gotten fixed.
beyond-all-reason#3052)

setMinLevel() only searched for an existing entry on the "set back to default" (erase) path. Setting a section to a *non-default* level appended a new row unconditionally, so repeatedly changing one section's level (e.g. via Spring.SetLogSectionFilterLevel) accumulated duplicate entries and eventually filled the fixed 64-slot sectionMinLevels table -- after which every section-level change silently failed with "too many section-levels".

Fix: Look the section up before appending and, if it already has an entry, update it in place. This bounds the table at one entry per section.

This likely never happens in practice but this was found while writing other tests

Co-authored-by: Bruno Da Silva <Bruno-DaSilva@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.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.

5 participants