Skip to content

feat: build with LuaJIT 2.1 and test against latest C++ server-side SDK - #124

Open
kinyoklion wants to merge 5 commits into
mainfrom
devin/1783329097-update-cpp-sdk-versions
Open

feat: build with LuaJIT 2.1 and test against latest C++ server-side SDK#124
kinyoklion wants to merge 5 commits into
mainfrom
devin/1783329097-update-cpp-sdk-versions

Conversation

@kinyoklion

@kinyoklion kinyoklion commented Jul 6, 2026

Copy link
Copy Markdown
Member

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

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 static luaL_setfuncs Lua 5.1 shim. It was never called, and LuaJIT 2.1's lauxlib.h declares luaL_setfuncs non-static, so the shim broke compilation there (static declaration of 'luaL_setfuncs' follows non-static declaration). launchdarkly-server-sdk.c has its own correctly-named ld_luaL_setfuncs and is unaffected.
  • CI LuaJIT matrix luajit-2.0.5luajit-2.1. luarocks/gh-actions-lua clones --branch v2.0.5 from luajit/luajit and that branch/tag no longer exists upstream (only v2.0, v2.1, master remain), so those jobs failed at the Install Lua step. luajit-2.1 is LuaJIT's current rolling release. README's LuaJIT compatibility note updated to match.
  • CI / example build versions: C++ Server-side SDK 3.10.13.13.0, Redis Source 2.1.192.4.0 (both published 2026-07-24).
  • The README minimum-version table stays at 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 CI
  • examples/hello-haproxy/Dockerfile, examples/hello-nginx/Dockerfile, examples/hello-debian/Dockerfile — default CPP_SDK_VERSION ARG for local builds
  • .github/workflows/ci.yml, .github/workflows/install-lua-sdk.yml — LuaJIT version built and tested
  • README.md — LuaJIT compatibility note

How 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, and hello-debian example images. Also verified locally: luarocks make of both rockspecs against the prebuilt redis-source v2.4.0 linux-gcc-x64-dynamic artifact, test.lua 20/20 passing, and examples/hello-lua-server/hello.lua run 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.env and example Docker CPP_SDK_VERSION defaults). README minimum-version table is unchanged.

LuaJIT 2.1 replaces luajit-2.0.5 in CI and install-lua-sdk workflow 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 static luaL_setfuncs Lua 5.1 shim was removed. It conflicted with LuaJIT 2.1’s non-static luaL_setfuncs in lauxlib.h and broke compilation; the main SDK module still uses its own ld_luaL_setfuncs.

Reviewed by Cursor Bugbot for commit a45e93e. Bugbot is set up for automated code reviews on this repo. Configure here.

…rce from 2.1.19 to 2.3.1

Co-Authored-By: rlamb@launchdarkly.com <4955475+kinyoklion@users.noreply.github.com>
@kinyoklion kinyoklion self-assigned this Jul 6, 2026
@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@kinyoklion
kinyoklion marked this pull request as ready for review July 6, 2026 17:07
@kinyoklion
kinyoklion requested a review from a team as a code owner July 6, 2026 17:07
@devin-ai-integration devin-ai-integration Bot changed the title chore: update C++ server-side SDK from 3.10.1 to 3.12.0 and Redis Source from 2.1.19 to 2.3.1 chore: update C++ server-side SDK from 3.10.1 to 3.13.0 and Redis Source from 2.1.19 to 2.4.0 Aug 3, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread .github/variables/cpp-sdk-versions.env
@devin-ai-integration

Copy link
Copy Markdown
Contributor

Refreshed this PR to the current latest releases: C++ SDK 3.13.0 and Redis Source 2.4.0 (both published 2026-07-24), replacing the now-stale 3.12.0/2.3.1.

Verified locally on Ubuntu 22.04 / Lua 5.3 against the prebuilt launchdarkly-cpp-server-redis-source-v2.4.0 linux-gcc-x64-dynamic artifact: both rockspecs compile warning-free, test.lua passes 20/20, and examples/hello-lua-server/hello.lua initializes and evaluates against a live SDK key.

Heads up on CI: the two linux-build (luajit-2.0.5, ...) jobs fail before reaching this PR's changes, in the luarocks/gh-actions-lua install step:

git clone --branch v2.0.5 --single-branch https://github.com/luajit/luajit.git
fatal: Remote branch v2.0.5 not found in upstream origin

The luajit/luajit mirror no longer publishes a v2.0.5 branch (or any tags) — it currently only has master, v2.0, and v2.1 branches. This is an upstream change in the LuaJIT mirror, not related to the C++ SDK bump, and it will affect every run of this workflow until the luajit-2.0.5 matrix entry (or the action) is adjusted. All other checks, including the Lua 5.1/5.2/5.3 builds and the hello-haproxy/hello-nginx/hello-debian example builds, pass with 3.13.0/2.4.0. I've left the matrix alone since changing the tested LuaJIT version is a maintainer decision.

@cursor review

@devin-ai-integration devin-ai-integration Bot changed the title chore: update C++ server-side SDK from 3.10.1 to 3.13.0 and Redis Source from 2.1.19 to 2.4.0 feat: update C++ server-side SDK to 3.13.0 and Redis Source to 2.4.0 Aug 3, 2026
@devin-ai-integration devin-ai-integration Bot changed the title feat: update C++ server-side SDK to 3.13.0 and Redis Source to 2.4.0 chore: test against latest C++ server-side SDK 3.13.0 and Redis Source 2.4.0 Aug 3, 2026
@kinyoklion
kinyoklion marked this pull request as draft August 3, 2026 16:12
@devin-ai-integration devin-ai-integration Bot changed the title chore: test against latest C++ server-side SDK 3.13.0 and Redis Source 2.4.0 fix: build with LuaJIT 2.1 and test against latest C++ server-side SDK Aug 3, 2026
@kinyoklion kinyoklion changed the title fix: build with LuaJIT 2.1 and test against latest C++ server-side SDK feat: build with LuaJIT 2.1 and test against latest C++ server-side SDK Aug 3, 2026
@kinyoklion
kinyoklion marked this pull request as ready for review August 3, 2026 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant