You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@thrift.apache.org by "Jens-G (via GitHub)" <gi...@apache.org> on 2026/09/26 16:12:49 UTC

[PR] THRIFT-6371: Quote a uuid constant in the Lua generator [thrift]

Jens-G opened a new pull request, #3953:
URL: https://github.com/apache/thrift/pull/3953

   `--gen lua` wrote the value of a `uuid` constant without quotes, so the generated file did not load:
   
   ```
   U = TUUIDfromString(00000000-4444-cccc-ffff-0123456789ab)
   luac: gen-lua/u_constants.lua:11: malformed number near '0123456789ab'
   ```
   
   The `TYPE_UUID` case of `render_const_value` now writes the escaped value as a quoted string, as the other generators do: `TUUIDfromString('00000000-4444-cccc-ffff-0123456789ab')`. `luac -p` accepts the result, also for a value written with braces, which the compiler normalizes.
   
   Test: `compiler/cpp/tests/lua/t_lua_generator_uuid_const_tests.cc` fails without the fix and passes with it; the Lua generator is switched on in `compiler/cpp/tests/CMakeLists.txt`. The compiler test suite passes (19/19).
   
   String constants in the same function are not escaped either. That is THRIFT-6236 and not part of this change.
   
   JIRA: [THRIFT-6371](https://issues.apache.org/jira/browse/THRIFT-6371)
   
   - [x] Apache Jira ticket: THRIFT-6371
   - [x] PR title follows "THRIFT-NNNN: describe my issue"
   - [x] Single commit
   - [x] No breaking change: the affected generated code did not load before.
   - [x] Code change, so the commit carries no CI-skip marker.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] THRIFT-6371: Quote a uuid constant in the Lua generator [thrift]

Posted by "Jens-G (via GitHub)" <gi...@apache.org>.
Jens-G merged PR #3953:
URL: https://github.com/apache/thrift/pull/3953


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org