eigenein / my-iot-rs

Yet another home automation (alpha)
https://eigenein.github.io/my-iot-rs/html
MIT License
32 stars 5 forks source link

⬆️ Bump rhai from 0.18.3 to 0.19.2 #178

Closed dependabot[bot] closed 3 years ago

dependabot[bot] commented 3 years ago

Bumps rhai from 0.18.3 to 0.19.2.

Release notes

Sourced from rhai's releases.

v.0.19.2

This version adds a variable resolver with the ability to short-circuit variable access, plus a whole bunch of array methods.

Version 0.19.2 released to crates.io.

Breaking changes

  • AST::iter_functions now returns an iterator instead of taking a closure.
  • Module::get_script_function_by_signature renamed to Module::get_script_fn and returns &<Shared<ScriptFnDef>>.
  • Module::num_fn, Module::num_var and Module::num_iter are removed and merged into Module::count.
  • The merge_namespaces parameter to Module::eval_ast_as_new is removed and now defaults to true.
  • GlobalFileModuleResolver is removed because its performance gain over the FileModuleResolver is no longer very significant.
  • The following EvalAltResult variants are removed and merged into EvalAltResult::ErrorMismatchDataType: ErrorCharMismatch, ErrorNumericIndexExpr, ErrorStringIndexExpr, ErrorImportExpr, ErrorLogicGuard, ErrorBooleanArgMismatch
  • Scope::iter_raw returns an iterator with an additional field indicating whether the variable is constant or not.
  • rhai::ser and rhai::de namespaces are merged into rhai::serde.
  • New reserved symbols: ++, --, .., ....
  • Callback signature for custom syntax implementation function is changed to allow for more flexibility.
  • Default call stack depth for debug builds is reduced to 12 (from 16).
  • Precedence for ~ is raised, while in is moved below logic comparison operators.

New features

  • New Engine::on_var to register a variable resolver.
  • const statements can now take any expression (or none at all) instead of only constant values.
  • OptimizationLevel::Simple now eagerly evaluates built-in binary operators of primary types (if not overloaded).
  • is_def_var() to detect if variable is defined, and is_def_fn() to detect if script function is defined.
  • Dynamic::from(&str) now constructs a Dynamic with a copy of the string as value.
  • AST::combine and AST::combine_filtered allows combining two AST's without creating a new one.
  • map, filter, reduce, reduce_rev, some, all, extract, splice, chop and sort functions for arrays.
  • New Module::set_iterable and Module::set_iterator to define type iterators more easily. Engine::register_iterator is changed to use the simpler version.

Enhancements

  • Many one-liners and few-liners are now marked #[inline] or [inline(always)], just in case it helps when LTO is not turned on.

v.0.19.0

The major new feature for this version is Plugins support, powered by procedural macros. Plugins make it extremely easy to develop and register Rust functions with an Engine.

Version 0.19.0 released to crates.io.

Bug fixes

  • if statement with an empty true block would not evaluate the false block. This is now fixed.
  • Fixes a bug in Module::set_fn_4_mut.

... (truncated)

Changelog

Sourced from rhai's changelog.

Version 0.19.2

Bug fix on call module functions.

Version 0.19.1

This version adds a variable resolver with the ability to short-circuit variable access, plus a whole bunch of array methods.

Breaking changes

  • AST::iter_functions now returns an iterator instead of taking a closure.
  • Module::get_script_function_by_signature renamed to Module::get_script_fn and returns &<Shared<ScriptFnDef>>.
  • Module::num_fn, Module::num_var and Module::num_iter are removed and merged into Module::count.
  • The merge_namespaces parameter to Module::eval_ast_as_new is removed and now defaults to true.
  • GlobalFileModuleResolver is removed because its performance gain over the FileModuleResolver is no longer very significant.
  • The following EvalAltResult variants are removed and merged into EvalAltResult::ErrorMismatchDataType: ErrorCharMismatch, ErrorNumericIndexExpr, ErrorStringIndexExpr, ErrorImportExpr, ErrorLogicGuard, ErrorBooleanArgMismatch
  • Scope::iter_raw returns an iterator with an additional field indicating whether the variable is constant or not.
  • rhai::ser and rhai::de namespaces are merged into rhai::serde.
  • New reserved symbols: ++, --, .., ....
  • Callback signature for custom syntax implementation function is changed to allow for more flexibility.
  • Default call stack depth for debug builds is reduced to 12 (from 16).
  • Precedence for ~ is raised, while in is moved below logic comparison operators.

New features

  • New Engine::on_var to register a variable resolver.
  • const statements can now take any expression (or none at all) instead of only constant values.
  • OptimizationLevel::Simple now eagerly evaluates built-in binary operators of primary types (if not overloaded).
  • is_def_var() to detect if variable is defined, and is_def_fn() to detect if script function is defined.
  • Dynamic::from(&str) now constructs a Dynamic with a copy of the string as value.
  • AST::combine and AST::combine_filtered allows combining two AST's without creating a new one.
  • map, filter, reduce, reduce_rev, some, all, extract, splice, chop and sort functions for arrays.
  • New Module::set_iterable and Module::set_iterator to define type iterators more easily. Engine::register_iterator is changed to use the simpler version.

Enhancements

  • Many one-liners and few-liners are now marked #[inline] or [inline(always)], just in case it helps when LTO is not turned on.

Version 0.19.0

The major new feature for this version is Plugins support, powered by procedural macros.

... (truncated)

Commits


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
dependabot[bot] commented 3 years ago

Superseded by #180.