Releases: ThePhD/sol2
sol::readonly and std.container fixes
This release is a small patchfix to fix the way sol::readonly
and std::
containers behave with move-only types. Documentation was updated for sol::readonly
and the library was vetted for uses of is_const
and is_copy_assignable
. Documentation was also updated for Compiler Errors
under the Error
page in the sol2 documentation: http://sol2.readthedocs.io/en/latest/errors.html#compiler-errors-warnings
Please do upgrade as soon as possible!
this_environment
This release includes some fixes for LuaJIT's beta. Please use LuaJIT-beta3, and not LuaJIT-beta2, as it is redefining some functions present in the compatibility wrapper but does not include its semantic versioning scheme in any of its macros in a usable format.
This also fixes a bug in VS2013 CTP+ that does not perform qualified name lookup properly, even with a template alias.
Finally, this_environment
-- a convenience transparent function -- is now in sol2. Note that it does not work too terribly well when combined with someone calling a Lua function directly from C++ using std::function
, sol::function
, or similar. But, it will capture the environment of a script or function in a script calling your code fairly effectively.
Docs: http://sol2.readthedocs.io/en/latest/api/this_environment.html
Have fun!
Getting Environments and performance tweaks
This release adds the ability to get environments from Lua, because I sort of forgot about that when we were implementing setting environments and it never came up until now!
This is a minor release, unless you really need the above feature. Then it's probably major for you! Also some minor fixes, here 'n' there.
Script-Call Safety, Environments, and better Examples!
I never expected to make this release, but just a short while after 2.16 there is now a 2.17.0! This release includes Environments, alongside a number of small bugfixes related to globals and static order initialization explosions.
state_view::script
: overloads for accepting environments and error handling functionssol::environment
: support for sandboxing code more easily and inheriting parent environmentssol::new_table/sol::create
: for creating new tables easier without an emptystate_view::create_table
call.Improved Examples
: for environments on functions and being safe while calling a script!
New Usertype Constructor, Runtime Extensible, Better Examples, Improved Doc Search
This release adds a new type of constructor syntax to usertypes and also allows them to be extended with methods defined in Lua at runtime or added through the named usertype table using the Lua API in C++. It also fixes numerous bugs and beefs up the testing suite to ensure that users are guaranteed a level of functional programming while using sol2.
This also marks a level of "feature-completeness". Beyond users making new recommendations for features, this code is essentially deployment and production ready, as it has been for several releases, but now even moreso. There are no more planned features until C++21/22, when reflection will allow us to automate usertype creation entirely.
Thanks for helping to make sol2 a wonderful library, and keep posting issues when you come across them!
Usertype Improvements, Constructor Fixes
Bugfixes Galore
This release fixes many bugs that were filed between now and the last release, improving stability and solving a few very subtle "ouches" that affected a small portion of users rather prominently. Thanks to everyone who reported issues!
It is highly recommended to upgrade to this version immediately, even if none of the bugs affected you directly.
Thread and State Awareness
This release adds some state and thread awareness to the various pushers for sol2, making it easier to work with threads and pass arguments off to coroutines inside of C++.
Fixes:
#309 - this issue inspired adding the support as well as figuring out more about threading in general
Bugfixes
This release addresses a number of minor bugs and provides some updated documentation, as well as gives a new definition for handling Lua compiled as C++.
Fixes:
#306 - Building Lua as C++ now has a definition to make it easier to work with sol2: http://sol2.readthedocs.io/en/latest/errors.html#linker-errors
#304 - LuaJIT condition fixes
#305 - default handlers becoming invalid for a given Lua state (still potentially problematic: e.g., see multiple Lua states and the fact that the function is static, provides a bit of a problem)
#301 - Thread state deadness was default-defined, now defined to an out-of-the-way value
#300 - Apple build failures not a problem, thankfully
Copy Leak Fix
This release addresses a long-standing fix that would drop a reference and leak it when copying. The fix was really simple but it's really important, so upgrade immediately!
- Fixes #284