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

Bump magnus from 0.6.4 to 0.7.1 #488

Merged
merged 1 commit into from
Jul 3, 2024

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jul 3, 2024

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 <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 [magnus](https://github.com/matsadler/magnus) from 0.6.4 to 0.7.1.
- [Release notes](https://github.com/matsadler/magnus/releases)
- [Changelog](https://github.com/matsadler/magnus/blob/main/CHANGELOG.md)
- [Commits](matsadler/magnus@0.6.4...0.7.1)

---
updated-dependencies:
- dependency-name: magnus
  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 Jul 3, 2024
@kateinoigakukun kateinoigakukun merged commit 4c66e30 into main Jul 3, 2024
29 checks passed
@kateinoigakukun kateinoigakukun deleted the dependabot/cargo/magnus-0.7.1 branch July 3, 2024 02:32
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
Development

Successfully merging this pull request may close these issues.

None yet

1 participant