Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): bump rhai from 1.16.3 to 1.17.0 in /native/rhai_rustler #162

Closed

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jan 31, 2024

Bumps rhai from 1.16.3 to 1.17.0.

Release notes

Sourced from rhai's releases.

v1.17.0

Starting from this version, the official preferred method of registering an API for a custom type is via the #[derive(CustomType)] macro. The old API is still available for types that reside in external crates (and thus cannot implement CustomType).

Starting from this version, the new FuncRegistration API is preferred for registering native Rust functions into a Module. The old API is still available but deprecated.

Starting from this version, fuzzing via Google OSS-Fuzz is used to flush out hidden bugs and edge cases. This should result in higher code quality, better stability and improved security. And indeed, a large number of bugs have been discovered from this and fixed.

Potentially breaking changes

  • ImmutableString now derefs to &str instead of &SmartString. Normally this should not be a breaking change.
  • Traits implemented by ImmutableString are cleaned up. Normally this should not be a breaking change.
  • EvalContext::new, FloatWrapper and ConditionalExpr are now gated under internals.
  • Previously, Rhai follows Unicode's definition for whitespace, which allows many exotic whitespace characters in scripts. Starting from this version, whitespace follows WhatWG's definition of five ASCII characters (TAB, SPACE, CR, LF and FF), which is the same as Rust. All other Unicode whitespace characters (not inside strings) are not considered whitespace by Rhai. If a script used to contain non-ASCII whitespace characters, it now fails to parse with a syntax error.

New features

  • #[derive(CustomType)] is now available, driven by procedural macros in rhai_codegen.
  • A new FuncRegistration API is added to assist in registering native Rust functions into modules with various settings. Some of the original Module::set_fn... API is now deprecated.
  • Functions defined in plugin modules can now be marked as volatile which prevents it from being optimized away even under OptimizationLevel::Full.
  • Added Engine::max_functions and Engine::set_max_functions to limit the maximum number of functions allowed in a script. This is to guard against DOS attacks -- e.g. a simple closure || (two characters) is a function. When max_function is exceeded during script compilation, a new parse error, ParseErrorType::TooManyFunctions, is returned.
  • Engine::get_interned_string is made public instead of gated under internals.

Deprecated API's

  • rhai::config::hashing::set_ahash_seed, rhai::config::hashing::get_ahash_seed and the RHAI_AHASH_SEED environment variable are deprecated in favor of rhai::config::hashing::set_hashing_seed, rhai::config::hashing::get_hashing_seed and RHAI_HASHING_SEED.
  • AST::clear_doc is deprecated.
  • Much of the Module::update_XXX API is deprecated in favor of using the FuncRegistration API.
  • Module::gen_fn_signatures is deprecated in favor of Module::gen_fn_signatures_with_mapper.

Fixes to bugs found via fuzzing

  • Fixed crash when parsing multi-segment interpolated string longer than maximum.
  • Fixed crash when parsing unterminated comment.
  • Fixed crash when parsing deeply-nested right-associated operators such as **.
  • Fixed crash when parsing combo-chaining expressions such as (a.b).c.
  • Fixed crash when calling functions that have Dynamic parameters with more than 16 parameters.
  • Fixed crash when indexing into an empty array with negative index.
  • Indexing into an array with a negative index that is larger than the length of the array now throws an out-of-bounds error (similar to positive indices) instead of defaulting to the first element.
  • Fixed edge-case crash in timestamp functions.
  • Fixed crash when indenting a block doc-comment with Unicode multi-byte space characters.
  • Fixed improper parsing of numbers with too many decimal points.
  • Fixed exponential running time when raising a decimal number to a very large power (> 1 million) -- it now returns an overflow error.
  • Shared values that contain reference loops no longer cause a stack overflow when printing.
  • sleep no longer panics on NaN.
  • switch on ranges now work properly.

... (truncated)

Changelog

Sourced from rhai's changelog.

Version 1.17.0

Starting from this version, the official preferred method of registering an API for a custom type is via the #[derive(CustomType)] macro. The old API is still available for types that reside in external crates (and thus cannot implement CustomType).

Starting from this version, the new FuncRegistration API is preferred for registering native Rust functions into a Module. The old API is still available but deprecated.

Starting from this version, fuzzing via Google OSS-Fuzz is used to flush out hidden bugs and edge cases. This should result in higher code quality, better stability and improved security. And indeed, a large number of bugs have been discovered from this and fixed.

Potentially breaking changes

  • ImmutableString now derefs to &str instead of &SmartString. Normally this should not be a breaking change.
  • Traits implemented by ImmutableString are cleaned up. Normally this should not be a breaking change.
  • EvalContext::new, FloatWrapper and ConditionalExpr are now gated under internals.
  • Previously, Rhai follows Unicode's definition for whitespace, which allows many exotic whitespace characters in scripts. Starting from this version, whitespace follows WhatWG's definition of five ASCII characters (TAB, SPACE, CR, LF and FF), which is the same as Rust. All other Unicode whitespace characters (not inside strings) are not considered whitespace by Rhai. If a script used to contain non-ASCII whitespace characters, it now fails to parse with a syntax error.

New features

  • #[derive(CustomType)] is now available, driven by procedural macros in rhai_codegen.
  • A new FuncRegistration API is added to assist in registering native Rust functions into modules with various settings. Some of the original Module::set_fn... API is now deprecated.
  • Functions defined in plugin modules can now be marked as volatile which prevents it from being optimized away even under OptimizationLevel::Full.
  • Added Engine::max_functions and Engine::set_max_functions to limit the maximum number of functions allowed in a script. This is to guard against DOS attacks -- e.g. a simple closure || (two characters) is a function. When max_function is exceeded during script compilation, a new parse error, ParseErrorType::TooManyFunctions, is returned.
  • Engine::get_interned_string is made public instead of gated under internals.

Deprecated API's

  • rhai::config::hashing::set_ahash_seed, rhai::config::hashing::get_ahash_seed and the RHAI_AHASH_SEED environment variable are deprecated in favor of rhai::config::hashing::set_hashing_seed, rhai::config::hashing::get_hashing_seed and RHAI_HASHING_SEED.
  • AST::clear_doc is deprecated.
  • Much of the Module::update_XXX API is deprecated in favor of using the FuncRegistration API.
  • Module::gen_fn_signatures is deprecated in favor of Module::gen_fn_signatures_with_mapper.

Fixes to bugs found via fuzzing

  • Fixed crash when parsing multi-segment interpolated string longer than maximum.
  • Fixed crash when parsing unterminated comment.
  • Fixed crash when parsing deeply-nested right-associated operators such as **.
  • Fixed crash when parsing combo-chaining expressions such as (a.b).c.
  • Fixed crash when calling functions that have Dynamic parameters with more than 16 parameters.
  • Fixed crash when indexing into an empty array with negative index.
  • Indexing into an array with a negative index that is larger than the length of the array now throws an out-of-bounds error (similar to positive indices) instead of defaulting to the first element.

... (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 show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @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)

Bumps [rhai](https://github.com/rhaiscript/rhai) from 1.16.3 to 1.17.0.
- [Release notes](https://github.com/rhaiscript/rhai/releases)
- [Changelog](https://github.com/rhaiscript/rhai/blob/main/CHANGELOG.md)
- [Commits](rhaiscript/rhai@v1.16.3...v1.17.0)

---
updated-dependencies:
- dependency-name: rhai
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file rust Pull requests that update Rust code labels Jan 31, 2024
Copy link
Contributor Author

dependabot bot commented on behalf of github Feb 2, 2024

Superseded by #164.

@dependabot dependabot bot closed this Feb 2, 2024
@dependabot dependabot bot deleted the dependabot/cargo/native/rhai_rustler/rhai-1.17.0 branch February 2, 2024 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants