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
I used to just push a string if the load failed, like the examples do, but I thought I'd try also pushing sol::nil but that still doesn't work. When a module isn't found, the string that I push isn't displayed in the error, just that module x could not be found or something like that. And in my test code, I'm require-ing a module that I know for a fact is available, but Lua still can't find it. Is this a bug or am I just messing up somehow? (For reference, the modules map is an std::unordered_map<std::string, sol::table>, protected by a std::shared_mutex and initialized via a std::once_flag. (The mutex probably isn't necessary but I'm intending to add a threading module so the modules map will need to be accessed potentially from multiple threads.)
The text was updated successfully, but these errors were encountered:
I'm uncertain if this is the place for questions, but I might be doing something wrong and this might not be a bug with Sol2 at all.
What's happening is that when I create a Lua state like so:
Modules that I know I've included aren't being loaded by
require
. My module function is like this:I used to just push a string if the load failed, like the examples do, but I thought I'd try also pushing
sol::nil
but that still doesn't work. When a module isn't found, the string that I push isn't displayed in the error, just thatmodule x could not be found
or something like that. And in my test code, I'mrequire
-ing a module that I know for a fact is available, but Lua still can't find it. Is this a bug or am I just messing up somehow? (For reference, the modules map is anstd::unordered_map<std::string, sol::table>
, protected by astd::shared_mutex
and initialized via astd::once_flag
. (The mutex probably isn't necessary but I'm intending to add a threading module so the modules map will need to be accessed potentially from multiple threads.)The text was updated successfully, but these errors were encountered: