Skip to content

Conversation

@smcv
Copy link
Contributor

@smcv smcv commented Dec 20, 2025

SDL3 + sdl2-compat doesn't give precisely the same error message as "classic" SDL2 here. To facilitate the transition from "classic" SDL2 to sdl2-compat, allow either one. This allows the "classic" SDL2 test suite to be run against sdl2-compat, demonstrating that sdl2-compat is indeed compatible with the version that it's replacing.


I'm looking into what needs to happen for Debian (and indirectly Ubuntu) to replace "classic" SDL2 with sdl2-compat, following in the footsteps of other distros like Arch and Fedora. Specifically, the version of sdl2-compat in experimental takes over the package names libsdl2-2.0-0 and libsdl2-dev previously provided by "classic" SDL2, so that it will become the default.

In Debian's automated test machinery, the "as-installed" tests for all existing packages that depend on a particular library are run against new proposed versions of that library. In the case where the package name libsdl2-2.0-0 is taken over, the result is that we run both the "classic" SDL2 test suite libsdl2-tests and the sdl2-compat test suite libsdl2-compat-tests against the sdl2-compat library (currently only with the dummy audio and video backends). This might seem unexpected, but it does seem like a a good way to prove that sdl2-compat is actually compatible with "classic" SDL2 during the transition, and these error messages seem to be the only assertions that actually need relaxing.

@slouken
Copy link
Collaborator

slouken commented Dec 22, 2025

SDL_GetError() never returns NULL. The check should be *SDL_GetError() != '\0'

SDL3 + sdl2-compat doesn't give precisely the same error message as
"classic" SDL2 here. To facilitate the transition from "classic" SDL2
to sdl2-compat, allow either one. This allows the "classic" SDL2 test
suite to be run against sdl2-compat, demonstrating that sdl2-compat is
indeed compatible with the version that it's replacing.

Signed-off-by: Simon McVittie <[email protected]>
@smcv smcv force-pushed the sdl2-relax-message-assert branch from c5a4696 to 93adca5 Compare December 23, 2025 17:12
@slouken slouken merged commit c795b08 into libsdl-org:SDL2 Dec 29, 2025
34 checks passed
@slouken
Copy link
Collaborator

slouken commented Dec 29, 2025

Merged, thanks!

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