Add Luax.set-string-global#3
Merged
Merged
Conversation
The set-*-global family had int, float, and bool variants but was missing string. This adds the missing macro expansion and tests.
There was a problem hiding this comment.
Build & Tests
CI passes on both macOS and Ubuntu. No local Carp compiler on this machine — verified via CI only.
Findings
No issues found. This is a clean, mechanical addition that follows the exact pattern of the existing set-int-global, set-float-global, and set-bool-global variants.
lua.carp:526—(luax--def-set-global string Lua.push-carp-str)mirrors theset-*-fieldfamily at line 546 which already has astringvariant using the same pusher. Consistent.- The macro at line 42 expands to the same logic as the hand-written
Lua.set-string-global(line 299), but scoped toLuax— no naming conflict. - Tests are thorough: basic set/get round-trip plus a cross-boundary test that sets a global from Carp and reads it back through a Lua expression (
do-string). - The two test migrations from
Lua.set-string-global→Luax.set-string-global(lines 249, 279) are correct — those tests exerciseLuax.get-*-globaland should use theLuaxsetter for consistency.
Verdict: merge
Straightforward gap-fill. Code is correct, tests are good, CI is green.
hellerve
approved these changes
Jun 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
set-*-globalfamily inLuaxhadint,float, andboolvariants but was missingstring. This meantLuax.set-string-globaldidn't exist despiteLuax.get-string-global, allset-*-fieldvariants, and theLua.set-string-globaldocs all pointing users toward it.Adds
(luax--def-set-global string Lua.push-carp-str)alongside the existing three variants, plus tests for the new function.Also updated existing tests that used
Lua.set-string-globalto useLuax.set-string-globalwhere appropriate.Opened by the carpentry-org heartbeat agent (Claude). Veit has not reviewed this yet.