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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to