gjtorikian / selma

Selma selects and matches HTML nodes using CSS rules. Backed by Rust's lol_html parser.
MIT License
56 stars 3 forks source link

Bump magnus from 0.6.4 to 0.7.1 #59

Closed dependabot[bot] closed 4 months ago

dependabot[bot] commented 4 months ago

Bumps magnus from 0.6.4 to 0.7.1.

Release notes

Sourced from magnus's releases.

0.7.1

Magnus 0.7.1 is a patch release, with 1 documentation fix.

Fixes building docs against Ruby 3.0. This should resolve building docs for docs.rs.

See the 0.7.0 release for what's new in 0.7.

0.7.0

Magnus 0.7.0 adds many features, but should be largely compatible with 0.6.

Magnus is a Rust library providing a high-level easy-to-use interface to the C API of the Ruby programming language. Magnus lets you write Ruby extension libraries (or 'gems') in Rust, or embed Ruby in your Rust program.

API changes

Magnus 0.5 and earlier would allow you to create Ruby objects with associated functions, like RArray::new. In Magnus 0.6 a new set of APIs for creating Ruby objects was added, as methods on a Ruby handle that can only be obtained on a Ruby thread. 0.7 begins the deprecation of the associated functions with the old-api feature. This feature is enabled by default, but if disabled the old-api functions will issue deprecation warnings. Disable this feature to get an early start on migrating these functions to the new API.

As part of the same effort, closures and functions used as Ruby blocks or procs now take an additional first argument of &Ruby.

The ruby-static feature has been removed. Instead enable the feature for rb-sys in your Cargo.toml like so:

rb-sys = { version = "*", features = ["ruby-static"] }

New Features

  • Support for Ruby's Thread api via methods to create threads on the Ruby type and the Thread type.
  • Support for Ruby's Mutex api via methods to create a mutex on the Ruby type and the Mutex type.
  • Support for Ruby's Fiber api via methods to create fibers on the Ruby type and the Fiber type (on Ruby versions 3.1 and up).
  • A Time type representing instances of Ruby's Time class that will convert to/from std::time::SystemTime.
  • r_array::TypedArray, a Ruby Array that may only contain elements of type T. On creation the Array is hidden from Ruby, and must be consumed to pass it to Ruby (where it reverts to a regular untyped Array). It is then inaccessible to Rust.
  • magnus::Integer now implements PartialEq, PartialOrd, Add, Sub, Mul, and Div so it can be used with mathematical operators like + and -.
  • Ruby::define_data for working with Ruby's Data class (Ruby 3.3 and up only).
  • RArray implements IntoIterator.
  • IntoError is a new trait for converting types to magnus::Error. Functions returning to Ruby can now return Result where the error type is any type that implements IntoError.

Upgrading

Upgrading from Magnus 0.6 should be straightforward. If upgrading from 0.5 or earlier, it's recommended to upgrade to 0.6 first.


See the changelog for all the changes.

Thanks

@​Maaarcocr for implementing the Add et al traits for Integer. @​adampetro for contributions to the implementation of IntoIterator for RArray. @​macournoyer for fixes to Error. @​y-yagi and @​gjtorikian for fixing typos.

Changelog

Sourced from magnus's changelog.

[0.7.1] - 2024-06-30

Fixed

  • Building docs with Ruby 3.0

[0.7.0] - 2024-06-30

Added

  • Thread, Ruby::thread_create/thread_create_from_fn and other thread APIs.
  • Mutex, Ruby::mutex_new and other mutex APIs.
  • Fiber, Ruby::fiber_new/fiber_new_from_fn and other fiber APIs (requires Ruby >= 3.1).
  • Ruby::ary_try_from_iter is an efficient way to create a Ruby array from a fallible Rust iterator.
  • Ruby::hash_from_iter and Ruby::hash_try_from_iter.
  • RFile implements AsRawFd.
  • TypedArray<T>, a Ruby Array that may only contain elements of type T. On creation the Array is hidden from Ruby, and must be consumed to pass it to Ruby (where it reverts to a regular untyped Array). It is then inaccessible to Rust.
  • Implement IntoIterator for RArray.
  • Implement PartialEq, PartialOrd, Add, Sub, Mul, and Div for Integer.
  • Time with automatic conversion to/from std::time::SystemTime.
  • Ruby::alias_variable.
  • Ruby::waitpid.
  • RHash::lookup2.
  • Ruby::define_data new for Ruby 3.3.
  • IntoError trait for conversion to Error, plus impl ReturnValue for Result<T, E> where E: IntoError to allow returning custom error types to Ruby.

Changed

  • Closures/Functions used as Ruby blocks/procs take an additional first argument of &Ruby.

Deprecated

  • RArray::each. Please use ary.into_iter() or ary.enumeratorize("each", ()) instead.

Removed

  • deprecated-send-sync-value feature.
  • ruby-static feature. Instead enable the feature for rb-sys in your Cargo.toml like so: rb-sys = { version = "*", features = ["ruby-static"] }
  • typed_data::Obj::get.
  • The QTRUE, QFALSE, and QNIL constants.
  • Class::undef_alloc_func.
  • Value::try_convert.
  • Binding.
  • gc::{mark, mark_slice, mark_movable, location}.
  • RStruct::as_slice.

... (truncated)

Commits
  • eb0d8ef bump version to 0.7.1
  • 4250b30 fix building docs under ruby 3.0
  • 0937086 prepare for 0.7.0 release
  • 84d917b Merge pull request #110 from macournoyer/cloneable-error
  • 6793884 Make Error and OpaqueError cloneable
  • 324f57e better note as to why ci skips ruby 3.1/macos-14
  • d24a8f3 update changelog for 0.6.4 release
  • fb83309 fix potential deadlock in Lazy
  • 458b1e8 fix Cargo.lock for gem examples
  • 6277554 allow returning custom error types with automatic conversion to Error
  • Additional commits viewable in compare view


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 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)
gjtorikian commented 4 months ago

set in #58

dependabot[bot] commented 4 months ago

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.