Skip to content

Releases: moonsharp-devs/moonsharp

v3.0.0 Beta #1

03 Mar 07:02

Choose a tag to compare

v3.0.0 Beta #1 Pre-release
Pre-release
  • Dropped support for .NET < 4.5 and consequently old Unity builds (< 2019).
  • Newly added json.emptyarray() which is a special (userdata) token which will be encoded in JSON as [].
    • This is in contrast to an empty Lua table which is encoded in JSON as {}.
  • Newly added json.isemptyarray(obj) which will return true if obj is our JSON empty array token.
  • json.parse now optionally takes a second parameter i.e. signature is json.parse(str, empty_array_tokens = false).
    • When empty_array_tokens is true, all [] are decoded as json.emptyarray() as opposed to an empty Lua table.
    • Handling empty array tokens does take some care, so the default behavior of json.parse(str) is unchanged.
  • Added debugger support for closure vars, globals and REPL at various stack frames.
  • Added support for conditional breakpoints.
  • Added support for delayed stack trace loading.
  • Multiple Script are now represented as threads when debugging, so you can properly debug multiple scripts simultaneously.
  • Fixed issues with Unity's ToString() throwing an exception that broke the debugger's ability to fetch variables.
  • Fixed support for expression evaluation when debugging a coroutine.
  • Fixed issue with MoonSharp breaking at the same breakpoint after continuing, but not informing VSCode that execution has paused.

2.0.0.0

14 Oct 17:19

Choose a tag to compare

  • Visual Studio Code debugging now supports multiple script objects
  • Support for .NET Core
  • Support for Unity WebGL
  • Support for WSA targets at source level
  • Improved support of other Unity targets
  • Unity package is now included inside distribution zip file (easier to use and faster to deploy than the asset store)
  • Stripped source distribution is now included inside distribution zip file (to ease custom framework builds)
  • Improved compatibility layer for API changes between .NET framework releases
  • Fixed : NuGet packages for VsCode debugger were broken
  • Fixed : VsCode debugger breakpoints might get missed
  • Fixed : VsCode debugger keeps the program running on exit because of a foreground thread
  • Fixed an issue where hardwiring a delegate generated invalid ctor calls #158 (thanks issingle)

1.8.0.0

07 Oct 13:06

Choose a tag to compare

  • Support for debugging from Visual Studio Code (see here for details)
  • Serialization/Deserialization of tables and objects to JSON
  • JSON library added
  • Unity Asset Store package - now in "pending approval" stage
  • Various (breaking) changes to debugger infrastructure
  • Added optional args to Script.DoFile, Script.DoString and Script.DoStream methods
  • Fixed issues and added optional args to Script.DoFileAsync, Script.DoStringAsync and Script.DoStreamAsync methods (.NET 4.x and PCL targets only)
  • Fixed a minor bug in table serialization of string fields

Warning : this version has some minor but breaking changes for custom debuggers. If you have implemented a custom debugger, be prepared to add a couple of new methods to your object (empty methods are enough).

1.7.0.0

03 Oct 14:10

Choose a tag to compare

  • Behaviour of C# functions called using the colon ':' operator can be chosen using the ColonOperatorClrCallbackBehaviour Script option (see also #149).
  • Vastly improved performance of table insertion #144 (thanks nshibano)
  • Vastly improved performance of table appends (somewhat related to #144)
  • Added disposability to debugger host chain #150 (thanks aravol)
  • Fixed : require didn't always skip loading already loaded modules
  • Fixed : Table.Clear crashing #151 (thanks JokieW)
  • Fixed : Error loading moonsharp.exe #148 (thanks InfectedBytes)
  • Fixed : Script processing fails on files smaller than 8 bytes ... #145 (thanks nagblock)
  • Fixed : SyntaxErrorException On valid lua syntax #147 (thanks andreluis034)
  • Fixed : Hexadecimal numbers were accepted with weird prefixes (like 5x1234)
  • Fixed : MoonSharp clobber syntex error details during require #121 (thanks fgretief)

1.6.0.0

16 May 12:19

Choose a tag to compare

  • Added a RethrowExceptionNested option to Script.GlobalOptions which instead of doing a plain re-throw of exceptions, embeds them in the InnerException property of a new exception object. Useful to simplify handling (newer exceptions are automatically decorated) and to preserve stack traces on Mono/Unity (annoying Mono bug..)
  • Removed _ENV tables from serialized bytecode (thanks Matija Hustić)
  • Added non-standard contains, startsWith and endsWith methods to string module.
  • Refactored the Table class's Set/Get methods to be more symmetrical, with added RawGet, Remove and Append methods (thanks Francois Retief)
  • Added strong names (thanks Fernando P. Najera Cano)
  • Fixed : Events missing add or remove methods could cause a NullReferenceException
  • Fixed : __newindex metamethod can completely break the MoonSharp VM (bad bad bug)
  • Fixed : Lexer matched non-western digits as valid numbers (if you are a .NET developer, recommended read: this - ouch)

1.5.0.1

09 Feb 17:50

Choose a tag to compare

  • Hardwiring.
  • DynValue.NewPrimeTable() to create a prime table, that is a table which can be shared between Scripts
  • Special syntax for table constructor ${ ... } which can be used to declare a "prime" table.
  • Serialization of prime tables as exchange data format
  • Created IRegistrationPolicy interface to customize the type registration process
  • Fixed: changing the first upvalue of a chunk did not change the _ENV of that chunk (#126)
  • Fixed: UserData.RegisterAssembly was not registering types correctly if no assembly was passed

1.2.1.0

24 Jan 14:40

Choose a tag to compare

  • Support for proxy objects - a nice way to encapsulate objects exposed to script and create the base for many clever tricks
  • Support for sub-objects in property assigners
  • MoonSharpHide attribute to specify members not to be exposed to Lua scripts
  • MoonSharpVisible attribute now can be added to constructors too
  • MoonSharpHidden attribute as a shortcut for MoonSharpVisible(false) also in an easier namespace to use
  • UnityAssetScriptLoader has new constructors which don't require reflection use (to ease IL2CPP porting, which is a pain in any case)
  • Fixed a weird bug with using the same destination variable twice in a for-iterator statement (while syntax is parsed correctly, behavior is still undefined as it's not really correct Lua)

1.1.0.0

08 Dec 13:43

Choose a tag to compare

  • New feature: Preemptive coroutines to limit time spent in scripts while preserving state.
  • Added Script parameter to custom converters - this might break compatibility if you were getting custom converters. (Issue #118)
  • Added methods to easily build an array table from a DynValue array.
  • Fixed issue #117 - long empty comments not lexed correctly.

1.0.0.0

23 Oct 06:00

Choose a tag to compare

  • Added a PropertyTableAssigner facility which allows POCO objects made of properties to be filled by deserialization of a table.
  • Added a DebuggerEnabled property so that the debugger can be disabled for specific scripts invocations (issue #113)
  • Script loading now uses an access mode which allows shared operations (thanks Atom0s)
  • Fixed: Capturing varargs in table from inner scope causes null ref exception (issue #110)
  • Fixed: Event re-registration might now work (issue #112)
  • Fixed: error messages in load and loadfile functions were at times unhelpful (issue #107)

Plus.. hey it's 1.0!

0.9.8.0

09 Jul 10:43

Choose a tag to compare

  • Fixed a major bug in how variable arguments were handled (issue #92)
  • Fixed a problem with the registration of extension types (issue #100)
  • Fixed a potential incompatibility with IronPython and assembly auto-discovery (issue #96)
  • Fixed an invalid datetime format specifier in os module (thanks edwingeng) (issue #99)
  • Ownerships checks added to scripts, tables and closures (issue #93)