You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I'm trying to use a library from LuaRocks to support utf8 strings in LuaJIT, since it does not provide a utf8 library like Lua 5.3 and Lua 5.4 do. To require that library, I must use require 'utf8'. But the fields defined in the library are not recognized, the Lua 5.3 library is recognized instead.
To Reproduce
Steps to reproduce the behavior:
Set the runtime environment to LuaJIT.
Create a file called utf8.lua with this content:
return { match=function() end }
Create another file and type:
localutf8=require'utf8'utf8.match()
See that match will show a warning of undefined field.
Expected behavior
It is expected that if the runtime environment is set to a Lua version that does not have the utf8 library, it shouldn't be recognized, allowing an external library with the same name to be required.
Screenshots
Environment (please complete the following information):
OS: Ubuntu 20.04
Is WSL remote? No
Client: VSCode
The text was updated successfully, but these errors were encountered:
Describe the bug
I'm trying to use a library from LuaRocks to support utf8 strings in LuaJIT, since it does not provide a utf8 library like Lua 5.3 and Lua 5.4 do. To require that library, I must use
require 'utf8'
. But the fields defined in the library are not recognized, the Lua 5.3 library is recognized instead.To Reproduce
Steps to reproduce the behavior:
utf8.lua
with this content:match
will show a warning of undefined field.Expected behavior
It is expected that if the runtime environment is set to a Lua version that does not have the
utf8
library, it shouldn't be recognized, allowing an external library with the same name to be required.Screenshots

Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: