[lua] Stub EReg for -D lua-vanilla mode #12484
Open
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.
Note for simn, I'm gradually chipping away at some of the leftover issues from Lua. And jotting down a few points where I hit some foot guns. I'm using AI to help generate stub files and to write tests. It's all things I wanted to do before but just couldn't find the motivation/time. I can finish off the rest of the lua-vanilla issues, but wanted to give you a chance to see the basic intent before I added a bunch of stuff.
Summary
-D lua-vanilla, real implementation otherwiseNotImplementedExceptionat runtime with a clear error message-D lua-vanillais ignored #12063 - removes the lrexlib-pcre2 dependency when using lua-vanillaBackground
The
#errordirective approach in_stdoverride files triggers eager file scanning, causing compilation failures even when the type isn't used. This PR uses conditional compilation with a runtime stub instead.Remaining work for #12063
Other modules still need the same treatment:
Sys.hx(luv)sys/FileSystem.hx(luv)sys/io/Process.hx(luv)sys/net/*.hx(luasocket)sys/ssl/Socket.hx(luasec)haxe/iterators/StringIterator.hx(lua-utf8)Test plan
-D lua-vanilla-D lua-vanilla