feat: build with LuaJIT 2.1 and test against latest C++ server-side SDK - #124
feat: build with LuaJIT 2.1 and test against latest C++ server-side SDK#124kinyoklion wants to merge 5 commits into
Conversation
…rce from 2.1.19 to 2.3.1 Co-Authored-By: rlamb@launchdarkly.com <4955475+kinyoklion@users.noreply.github.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1d66be3. Configure here.
|
Refreshed this PR to the current latest releases: C++ SDK Verified locally on Ubuntu 22.04 / Lua 5.3 against the prebuilt Heads up on CI: the two The @cursor review |

Requirements
Related issues
Supersedes #123 (which only updated Redis Source to 2.2.2).
Describe the solution you've provided
Builds and tests against current toolchain and SDK versions, without changing what this SDK requires:
launchdarkly-server-sdk-redis.c: removed the staticluaL_setfuncsLua 5.1 shim. It was never called, and LuaJIT 2.1'slauxlib.hdeclaresluaL_setfuncsnon-static, so the shim broke compilation there (static declaration of 'luaL_setfuncs' follows non-static declaration).launchdarkly-server-sdk.chas its own correctly-namedld_luaL_setfuncsand is unaffected.luajit-2.0.5→luajit-2.1.luarocks/gh-actions-luaclones--branch v2.0.5fromluajit/luajitand that branch/tag no longer exists upstream (onlyv2.0,v2.1,masterremain), so those jobs failed at the Install Lua step.luajit-2.1is LuaJIT's current rolling release. README's LuaJIT compatibility note updated to match.3.10.1→3.13.0, Redis Source2.1.19→2.4.0(both published 2026-07-24).3.9.0/2.1.19— the Lua SDK still works with those; working with the latest is not the same as requiring it.Files changed:
launchdarkly-server-sdk-redis.c.github/variables/cpp-sdk-versions.env— central version config used by CIexamples/hello-haproxy/Dockerfile,examples/hello-nginx/Dockerfile,examples/hello-debian/Dockerfile— defaultCPP_SDK_VERSIONARG for local builds.github/workflows/ci.yml,.github/workflows/install-lua-sdk.yml— LuaJIT version built and testedREADME.md— LuaJIT compatibility noteHow to test it
CI builds and tests both rockspecs on Lua 5.1/5.2/5.3 and LuaJIT 2.1 against the C++ SDK 3.13.0 / Redis Source 2.4.0 artifacts, and builds the
hello-haproxy,hello-nginx, andhello-debianexample images. Also verified locally:luarocks makeof both rockspecs against the prebuilt redis-source v2.4.0linux-gcc-x64-dynamicartifact,test.lua20/20 passing, andexamples/hello-lua-server/hello.luarun against a real server-side SDK key (client init, data sync, flag evaluation).Additional context
No deprecated APIs are used by the examples (
clientInit,makeContext,boolVariation), and the C++ 3.13.0 bindings compile without warnings.Link to Devin session: https://app.devin.ai/sessions/85ca4fcc915e4e38bdee004d3d493824
Requested by: @kinyoklion
Note
Low Risk
Version and CI matrix updates plus removal of dead code in the Redis module; no runtime API or minimum dependency requirement changes.
Overview
CI and example builds now target C++ Server-side SDK 3.13.0 and Redis Source 2.4.0 (via
cpp-sdk-versions.envand example DockerCPP_SDK_VERSIONdefaults). README minimum-version table is unchanged.LuaJIT 2.1 replaces
luajit-2.0.5in CI andinstall-lua-sdkworkflow options; the README compatibility note matches. The old LuaJIT ref no longer exists upstream, which broke install jobs.In
launchdarkly-server-sdk-redis.c, an unused staticluaL_setfuncsLua 5.1 shim was removed. It conflicted with LuaJIT 2.1’s non-staticluaL_setfuncsinlauxlib.hand broke compilation; the main SDK module still uses its ownld_luaL_setfuncs.Reviewed by Cursor Bugbot for commit a45e93e. Bugbot is set up for automated code reviews on this repo. Configure here.