Skip to content

Conversation

Copy link

Copilot AI commented Oct 28, 2025

  • Rename luaopen_re to luaopen_lpeg_re in generated code
  • Update main.c to register the module as 'lpeg.re' instead of 're'
  • Update luvi.h to declare luaopen_lpeg_re instead of luaopen_re
  • Modify luac.lua to generate proper function names for submodules
  • Add unit tests for both require('lpeg.re') and require('lpeg')
  • Test the changes with both build configurations
  • Ensure backward compatibility is considered
Original prompt

This section details on the original issue you should resolve

<issue_title>refactor luaopen_re to luaopen_lpeg_re</issue_title>
<issue_description>In #307, we introduce luaopen_re, support require('re') to imporet RE module.

  1. Not match require('lpeg.re')
  2. only works when BUNDLE_USE_LUA2C set ON, compile fail when set OFF.
  3. Without unit test.
  4. Maybe cause Compilation Fails with Segmentation Fault on ARM64 (RK3568) when Building lpeg/re.lua #304

I think we need fix this. @Bilal2453 @truemedian @squeek502 </issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor luaopen_re to luaopen_lpeg_re

2 participants