Skip to content

v1.8.0

Choose a tag to compare

@schungx schungx released this 01 Jul 04:52
· 1719 commits to main since this release
60e3661

This version includes a number of usability improvements, especially the Elvis operator ?. and null-coalescing operator ??.

Bug fixes

  • Self-contained AST now works properly with Engine::call_fn.
  • Missing to_int from Decimal is added.
  • Parsing of index expressions is relaxed and many cases no longer result in an index-type error to allow for custom indexers. Closes #562
  • Merging or combining a self-contained AST into another AST now works properly.
  • Plugin modules/functions no longer generate errors under #![deny(missing_docs)].
  • Calling a property on a function call that returns a shared value no longer causes an error. Closes #573
  • Strict Variables Mode now checks for module namespaces within functions as well. Closes #574
  • Module defined via Engine::register_static_module are now checked in Strict Variables Mode.

Reserved Symbols

  • ?, ??, ?., ?[ and !. are now reserved symbols.

Deprecated API's

  • FnPtr::num_curried is deprecated in favor of FnPtr::curry().len().

New features

  • The Elvis operators (?. and ?[) are now supported for property access, method calls and indexing.
  • The null-coalescing operator (??) is now supported to short-circuit () values.

Enhancements

  • Indexing and property access are now faster.
  • EvalAltResult::IndexNotFound is added to aid in raising errors for indexers.
  • Engine::default_tag, Engine::default_tag_mut and Engine::set_default_tag are added to manage a default value for the custom evaluation state, accessible via EvalState::tag() (which is the same as NativeCallContext::tag()). Closes #563
  • Originally, the debugger's custom state uses the same state as EvalState::tag() (which is the same as NativeCallContext::tag()). It is now split into its own variable accessible under Debugger::state().
  • Non-borrowed string keys can now be deserialized for object maps via serde.
  • Scope::get is added to get a reference to a variable's value.
  • Variable resolvers can now return a shared value which can be mutated.