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

[163] Integrate with rb-sys #172

Open
wants to merge 75 commits into
base: master
Choose a base branch
from

Conversation

goyox86
Copy link
Contributor

@goyox86 goyox86 commented Feb 17, 2023

Addresses #163

This PR migrates using the rb-sys crate to interface with CRuby instead of the homegrown derived from Rubysys.
Additionally it incorporates improvements to the Rust crate and migrates the CI to Github Actions along some
refreshments to Rust crate code (Rust 2021).

Highlights

  • By using rb_sys we now support Ruby 2.7, 3.0, 3.1, 3.2 and master on Linux, MacOS, and Windows and master all integrated now in CI.
  • CI migrated to Github Actions.
  • We use rb_sys infrastructure to setup our build environment.
  • Pulled as many constants from rb_sys instead of defining them ourselves.
  • Moved all Rust code to Rust 2021 edition and applied idioms (such as implementing From instead of Into to get the Into impl for free).
  • Made as many doctests to run as possible, trying to trigger segfaults and such.
  • Upgraded to rake version 12.
  • Thanks to rb_sys's ruby_test macro we don't need to lock globals on tests, and there are no weird crashes in MacOS and Windows.
  • Removed hand-rolled calculations of arrays and string lengths using rb_sys facilities where possible.
  • Ran a recent lint pass on the examples Ruby code.
  • Fixed initialization of VMs on windows.
  • Doctests had lots of Fixnums around and we don't have those anymore, so I replaced by Integer.

I think there are two breaking changes, I marked them as To-dos, they are most around marking stuff as unsafe.

Left to do

  • Maybe release a new version of rb_sys that allows me to use the new cargo features, since I am using head from Git now. @ianks WDYT?
  • Check the whole libruby linking see if the new version of rutie would be backwards compatible.
  • Double check 1-1 mapping with current public API.
  • Do the Rust docs look good?
  • Check how to build and publish from CI.
  • Release new version of this gem.
  • Shall we squash the commits into less?

src/rubysys/value.rs Outdated Show resolved Hide resolved
src/rubysys/array.rs Outdated Show resolved Hide resolved
src/dsl.rs Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
@goyox86 goyox86 changed the title [RFC-163] Integrate with rb-sys & some minor changes (in place version) [163] Integrate with rb-sys & some minor changes (in place version) Feb 23, 2023
@NuriYuri
Copy link

NuriYuri commented Mar 9, 2023

Outdated comment which was fixed (setup issue) Doesn't seem to work at all on Windows. ![image](https://user-images.githubusercontent.com/7335788/224157746-4a92c597-e8ee-48f5-8303-c89271bfa28b.png)

Also, I decided to use rutie even though someone said magnus is better because magnus simply doesn't build with the target i686-pc-windows-gnu. If you switch to rb-sys we'll not be able to use rutie as well which is kind of problematic.

D:\nuriy\Downloads\rutie>cargo test --doc
    Updating crates.io index
   Compiling libc v0.2.140
   Compiling rutie v0.8.4 (D:\nuriy\Downloads\rutie)
   Compiling lazy_static v1.4.0
    Finished test [unoptimized + debuginfo] target(s) in 22.31s
   Doc-tests rutie

running 219 tests
test src\class\array.rs - class::array::Array::join (line 128) ... FAILED
test src\class\array.rs - class::array::Array::push (line 160) ... FAILED
test src\class\any_object.rs - class::any_object::AnyObject (line 35) ... FAILED
test src\class\array.rs - class::array::Array::pop (line 216) ... FAILED
test src\class\array.rs - class::array::Array::length (line 72) ... FAILED
test src\class\array.rs - class::array::Array::new (line 25) ... FAILED
test src\class\array.rs - class::array::Array (line 660) ... FAILED
test src\class\array.rs - class::array::Array::dup (line 303) ... FAILED
test src\class\array.rs - class::array::Array::at (line 102) ... FAILED
test src\class\any_object.rs - class::any_object::AnyObject (line 23) ... FAILED
test src\class\array.rs - class::array::Array::concat (line 419) ... FAILED
test src\class\array.rs - class::array::Array (line 630) ... FAILED
test src\class\array.rs - class::array::Array::reverse (line 357) ... FAILED
test src\class\array.rs - class::array::Array::reverse_bang (line 387) ... FAILED
test src\class\array.rs - class::array::Array::shift (line 271) ... FAILED
test src\class\class.rs - class::class::Class::allocate (line 180) - compile ... ok
test src\class\array.rs - class::array::Array::sort (line 453) ... FAILED
test src\class\array.rs - class::array::Array::sort_bang (line 484) ... FAILED
test src\class\array.rs - class::array::Array::store (line 189) ... FAILED
test src\class\array.rs - class::array::Array::to_enum (line 515) ... FAILED
test src\class\array.rs - class::array::Array::to_s (line 331) ... FAILED
test src\class\array.rs - class::array::Array::unshift (line 242) ... FAILED
test src\class\array.rs - class::array::Array::with_capacity (line 45) ... FAILED
test src\class\binding.rs - class::binding::Binding::new (line 20) ... FAILED
test src\class\boolean.rs - class::boolean::Boolean::new (line 17) ... FAILED
test src\class\boolean.rs - class::boolean::Boolean::to_bool (line 37) ... FAILED
test src\class\class.rs - class::class::Class (line 14) ... FAILED
test src\class\class.rs - class::class::Class::ancestors (line 226) ... FAILED
test src\class\class.rs - class::class::Class::ancestors (line 244) ... FAILED
test src\class\class.rs - class::class::Class::attr_accessor (line 587) ... FAILED
test src\class\class.rs - class::class::Class::attr_writer (line 563) ... FAILED
test src\class\class.rs - class::class::Class::attr_reader (line 539) ... FAILED
test src\class\class.rs - class::class::Class::define_nested_class (line 341) ... FAILED
test src\class\class.rs - class::class::Class::const_set (line 455) ... FAILED
test src\class\class.rs - class::class::Class::const_get (line 409) ... FAILED
test src\class\class.rs - class::class::Class::new_instance (line 147) - compile ... ok
test src\class\class.rs - class::class::Class::define_nested_module (line 376) ... FAILED
test src\class\class.rs - class::class::Class::from_existing (line 112) ... FAILED
test src\class\class.rs - class::class::Class::get_nested_class (line 269) ... FAILED
test src\class\class.rs - class::class::Class::get_nested_module (line 302) ... FAILED
test src\class\class.rs - class::class::Class::include (line 499) ... FAILED
test src\class\class.rs - class::class::Class::new (line 74) ... FAILED
test src\class\class.rs - class::class::Class::prepend (line 519) ... FAILED
test src\class\encoding.rs - class::encoding::Encoding::default_external (line 58) ... FAILED
test src\class\class.rs - class::class::Class::superclass (line 199) ... FAILED
test src\class\encoding.rs - class::encoding::Encoding::default_internal (line 79) ... FAILED
test src\class\class.rs - class::class::Class::wrap_data (line 615) ... FAILED
test src\class\encoding.rs - class::encoding::Encoding::find (line 131) ... FAILED
test src\class\encoding.rs - class::encoding::Encoding::find (line 153) ... FAILED
test src\class\encoding.rs - class::encoding::Encoding::name (line 105) ... FAILED
test src\class\encoding.rs - class::encoding::Encoding::utf8 (line 18) ... FAILED
test src\class\encoding.rs - class::encoding::Encoding::us_ascii (line 38) ... FAILED
test src\class\encoding.rs - class::encoding::Encoding::is_compatible (line 182) ... FAILED
test src\class\enumerator.rs - class::enumerator::Enumerator::feed (line 161) ... FAILED
test src\class\enumerator.rs - class::enumerator::Enumerator::next (line 22) ... FAILED
test src\class\enumerator.rs - class::enumerator::Enumerator::peek_values (line 106) ... FAILED
test src\class\enumerator.rs - class::enumerator::Enumerator::peek (line 86) ... FAILED
test src\class\enumerator.rs - class::enumerator::Enumerator::next_values (line 49) ... FAILED
test src\class\enumerator.rs - class::enumerator::Enumerator::rewind (line 134) ... FAILED
test src\class\fixnum.rs - class::fixnum::Fixnum::to_i32 (line 87) ... FAILED
test src\class\fixnum.rs - class::fixnum::Fixnum::new (line 21) ... FAILED
test src\class\fixnum.rs - class::fixnum::Fixnum::to_i64 (line 43) ... FAILED
test src\class\fixnum.rs - class::fixnum::Fixnum::to_u32 (line 109) ... FAILED
test src\class\float.rs - class::float::Float::implicit_to_f (line 66) ... FAILED
test src\class\fixnum.rs - class::fixnum::Fixnum::to_u64 (line 65) ... FAILED
test src\class\gc.rs - class::gc::GC::is_marked (line 92) - compile ... ok
test src\class\float.rs - class::float::Float::new (line 21) ... FAILED
test src\class\gc.rs - class::gc::GC::adjust_memory_usage (line 13) ... FAILED
test src\class\float.rs - class::float::Float::to_f64 (line 43) ... FAILED
test src\class\gc.rs - class::gc::GC::count (line 31) ... FAILED
test src\class\gc.rs - class::gc::GC::disable (line 45) ... FAILED
test src\class\gc.rs - class::gc::GC::enable (line 59) ... FAILED
test src\class\gc.rs - class::gc::GC::force_recycle (line 73) ... FAILED
test src\class\gc.rs - class::gc::GC::mark (line 113) ... FAILED
test src\class\gc.rs - class::gc::GC::mark_maybe (line 156) ... FAILED
test src\class\gc.rs - class::gc::GC::mark_locations (line 129) ... FAILED
test src\class\gc.rs - class::gc::GC::register_mark (line 192) ... FAILED
test src\class\gc.rs - class::gc::GC::register (line 172) ... FAILED
test src\class\gc.rs - class::gc::GC::stat (line 224) ... FAILED
test src\class\gc.rs - class::gc::GC::start (line 208) ... FAILED
test src\class\hash.rs - class::hash::Hash::at (line 41) ... FAILED
test src\class\gc.rs - class::gc::GC::unregister (line 240) ... FAILED
test src\class\hash.rs - class::hash::Hash::clear (line 133) ... FAILED
test src\class\hash.rs - class::hash::Hash::delete (line 171) ... FAILED
test src\class\hash.rs - class::hash::Hash::each (line 212) ... FAILED
test src\class\hash.rs - class::hash::Hash::new (line 21) ... FAILED
test src\class\hash.rs - class::hash::Hash::length (line 101) ... FAILED
test src\class\hash.rs - class::hash::Hash::store (line 72) ... FAILED
test src\class\integer.rs - class::integer::Integer::to_i32 (line 87) ... FAILED
test src\class\integer.rs - class::integer::Integer::new (line 21) ... FAILED
test src\class\integer.rs - class::integer::Integer::to_u64 (line 65) ... FAILED
test src\class\integer.rs - class::integer::Integer::to_i64 (line 43) ... FAILED
test src\class\integer.rs - class::integer::Integer::to_u32 (line 109) ... FAILED
test src\class\module.rs - class::module::Module (line 14) ... FAILED
test src\class\module.rs - class::module::Module::ancestors (line 128) ... FAILED
test src\class\module.rs - class::module::Module::ancestors (line 143) ... FAILED
test src\class\module.rs - class::module::Module::attr_accessor (line 622) ... FAILED
test src\class\module.rs - class::module::Module::attr_reader (line 574) ... FAILED
test src\class\module.rs - class::module::Module::attr_writer (line 598) ... FAILED
test src\class\module.rs - class::module::Module::const_get (line 436) ... FAILED
test src\class\module.rs - class::module::Module::const_set (line 482) ... FAILED
test src\class\module.rs - class::module::Module::define_module_function (line 315) ... FAILED
test src\class\module.rs - class::module::Module::define_module_function (line 357) ... FAILED
test src\class\module.rs - class::module::Module::define_nested_class (line 266) ... FAILED
test src\class\module.rs - class::module::Module::get_nested_class (line 200) ... FAILED
test src\class\rproc.rs - class::rproc::Proc::call (line 19) - compile ... ok
test src\class\module.rs - class::module::Module::define_nested_module (line 233) ... FAILED
test src\class\module.rs - class::module::Module::from_existing (line 93) ... FAILED
test src\class\string.rs - class::string::RString::codepoints (line 278) - compile ... FAILED
test src\class\module.rs - class::module::Module::get_nested_module (line 167) ... FAILED
test src\class\module.rs - class::module::Module::include (line 526) ... FAILED
test src\class\module.rs - class::module::Module::new (line 70) ... FAILED
test src\class\module.rs - class::module::Module::prepend (line 550) ... FAILED
test src\class\nil_class.rs - class::nil_class::NilClass::new (line 21) ... FAILED
test src\class\rproc.rs - class::rproc::Proc::is_lambda (line 70) ... FAILED
test src\class\module.rs - class::module::Module::wrap_data (line 651) ... FAILED
test src\class\string.rs - class::string::RString (line 640) ... FAILED
test src\class\string.rs - class::string::RString::compatible_encoding (line 579) ... FAILED
test src\class\string.rs - class::string::RString::compatible_with (line 552) ... FAILED
test src\class\string.rs - class::string::RString::bytesize (line 311) ... FAILED
test src\class\string.rs - class::string::RString::concat (line 367) ... FAILED
test src\class\string.rs - class::string::RString::encoding (line 395) ... FAILED
test src\class\string.rs - class::string::RString::count_chars (line 339) ... FAILED
test src\class\string.rs - class::string::RString::encode (line 477) ... FAILED
test src\class\string.rs - class::string::RString::force_encoding (line 419) ... FAILED
test src\class\string.rs - class::string::RString::to_bytes_unchecked (line 259) - compile ... ok
test src\class\string.rs - class::string::RString::force_encoding (line 438) ... FAILED
test src\class\string.rs - class::string::RString::to_str_unchecked (line 229) - compile ... ok
test src\class\string.rs - class::string::RString::to_string_unchecked (line 155) - compile ... ok
test src\class\string.rs - class::string::RString::from_bytes (line 100) ... FAILED
test src\class\string.rs - class::string::RString::to_vec_u8_unchecked (line 183) - compile ... ok
test src\class\string.rs - class::string::RString::is_valid_encoding (line 514) ... FAILED
test src\class\string.rs - class::string::RString::new (line 22) ... FAILED
test src\class\string.rs - class::string::RString::new_usascii_unchecked (line 75) ... FAILED
test src\class\string.rs - class::string::RString::new_utf8 (line 51) ... FAILED
test src\class\thread.rs - class::thread::Thread::call_without_gvl (line 86) - compile ... ok
test src\class\string.rs - class::string::RString::to_str (line 199) ... FAILED
test src\class\string.rs - class::string::RString::to_string (line 127) ... FAILED
test src\class\symbol.rs - class::symbol::Symbol::to_proc (line 98) ... FAILED
test src\class\symbol.rs - class::symbol::Symbol::new (line 24) ... FAILED
test src\class\symbol.rs - class::symbol::Symbol::to_str (line 50) ... FAILED
test src\class\symbol.rs - class::symbol::Symbol::to_string (line 74) ... FAILED
test src\class\traits\exception.rs - class::traits::exception::Exception::backtrace_locations (line 103) ... FAILED
test src\class\traits\exception.rs - class::traits::exception::Exception::backtrace (line 78) ... FAILED
test src\class\traits\exception.rs - class::traits::exception::Exception::cause (line 126) ... FAILED
test src\class\thread.rs - class::thread::Thread::new (line 24) ... FAILED
test src\class\traits\exception.rs - class::traits::exception::Exception::exception (line 54) ... FAILED
test src\class\traits\exception.rs - class::traits::exception::Exception::inspect (line 147) ... FAILED
test src\class\traits\exception.rs - class::traits::exception::Exception::message (line 164) ... FAILED
test src\class\traits\object.rs - class::traits::object::Object::define (line 224) - compile ... ok
test src\class\traits\exception.rs - class::traits::exception::Exception::new (line 16) ... FAILED
test src\class\traits\exception.rs - class::traits::exception::Exception::to_s (line 216) ... FAILED
test src\class\traits\exception.rs - class::traits::exception::Exception::new (line 28) ... FAILED
test src\class\traits\exception.rs - class::traits::exception::Exception::set_backtrace (line 182) ... FAILED
test src\class\traits\object.rs - class::traits::object::Object::case_equals (line 758) ... FAILED
test src\class\traits\object.rs - class::traits::object::Object::define (line 292) ... FAILED
test src\class\traits\object.rs - class::traits::object::Object::class (line 50) ... FAILED
test src\class\traits\object.rs - class::traits::object::Object::define_method (line 357) ... FAILED
test src\class\traits\object.rs - class::traits::object::Object::define_method (line 394) ... FAILED
test src\class\traits\object.rs - class::traits::object::Object::define_private_method (line 476) ... FAILED
test src\class\traits\object.rs - class::traits::object::Object::equals (line 728) ... FAILED
test src\class\traits\object.rs - class::traits::object::Object::define_private_method (line 513) ... FAILED
test src\class\traits\object.rs - class::traits::object::Object::define_singleton_method (line 637) ... FAILED
test src\class\traits\object.rs - class::traits::object::Object::freeze (line 1213) ... FAILED
test src\class\traits\object.rs - class::traits::object::Object::define_singleton_method (line 593) ... FAILED
test src\class\traits\object.rs - class::traits::object::Object::instance_variable_get (line 1027) ... FAILED
test src\class\traits\object.rs - class::traits::object::Object::get_data (line 129) ... FAILED
test src\class\traits\object.rs - class::traits::object::Object::is_eql (line 789) ... FAILED
test src\class\traits\object.rs - class::traits::object::Object::instance_variable_set (line 1108) ... FAILED
test src\class\traits\object.rs - class::traits::object::Object::is_equal (line 820) ... FAILED
test src\class\traits\object.rs - class::traits::object::Object::is_frozen (line 1189) ... FAILED
test src\class\traits\object.rs - class::traits::object::Object::protect_public_send (line 928) ... FAILED
test src\class\traits\object.rs - class::traits::object::Object::try_convert_to (line 1326) - compile ... ok
test src\class\traits\object.rs - class::traits::object::Object::is_nil (line 984) ... FAILED
test src\class\traits\object.rs - class::traits::object::Object::respond_to (line 852) ... FAILED
test src\class\traits\object.rs - class::traits::object::Object::singleton_class (line 68) ... FAILED
test src\class\traits\object.rs - class::traits::object::Object::protect_send (line 872) ... FAILED
test src\class\traits\object.rs - class::traits::object::Object::singleton_class (line 89) ... FAILED
test src\class\traits\object.rs - class::traits::object::Object::send (line 706) ... FAILED
test src\class\traits\object.rs - class::traits::object::Object::to (line 1258) ... FAILED
test src\class\traits\object.rs - class::traits::object::Object::to_any_object (line 1008) ... FAILED
test src\class\traits\object.rs - class::traits::object::Object::try_convert_to (line 1283) ... FAILED
test src\class\traits\object.rs - class::traits::object::Object::value (line 23) ... ok
test src\class\vm.rs - class::vm::VM::block_proc (line 287) - compile ... ok
test src\class\traits\object.rs - class::traits::object::Object::ty (line 1393) ... FAILED
test src\class\vm.rs - class::vm::VM::abort (line 688) ... FAILED
test src\class\traits\verified_object.rs - class::traits::verified_object::VerifiedObject (line 26) ... FAILED
test src\class\vm.rs - class::vm::VM::abort (line 710) ... FAILED
test src\class\vm.rs - class::vm::VM::at_exit (line 761) ... FAILED
test src\class\vm.rs - class::vm::VM::exit (line 614) ... FAILED
test src\class\vm.rs - class::vm::VM::eval (line 190) ... FAILED
test src\class\vm.rs - class::vm::VM::exit_bang (line 639) ... FAILED
test src\class\vm.rs - class::vm::VM::error_pop (line 569) ... FAILED
test src\class\vm.rs - class::vm::VM::raise (line 101) - compile ... ok
test src\class\vm.rs - class::vm::VM::call_super (line 783) ... FAILED
test src\class\vm.rs - class::vm::VM::eval (line 216) ... FAILED
test src\class\vm.rs - class::vm::VM::exit_bang (line 654) ... FAILED
test src\class\vm.rs - class::vm::VM::eval_str (line 257) ... FAILED
test src\class\vm.rs - class::vm::VM::raise (line 116) - compile ... ok
test src\class\vm.rs - class::vm::VM::raise_ex (line 144) - compile ... ok
test src\class\vm.rs - class::vm::VM::require (line 79) - compile ... ok
test src\dsl.rs - dsl::wrappable_struct (line 417) ... ignored
test src\class\vm.rs - class::vm::VM::raise_ex (line 159) - compile ... ok
test src\dsl.rs - dsl::wrappable_struct (line 442) ... ignored
test src\dsl.rs - dsl::wrappable_struct (line 465) ... ignored
test src\class\vm.rs - class::vm::VM::init (line 28) ... FAILED
test src\class\vm.rs - class::vm::VM::init_loadpath (line 55) ... FAILED
test src\class\vm.rs - class::vm::VM::is_block_given (line 336) ... FAILED
test src\class\vm.rs - class::vm::VM::yield_object (line 392) ... FAILED
test src\dsl.rs - dsl::wrappable_struct (line 482) ... FAILED
test src\dsl.rs - dsl::unsafe_methods (line 191) ... FAILED
test src\class\vm.rs - class::vm::VM::yield_splat (line 455) ... FAILED
test src\dsl.rs - dsl::class (line 8) ... FAILED
test src\dsl.rs - dsl::eval (line 750) ... FAILED
test src\dsl.rs - dsl::module (line 92) ... FAILED
test src\helpers\codepoint_iterator.rs - helpers::codepoint_iterator::CodepointIterator::new (line 18) ... FAILED
test src\dsl.rs - dsl::methods (line 305) ... FAILED
test src\dsl.rs - dsl::wrappable_struct (line 494) ... FAILED
test src\dsl.rs - dsl::wrappable_struct (line 577) ... FAILED

failures:

---- src\class\array.rs - class::array::Array::join (line 128) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\array.rs - class::array::Array::push (line 160) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\any_object.rs - class::any_object::AnyObject (line 35) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\array.rs - class::array::Array::pop (line 216) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\array.rs - class::array::Array::length (line 72) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\array.rs - class::array::Array::new (line 25) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\array.rs - class::array::Array (line 660) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\array.rs - class::array::Array::dup (line 303) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\array.rs - class::array::Array::at (line 102) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\any_object.rs - class::any_object::AnyObject (line 23) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\array.rs - class::array::Array::concat (line 419) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\array.rs - class::array::Array (line 630) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\array.rs - class::array::Array::reverse (line 357) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\array.rs - class::array::Array::reverse_bang (line 387) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\array.rs - class::array::Array::shift (line 271) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\array.rs - class::array::Array::sort (line 453) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\array.rs - class::array::Array::sort_bang (line 484) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\array.rs - class::array::Array::store (line 189) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\array.rs - class::array::Array::to_enum (line 515) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\array.rs - class::array::Array::to_s (line 331) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\array.rs - class::array::Array::unshift (line 242) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\array.rs - class::array::Array::with_capacity (line 45) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\binding.rs - class::binding::Binding::new (line 20) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\boolean.rs - class::boolean::Boolean::new (line 17) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\boolean.rs - class::boolean::Boolean::to_bool (line 37) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\class.rs - class::class::Class (line 14) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\class.rs - class::class::Class::ancestors (line 226) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\class.rs - class::class::Class::ancestors (line 244) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\class.rs - class::class::Class::attr_accessor (line 587) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\class.rs - class::class::Class::attr_writer (line 563) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\class.rs - class::class::Class::attr_reader (line 539) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\class.rs - class::class::Class::define_nested_class (line 341) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\class.rs - class::class::Class::const_set (line 455) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\class.rs - class::class::Class::const_get (line 409) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\class.rs - class::class::Class::define_nested_module (line 376) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\class.rs - class::class::Class::from_existing (line 112) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\class.rs - class::class::Class::get_nested_class (line 269) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\class.rs - class::class::Class::get_nested_module (line 302) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\class.rs - class::class::Class::include (line 499) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\class.rs - class::class::Class::new (line 74) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\class.rs - class::class::Class::prepend (line 519) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\encoding.rs - class::encoding::Encoding::default_external (line 58) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\class.rs - class::class::Class::superclass (line 199) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\encoding.rs - class::encoding::Encoding::default_internal (line 79) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\class.rs - class::class::Class::wrap_data (line 615) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\encoding.rs - class::encoding::Encoding::find (line 131) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\encoding.rs - class::encoding::Encoding::find (line 153) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\encoding.rs - class::encoding::Encoding::name (line 105) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\encoding.rs - class::encoding::Encoding::utf8 (line 18) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\encoding.rs - class::encoding::Encoding::us_ascii (line 38) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\encoding.rs - class::encoding::Encoding::is_compatible (line 182) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\enumerator.rs - class::enumerator::Enumerator::feed (line 161) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\enumerator.rs - class::enumerator::Enumerator::next (line 22) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\enumerator.rs - class::enumerator::Enumerator::peek_values (line 106) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\enumerator.rs - class::enumerator::Enumerator::peek (line 86) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\enumerator.rs - class::enumerator::Enumerator::next_values (line 49) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\enumerator.rs - class::enumerator::Enumerator::rewind (line 134) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\fixnum.rs - class::fixnum::Fixnum::to_i32 (line 87) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\fixnum.rs - class::fixnum::Fixnum::new (line 21) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\fixnum.rs - class::fixnum::Fixnum::to_i64 (line 43) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\fixnum.rs - class::fixnum::Fixnum::to_u32 (line 109) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\float.rs - class::float::Float::implicit_to_f (line 66) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\fixnum.rs - class::fixnum::Fixnum::to_u64 (line 65) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\float.rs - class::float::Float::new (line 21) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\gc.rs - class::gc::GC::adjust_memory_usage (line 13) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\float.rs - class::float::Float::to_f64 (line 43) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\gc.rs - class::gc::GC::count (line 31) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\gc.rs - class::gc::GC::disable (line 45) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\gc.rs - class::gc::GC::enable (line 59) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\gc.rs - class::gc::GC::force_recycle (line 73) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\gc.rs - class::gc::GC::mark (line 113) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\gc.rs - class::gc::GC::mark_maybe (line 156) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\gc.rs - class::gc::GC::mark_locations (line 129) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\gc.rs - class::gc::GC::register_mark (line 192) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\gc.rs - class::gc::GC::register (line 172) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\gc.rs - class::gc::GC::stat (line 224) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\gc.rs - class::gc::GC::start (line 208) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\hash.rs - class::hash::Hash::at (line 41) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\gc.rs - class::gc::GC::unregister (line 240) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\hash.rs - class::hash::Hash::clear (line 133) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\hash.rs - class::hash::Hash::delete (line 171) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\hash.rs - class::hash::Hash::each (line 212) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\hash.rs - class::hash::Hash::new (line 21) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\hash.rs - class::hash::Hash::length (line 101) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\hash.rs - class::hash::Hash::store (line 72) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\integer.rs - class::integer::Integer::to_i32 (line 87) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\integer.rs - class::integer::Integer::new (line 21) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\integer.rs - class::integer::Integer::to_u64 (line 65) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\integer.rs - class::integer::Integer::to_i64 (line 43) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\integer.rs - class::integer::Integer::to_u32 (line 109) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\module.rs - class::module::Module (line 14) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\module.rs - class::module::Module::ancestors (line 128) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\module.rs - class::module::Module::ancestors (line 143) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\module.rs - class::module::Module::attr_accessor (line 622) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\module.rs - class::module::Module::attr_reader (line 574) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\module.rs - class::module::Module::attr_writer (line 598) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\module.rs - class::module::Module::const_get (line 436) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\module.rs - class::module::Module::const_set (line 482) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\module.rs - class::module::Module::define_module_function (line 315) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\module.rs - class::module::Module::define_module_function (line 357) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\module.rs - class::module::Module::define_nested_class (line 266) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\module.rs - class::module::Module::get_nested_class (line 200) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\module.rs - class::module::Module::define_nested_module (line 233) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\module.rs - class::module::Module::from_existing (line 93) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\string.rs - class::string::RString::codepoints (line 278) stdout ----
error[E0614]: type `{integer}` cannot be dereferenced
  --> src\class\string.rs:288:36
   |
13 |   into_iter().map(|cp| Fixnum::new(*cp as i64).to_any_object()).collect();
   |                                    ^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0614`.
Couldn't compile the test.
---- src\class\module.rs - class::module::Module::get_nested_module (line 167) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\module.rs - class::module::Module::include (line 526) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\module.rs - class::module::Module::new (line 70) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\module.rs - class::module::Module::prepend (line 550) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\nil_class.rs - class::nil_class::NilClass::new (line 21) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\rproc.rs - class::rproc::Proc::is_lambda (line 70) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\module.rs - class::module::Module::wrap_data (line 651) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\string.rs - class::string::RString (line 640) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\string.rs - class::string::RString::compatible_encoding (line 579) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\string.rs - class::string::RString::compatible_with (line 552) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\string.rs - class::string::RString::bytesize (line 311) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\string.rs - class::string::RString::concat (line 367) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\string.rs - class::string::RString::encoding (line 395) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\string.rs - class::string::RString::count_chars (line 339) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\string.rs - class::string::RString::encode (line 477) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\string.rs - class::string::RString::force_encoding (line 419) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\string.rs - class::string::RString::force_encoding (line 438) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\string.rs - class::string::RString::from_bytes (line 100) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\string.rs - class::string::RString::is_valid_encoding (line 514) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\string.rs - class::string::RString::new (line 22) stdout ----
warning: use of deprecated associated function `rutie::RString::new`: please use `new_usascii_unchecked` or `new_utf8` instead
 --> src\class\string.rs:26:23
  |
7 | let string = RString::new("Hello, World!");
  |                       ^^^
  |
  = note: `#[warn(deprecated)]` on by default

warning: 1 warning emitted

Test executable failed (exit code: 0xc000007b).

---- src\class\string.rs - class::string::RString::new_usascii_unchecked (line 75) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\string.rs - class::string::RString::new_utf8 (line 51) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\string.rs - class::string::RString::to_str (line 199) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\string.rs - class::string::RString::to_string (line 127) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\symbol.rs - class::symbol::Symbol::to_proc (line 98) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\symbol.rs - class::symbol::Symbol::new (line 24) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\symbol.rs - class::symbol::Symbol::to_str (line 50) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\symbol.rs - class::symbol::Symbol::to_string (line 74) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\exception.rs - class::traits::exception::Exception::backtrace_locations (line 103) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\exception.rs - class::traits::exception::Exception::backtrace (line 78) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\exception.rs - class::traits::exception::Exception::cause (line 126) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\thread.rs - class::thread::Thread::new (line 24) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\exception.rs - class::traits::exception::Exception::exception (line 54) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\exception.rs - class::traits::exception::Exception::inspect (line 147) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\exception.rs - class::traits::exception::Exception::message (line 164) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\exception.rs - class::traits::exception::Exception::new (line 16) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\exception.rs - class::traits::exception::Exception::to_s (line 216) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\exception.rs - class::traits::exception::Exception::new (line 28) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\exception.rs - class::traits::exception::Exception::set_backtrace (line 182) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\object.rs - class::traits::object::Object::case_equals (line 758) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\object.rs - class::traits::object::Object::define (line 292) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\object.rs - class::traits::object::Object::class (line 50) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\object.rs - class::traits::object::Object::define_method (line 357) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\object.rs - class::traits::object::Object::define_method (line 394) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\object.rs - class::traits::object::Object::define_private_method (line 476) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\object.rs - class::traits::object::Object::equals (line 728) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\object.rs - class::traits::object::Object::define_private_method (line 513) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\object.rs - class::traits::object::Object::define_singleton_method (line 637) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\object.rs - class::traits::object::Object::freeze (line 1213) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\object.rs - class::traits::object::Object::define_singleton_method (line 593) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\object.rs - class::traits::object::Object::instance_variable_get (line 1027) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\object.rs - class::traits::object::Object::get_data (line 129) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\object.rs - class::traits::object::Object::is_eql (line 789) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\object.rs - class::traits::object::Object::instance_variable_set (line 1108) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\object.rs - class::traits::object::Object::is_equal (line 820) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\object.rs - class::traits::object::Object::is_frozen (line 1189) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\object.rs - class::traits::object::Object::protect_public_send (line 928) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\object.rs - class::traits::object::Object::is_nil (line 984) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\object.rs - class::traits::object::Object::respond_to (line 852) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\object.rs - class::traits::object::Object::singleton_class (line 68) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\object.rs - class::traits::object::Object::protect_send (line 872) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\object.rs - class::traits::object::Object::singleton_class (line 89) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\object.rs - class::traits::object::Object::send (line 706) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\object.rs - class::traits::object::Object::to (line 1258) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\object.rs - class::traits::object::Object::to_any_object (line 1008) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\object.rs - class::traits::object::Object::try_convert_to (line 1283) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\object.rs - class::traits::object::Object::ty (line 1393) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\vm.rs - class::vm::VM::abort (line 688) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\traits\verified_object.rs - class::traits::verified_object::VerifiedObject (line 26) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\vm.rs - class::vm::VM::abort (line 710) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\vm.rs - class::vm::VM::at_exit (line 761) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\vm.rs - class::vm::VM::exit (line 614) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\vm.rs - class::vm::VM::eval (line 190) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\vm.rs - class::vm::VM::exit_bang (line 639) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\vm.rs - class::vm::VM::error_pop (line 569) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\vm.rs - class::vm::VM::call_super (line 783) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\vm.rs - class::vm::VM::eval (line 216) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\vm.rs - class::vm::VM::exit_bang (line 654) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\vm.rs - class::vm::VM::eval_str (line 257) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\vm.rs - class::vm::VM::init (line 28) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\vm.rs - class::vm::VM::init_loadpath (line 55) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\vm.rs - class::vm::VM::is_block_given (line 336) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\vm.rs - class::vm::VM::yield_object (line 392) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\dsl.rs - dsl::wrappable_struct (line 482) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\dsl.rs - dsl::unsafe_methods (line 191) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\class\vm.rs - class::vm::VM::yield_splat (line 455) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\dsl.rs - dsl::class (line 8) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\dsl.rs - dsl::eval (line 750) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\dsl.rs - dsl::module (line 92) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\helpers\codepoint_iterator.rs - helpers::codepoint_iterator::CodepointIterator::new (line 18) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\dsl.rs - dsl::methods (line 305) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\dsl.rs - dsl::wrappable_struct (line 494) stdout ----
Test executable failed (exit code: 0xc000007b).

---- src\dsl.rs - dsl::wrappable_struct (line 577) stdout ----
Test executable failed (exit code: 0xc000007b).


failures:
    src\class\any_object.rs - class::any_object::AnyObject (line 23)
    src\class\any_object.rs - class::any_object::AnyObject (line 35)
    src\class\array.rs - class::array::Array (line 630)
    src\class\array.rs - class::array::Array (line 660)
    src\class\array.rs - class::array::Array::at (line 102)
    src\class\array.rs - class::array::Array::concat (line 419)
    src\class\array.rs - class::array::Array::dup (line 303)
    src\class\array.rs - class::array::Array::join (line 128)
    src\class\array.rs - class::array::Array::length (line 72)
    src\class\array.rs - class::array::Array::new (line 25)
    src\class\array.rs - class::array::Array::pop (line 216)
    src\class\array.rs - class::array::Array::push (line 160)
    src\class\array.rs - class::array::Array::reverse (line 357)
    src\class\array.rs - class::array::Array::reverse_bang (line 387)
    src\class\array.rs - class::array::Array::shift (line 271)
    src\class\array.rs - class::array::Array::sort (line 453)
    src\class\array.rs - class::array::Array::sort_bang (line 484)
    src\class\array.rs - class::array::Array::store (line 189)
    src\class\array.rs - class::array::Array::to_enum (line 515)
    src\class\array.rs - class::array::Array::to_s (line 331)
    src\class\array.rs - class::array::Array::unshift (line 242)
    src\class\array.rs - class::array::Array::with_capacity (line 45)
    src\class\binding.rs - class::binding::Binding::new (line 20)
    src\class\boolean.rs - class::boolean::Boolean::new (line 17)
    src\class\boolean.rs - class::boolean::Boolean::to_bool (line 37)
    src\class\class.rs - class::class::Class (line 14)
    src\class\class.rs - class::class::Class::ancestors (line 226)
    src\class\class.rs - class::class::Class::ancestors (line 244)
    src\class\class.rs - class::class::Class::attr_accessor (line 587)
    src\class\class.rs - class::class::Class::attr_reader (line 539)
    src\class\class.rs - class::class::Class::attr_writer (line 563)
    src\class\class.rs - class::class::Class::const_get (line 409)
    src\class\class.rs - class::class::Class::const_set (line 455)
    src\class\class.rs - class::class::Class::define_nested_class (line 341)
    src\class\class.rs - class::class::Class::define_nested_module (line 376)
    src\class\class.rs - class::class::Class::from_existing (line 112)
    src\class\class.rs - class::class::Class::get_nested_class (line 269)
    src\class\class.rs - class::class::Class::get_nested_module (line 302)
    src\class\class.rs - class::class::Class::include (line 499)
    src\class\class.rs - class::class::Class::new (line 74)
    src\class\class.rs - class::class::Class::prepend (line 519)
    src\class\class.rs - class::class::Class::superclass (line 199)
    src\class\class.rs - class::class::Class::wrap_data (line 615)
    src\class\encoding.rs - class::encoding::Encoding::default_external (line 58)
    src\class\encoding.rs - class::encoding::Encoding::default_internal (line 79)
    src\class\encoding.rs - class::encoding::Encoding::find (line 131)
    src\class\encoding.rs - class::encoding::Encoding::find (line 153)
    src\class\encoding.rs - class::encoding::Encoding::is_compatible (line 182)
    src\class\encoding.rs - class::encoding::Encoding::name (line 105)
    src\class\encoding.rs - class::encoding::Encoding::us_ascii (line 38)
    src\class\encoding.rs - class::encoding::Encoding::utf8 (line 18)
    src\class\enumerator.rs - class::enumerator::Enumerator::feed (line 161)
    src\class\enumerator.rs - class::enumerator::Enumerator::next (line 22)
    src\class\enumerator.rs - class::enumerator::Enumerator::next_values (line 49)
    src\class\enumerator.rs - class::enumerator::Enumerator::peek (line 86)
    src\class\enumerator.rs - class::enumerator::Enumerator::peek_values (line 106)
    src\class\enumerator.rs - class::enumerator::Enumerator::rewind (line 134)
    src\class\fixnum.rs - class::fixnum::Fixnum::new (line 21)
    src\class\fixnum.rs - class::fixnum::Fixnum::to_i32 (line 87)
    src\class\fixnum.rs - class::fixnum::Fixnum::to_i64 (line 43)
    src\class\fixnum.rs - class::fixnum::Fixnum::to_u32 (line 109)
    src\class\fixnum.rs - class::fixnum::Fixnum::to_u64 (line 65)
    src\class\float.rs - class::float::Float::implicit_to_f (line 66)
    src\class\float.rs - class::float::Float::new (line 21)
    src\class\float.rs - class::float::Float::to_f64 (line 43)
    src\class\gc.rs - class::gc::GC::adjust_memory_usage (line 13)
    src\class\gc.rs - class::gc::GC::count (line 31)
    src\class\gc.rs - class::gc::GC::disable (line 45)
    src\class\gc.rs - class::gc::GC::enable (line 59)
    src\class\gc.rs - class::gc::GC::force_recycle (line 73)
    src\class\gc.rs - class::gc::GC::mark (line 113)
    src\class\gc.rs - class::gc::GC::mark_locations (line 129)
    src\class\gc.rs - class::gc::GC::mark_maybe (line 156)
    src\class\gc.rs - class::gc::GC::register (line 172)
    src\class\gc.rs - class::gc::GC::register_mark (line 192)
    src\class\gc.rs - class::gc::GC::start (line 208)
    src\class\gc.rs - class::gc::GC::stat (line 224)
    src\class\gc.rs - class::gc::GC::unregister (line 240)
    src\class\hash.rs - class::hash::Hash::at (line 41)
    src\class\hash.rs - class::hash::Hash::clear (line 133)
    src\class\hash.rs - class::hash::Hash::delete (line 171)
    src\class\hash.rs - class::hash::Hash::each (line 212)
    src\class\hash.rs - class::hash::Hash::length (line 101)
    src\class\hash.rs - class::hash::Hash::new (line 21)
    src\class\hash.rs - class::hash::Hash::store (line 72)
    src\class\integer.rs - class::integer::Integer::new (line 21)
    src\class\integer.rs - class::integer::Integer::to_i32 (line 87)
    src\class\integer.rs - class::integer::Integer::to_i64 (line 43)
    src\class\integer.rs - class::integer::Integer::to_u32 (line 109)
    src\class\integer.rs - class::integer::Integer::to_u64 (line 65)
    src\class\module.rs - class::module::Module (line 14)
    src\class\module.rs - class::module::Module::ancestors (line 128)
    src\class\module.rs - class::module::Module::ancestors (line 143)
    src\class\module.rs - class::module::Module::attr_accessor (line 622)
    src\class\module.rs - class::module::Module::attr_reader (line 574)
    src\class\module.rs - class::module::Module::attr_writer (line 598)
    src\class\module.rs - class::module::Module::const_get (line 436)
    src\class\module.rs - class::module::Module::const_set (line 482)
    src\class\module.rs - class::module::Module::define_module_function (line 315)
    src\class\module.rs - class::module::Module::define_module_function (line 357)
    src\class\module.rs - class::module::Module::define_nested_class (line 266)
    src\class\module.rs - class::module::Module::define_nested_module (line 233)
    src\class\module.rs - class::module::Module::from_existing (line 93)
    src\class\module.rs - class::module::Module::get_nested_class (line 200)
    src\class\module.rs - class::module::Module::get_nested_module (line 167)
    src\class\module.rs - class::module::Module::include (line 526)
    src\class\module.rs - class::module::Module::new (line 70)
    src\class\module.rs - class::module::Module::prepend (line 550)
    src\class\module.rs - class::module::Module::wrap_data (line 651)
    src\class\nil_class.rs - class::nil_class::NilClass::new (line 21)
    src\class\rproc.rs - class::rproc::Proc::is_lambda (line 70)
    src\class\string.rs - class::string::RString (line 640)
    src\class\string.rs - class::string::RString::bytesize (line 311)
    src\class\string.rs - class::string::RString::codepoints (line 278)
    src\class\string.rs - class::string::RString::compatible_encoding (line 579)
    src\class\string.rs - class::string::RString::compatible_with (line 552)
    src\class\string.rs - class::string::RString::concat (line 367)
    src\class\string.rs - class::string::RString::count_chars (line 339)
    src\class\string.rs - class::string::RString::encode (line 477)
    src\class\string.rs - class::string::RString::encoding (line 395)
    src\class\string.rs - class::string::RString::force_encoding (line 419)
    src\class\string.rs - class::string::RString::force_encoding (line 438)
    src\class\string.rs - class::string::RString::from_bytes (line 100)
    src\class\string.rs - class::string::RString::is_valid_encoding (line 514)
    src\class\string.rs - class::string::RString::new (line 22)
    src\class\string.rs - class::string::RString::new_usascii_unchecked (line 75)
    src\class\string.rs - class::string::RString::new_utf8 (line 51)
    src\class\string.rs - class::string::RString::to_str (line 199)
    src\class\string.rs - class::string::RString::to_string (line 127)
    src\class\symbol.rs - class::symbol::Symbol::new (line 24)
    src\class\symbol.rs - class::symbol::Symbol::to_proc (line 98)
    src\class\symbol.rs - class::symbol::Symbol::to_str (line 50)
    src\class\symbol.rs - class::symbol::Symbol::to_string (line 74)
    src\class\thread.rs - class::thread::Thread::new (line 24)
    src\class\traits\exception.rs - class::traits::exception::Exception::backtrace (line 78)
    src\class\traits\exception.rs - class::traits::exception::Exception::backtrace_locations (line 103)
    src\class\traits\exception.rs - class::traits::exception::Exception::cause (line 126)
    src\class\traits\exception.rs - class::traits::exception::Exception::exception (line 54)
    src\class\traits\exception.rs - class::traits::exception::Exception::inspect (line 147)
    src\class\traits\exception.rs - class::traits::exception::Exception::message (line 164)
    src\class\traits\exception.rs - class::traits::exception::Exception::new (line 16)
    src\class\traits\exception.rs - class::traits::exception::Exception::new (line 28)
    src\class\traits\exception.rs - class::traits::exception::Exception::set_backtrace (line 182)
    src\class\traits\exception.rs - class::traits::exception::Exception::to_s (line 216)
    src\class\traits\object.rs - class::traits::object::Object::case_equals (line 758)
    src\class\traits\object.rs - class::traits::object::Object::class (line 50)
    src\class\traits\object.rs - class::traits::object::Object::define (line 292)
    src\class\traits\object.rs - class::traits::object::Object::define_method (line 357)
    src\class\traits\object.rs - class::traits::object::Object::define_method (line 394)
    src\class\traits\object.rs - class::traits::object::Object::define_private_method (line 476)
    src\class\traits\object.rs - class::traits::object::Object::define_private_method (line 513)
    src\class\traits\object.rs - class::traits::object::Object::define_singleton_method (line 593)
    src\class\traits\object.rs - class::traits::object::Object::define_singleton_method (line 637)
    src\class\traits\object.rs - class::traits::object::Object::equals (line 728)
    src\class\traits\object.rs - class::traits::object::Object::freeze (line 1213)
    src\class\traits\object.rs - class::traits::object::Object::get_data (line 129)
    src\class\traits\object.rs - class::traits::object::Object::instance_variable_get (line 1027)
    src\class\traits\object.rs - class::traits::object::Object::instance_variable_set (line 1108)
    src\class\traits\object.rs - class::traits::object::Object::is_eql (line 789)
    src\class\traits\object.rs - class::traits::object::Object::is_equal (line 820)
    src\class\traits\object.rs - class::traits::object::Object::is_frozen (line 1189)
    src\class\traits\object.rs - class::traits::object::Object::is_nil (line 984)
    src\class\traits\object.rs - class::traits::object::Object::protect_public_send (line 928)
    src\class\traits\object.rs - class::traits::object::Object::protect_send (line 872)
    src\class\traits\object.rs - class::traits::object::Object::respond_to (line 852)
    src\class\traits\object.rs - class::traits::object::Object::send (line 706)
    src\class\traits\object.rs - class::traits::object::Object::singleton_class (line 68)
    src\class\traits\object.rs - class::traits::object::Object::singleton_class (line 89)
    src\class\traits\object.rs - class::traits::object::Object::to (line 1258)
    src\class\traits\object.rs - class::traits::object::Object::to_any_object (line 1008)
    src\class\traits\object.rs - class::traits::object::Object::try_convert_to (line 1283)
    src\class\traits\object.rs - class::traits::object::Object::ty (line 1393)
    src\class\traits\verified_object.rs - class::traits::verified_object::VerifiedObject (line 26)
    src\class\vm.rs - class::vm::VM::abort (line 688)
    src\class\vm.rs - class::vm::VM::abort (line 710)
    src\class\vm.rs - class::vm::VM::at_exit (line 761)
    src\class\vm.rs - class::vm::VM::call_super (line 783)
    src\class\vm.rs - class::vm::VM::error_pop (line 569)
    src\class\vm.rs - class::vm::VM::eval (line 190)
    src\class\vm.rs - class::vm::VM::eval (line 216)
    src\class\vm.rs - class::vm::VM::eval_str (line 257)
    src\class\vm.rs - class::vm::VM::exit (line 614)
    src\class\vm.rs - class::vm::VM::exit_bang (line 639)
    src\class\vm.rs - class::vm::VM::exit_bang (line 654)
    src\class\vm.rs - class::vm::VM::init (line 28)
    src\class\vm.rs - class::vm::VM::init_loadpath (line 55)
    src\class\vm.rs - class::vm::VM::is_block_given (line 336)
    src\class\vm.rs - class::vm::VM::yield_object (line 392)
    src\class\vm.rs - class::vm::VM::yield_splat (line 455)
    src\dsl.rs - dsl::class (line 8)
    src\dsl.rs - dsl::eval (line 750)
    src\dsl.rs - dsl::methods (line 305)
    src\dsl.rs - dsl::module (line 92)
    src\dsl.rs - dsl::unsafe_methods (line 191)
    src\dsl.rs - dsl::wrappable_struct (line 482)
    src\dsl.rs - dsl::wrappable_struct (line 494)
    src\dsl.rs - dsl::wrappable_struct (line 577)
    src\helpers\codepoint_iterator.rs - helpers::codepoint_iterator::CodepointIterator::new (line 18)

test result: FAILED. 18 passed; 198 failed; 3 ignored; 0 measured; 0 filtered out; finished in 50.64s

error: doctest failed, to rerun pass `--doc`

@ianks
Copy link

ianks commented Mar 9, 2023

Also, I decided to use rutie even though someone said magnus is better because magnus simply doesn't build with the target i686-pc-windows-gnu. If you switch to rb-sys we'll not be able to use rutie as well which is kind of problematic.

Hey @NuriYuri, I'm more than happy to support i686-pc-windows-gnu, but just haven't gotten around to doing it since I don't have a machine to test on. Can you make an issue on the rb-sys repo with the errors you are getting so we can try to resolve them?

@NuriYuri
Copy link

Hi, thanks for the feedback :)

Fortunately I have the machine for those tests so opened an issue on rb-sys as advised :)

@NuriYuri
Copy link

NuriYuri commented Apr 9, 2023

Since I can now build rb-sys I got the following issue with the code in your branch (type missmatch)

Logs (click to see)
   Compiling rb-sys v0.9.71
error[E0308]: mismatched types
  --> src\rubysys\array.rs:92:16
   |
92 |     if flags & (RArrayEmbed::Flag as u64) == 0 {
   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `u64`

error[E0277]: no implementation for u32 & u64
--> src\rubysys\array.rs:92:14
|
92 | if flags & (RArrayEmbed::Flag as u64) == 0 {
| ^ no implementation for u32 & u64
|
= help: the trait BitAnd<u64> is not implemented for u32
= help: the following other types implement trait BitAnd<Rhs>:
<&'a i128 as BitAnd>
<&'a i16 as BitAnd>
<&'a i32 as BitAnd>
<&'a i64 as BitAnd>
<&'a i8 as BitAnd>
<&'a isize as BitAnd>
<&'a u128 as BitAnd>
<&'a u16 as BitAnd>
and 40 others

error[E0308]: mismatched types
--> src\rubysys\string.rs:124:13
|
124 | flags & (RStringEmbed::NoEmbed as u64) == 0
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected u32, found u64

error[E0277]: no implementation for u32 & u64
--> src\rubysys\string.rs:124:11
|
124 | flags & (RStringEmbed::NoEmbed as u64) == 0
| ^ no implementation for u32 & u64
|
= help: the trait BitAnd<u64> is not implemented for u32
= help: the following other types implement trait BitAnd<Rhs>:
<&'a i128 as BitAnd>
<&'a i16 as BitAnd>
<&'a i32 as BitAnd>
<&'a i64 as BitAnd>
<&'a i8 as BitAnd>
<&'a isize as BitAnd>
<&'a u128 as BitAnd>
<&'a u16 as BitAnd>
and 40 others

error[E0308]: mismatched types
--> src\rubysys\string.rs:190:13
|
190 | flags & STR_TMPLOCK as u64 != 0
| ^^^^^^^^^^^^^^^^^^ expected u32, found u64

error[E0277]: no implementation for u32 & u64
--> src\rubysys\string.rs:190:11
|
190 | flags & STR_TMPLOCK as u64 != 0
| ^ no implementation for u32 & u64
|
= help: the trait BitAnd<u64> is not implemented for u32
= help: the following other types implement trait BitAnd<Rhs>:
<&'a i128 as BitAnd>
<&'a i16 as BitAnd>
<&'a i32 as BitAnd>
<&'a i64 as BitAnd>
<&'a i8 as BitAnd>
<&'a isize as BitAnd>
<&'a u128 as BitAnd>
<&'a u16 as BitAnd>
and 40 others

error[E0308]: mismatched types
--> src\rubysys\typed_data.rs:63:20
|
63 | dsize: rb_data_type_fn.dsize,
| ^^^^^^^^^^^^^^^^^^^^^ expected u32, found u64
|
= note: expected enum Option<unsafe extern "C" fn(_) -> u32>
found enum Option<unsafe extern "C" fn(_) -> u64>

error[E0277]: the trait bound u32: From<Value> is not satisfied
--> src\rubysys\typed_data.rs:77:20
|
77 | flags: rb_data_type.flags.into(),
| ^^^^^^^^^^^^^^^^^^ ---- required by a bound introduced by this call
| |
| the trait From<Value> is not implemented for u32
|
= help: the following other types implement trait From<T>:
<f32 as From>
<f32 as From>
<f32 as From>
<f32 as From>
<f64 as From>
<f64 as From>
<f64 as From>
<f64 as From>
and 68 others
= note: required for Value to implement Into<u32>

error[E0308]: mismatched types
--> src\rubysys\value.rs:187:9
|
186 | fn from(value: Value) -> Self {
| ---- expected u64 because of return type
187 | value.value
| ^^^^^^^^^^^ expected u64, found u32
|
help: you can convert a u32 to a u64
|
187 | value.value.into()
| +++++++

Some errors have detailed explanations: E0277, E0308.
For more information about an error, try rustc --explain E0277.
error: could not compile rutie due to 9 previous errors

Branch I built: goyox86/rb-sys-in-place
Commit I built: 5f422a9 (HEAD -> goyox86/rb-sys-in-place, origin/goyox86/rb-sys-in-place) Better Ruby version check and we don't need that TravisCI script anymore.

@danielpclark
Copy link
Owner

danielpclark commented Apr 19, 2023

@NuriYuri Could you use the Github "spoiler" feature to hide your long console output from your earliest post? Here's an example on how: https://gist.github.com/jbsulli/03df3cdce94ee97937ebda0ffef28287#how-to

@ianks
Copy link

ianks commented May 18, 2023

@goyox86 you may want to explore using rb-sys-test-helpers for the tests, it handles some of the nasty threading bugs due to the way cargo spawns threads for each test

@goyox86
Copy link
Contributor Author

goyox86 commented May 18, 2023

@goyox86 you may want to explore using rb-sys-test-helpers for the tests, it handles some of the nasty threading bugs due to the way cargo spawns threads for each test

Oh! Going to check that out I was actually debugging segfaults today because of VM::init and thread safety in tests. Thanks for the heads up @ianks !

@goyox86 goyox86 changed the title [163] Integrate with rb-sys & some minor changes (in place version) [163] Integrate with rb-sys May 25, 2023
@goyox86 goyox86 force-pushed the goyox86/rb-sys-in-place branch 3 times, most recently from 479b590 to 9184716 Compare July 27, 2023 11:09
@goyox86
Copy link
Contributor Author

goyox86 commented Jul 27, 2023

@ianks @danielpclark I think we are in a good position for another review pass. We are green on 2.7, 3.0. 3.1, 3.2 and HEAD on Linux, macOS, Windows. ❕ ❕

Cargo.toml Outdated Show resolved Hide resolved
src/class/gc.rs Outdated Show resolved Hide resolved
};

use rb_sys::{RString, VALUE};
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ianks what are the warnings for RString suggesting we do for rb_sys?

warning: use of deprecated struct rb_sys::RString: To improve API stability with ruby-head, direct usage of Ruby internal structs has been deprecated. To migrate, please replace the usage of this internal struct with its counterpart in the rb_sys::stable module. For example, instead of use rb_sys::rb_sys__Opaque__ExampleStruct;, use use rb_sys::stable::ExampleStruct;. If you need to access the internals of these items, you can use the provided rb-sys::macros instead.

@@ -308,7 +301,7 @@ pub trait Object: From<Value> {
/// let mut string = RString::new_utf8("Some string");
///
/// // The same can be done by modifying `string.singleton_class()`
/// // or using `string.define_singleton_method("greeting", greeting)`
/// // or usiang `string.define_singleton_method("greeting", greeting)`
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@goyox86 Typo added

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 0a743fb

}

pub fn define_method<I: Object, O: Object>(klass: Value, name: &str, callback: Callback<I, O>) {
let name = util::str_to_cstring(name);

unsafe {
class::rb_define_method(klass, name.as_ptr(), callback as CallbackPtr, -1);
let callback = callback as *const libc::c_void;
class::rb_define_method(klass, name.as_ptr(), callback, -1)
Copy link
Owner

@danielpclark danielpclark Mar 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@goyox86 I know this is a minor nitpick. But is there a reason why the three instances of callback as CallbackPtr were changed here in this file and once in src/binding/module.rs? If these don't need to be changed I think they should remain as they were.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are absolutely right! addressed in ae5896c

@@ -110,6 +117,9 @@ pub fn wrap_data<T>(klass: Value, data: T, wrapper: &dyn DataTypeWrapper<T>) ->
unsafe { typed_data::rb_data_typed_object_wrap(klass, data, wrapper.data_type()) }
}

// TODO: Skipped the lint, but this function takes an immutable reference and returns a mutable
// one. Changing the signature is a breaking change. What do we do?
#[allow(clippy::mut_from_ref)]
Copy link
Owner

@danielpclark danielpclark Mar 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@goyox86 For breaking changes like this you should add a section to the README of how to migrate from Rutie 0.9 to 0.10 where Ruby 3 works and include notes on breaking changes. The support for Ruby 3 should be Rutie release 0.10.0.

NOTE: Any signature changes for methods that are usable outside the crate should have breaking changes notes in the upgrade notice added to the README.md.

} else {
// After 3.1 we get TRUE/true
bool_to_value(c_int_to_bool(result))
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have a test added for this as ruby version specifics have been added to it? If it changed now then perhaps it changes in the future.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment // After 3.1 we get TRUE/true says nothing of false.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No sure if this is what you meant @danielpclark but I added a small test in here to detect if because of changes in the implementation of rb_eql things break at this level. The CI runs for all these ruby versions so we should be able to pin point which version is the offender.

pub fn econv_prepare_opts(opthash: Value, opts: *const Value) -> c_int {
unsafe { encoding::rb_econv_prepare_opts(opthash, opts) }
pub fn econv_prepare_opts(opthash: Value, opts: *mut Value) -> c_int {
unsafe { encoding::rb_econv_prepare_opts(opthash, opts as *mut _) }
}
Copy link
Owner

@danielpclark danielpclark Mar 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious about various changes throughout the code where we're going from *const to *mut. Perhaps a simple explanation on why Value can be *mut here would suffice. Just a reply here should be fine.

- os: windows-latest
ruby_static: true
Copy link
Owner

@danielpclark danielpclark Mar 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my experience with past Ruby version managers the Mac OS would by default install a statically linked built Ruby but Rutie ran best with dynamic linking. The CI test suite accounted for that and permitted failures on the static build. There were 3 failures that I remember for it.

What does the new CI test suite do for the differences between static and dynamic linking of Ruby? @goyox86

//
// let num = str_to_num("0").unwrap();
// assert_eq!(::std::u32::MIN, num.to_u32());
// }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is an issue it should probably be opened as a task under Issues.

@@ -100,7 +96,7 @@ extern "C" {
}

pub unsafe fn coderange_set(obj: Value, code_range: InternalValue) {
let basic: *mut RBasic = mem::transmute(obj.value);
let basic: *mut RBasic = obj.value as _;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain what this change does?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is an equivalent way of achieving the same result, as is safer than transmute since transmute can also change types of non-pointer types and also lifetimes. In general wherever you can get away with an as instead of a transmute we should probably should stick to as.

src/util.rs Outdated
/// Class::from_existing("String").define_method("==", string_eq);
/// }
/// ```
/// TODO: Made this public function unsafe due to clippy linting, should we just skip the lint?
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just mark the breaking change in the README. This note can then be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 0a743fb

@danielpclark
Copy link
Owner

Amazing work @goyox86 ! I'm excited for this. We're almost there.

@danielpclark
Copy link
Owner

@goyox86 Once my current comments are addressed I would be ready to merge this in to the main branch and release a new gem release with the changes. As to the question on the description as to whether the commits should be squashed - I don't believe there is a need for that.

@goyox86
Copy link
Contributor Author

goyox86 commented Mar 4, 2024

Hey @danielpclark! Great news I will make some time this week to address the comments 🙏

@danielpclark
Copy link
Owner

danielpclark commented Apr 19, 2024

@goyox86 Where are we at on this? I'm expecting a thorough documentation of breaking changes notes in the README. I don't know though if you were expecting to do that. With all the changes it's not likely the one method is the only breaking change. What are the changes to the process or usage? Once I'm relatively certain we're informing people of what they're in for with the upgrade I'll move forward with this.

@danielpclark
Copy link
Owner

Also looking at the test suite. I believe you added a config for static so that we have both dynamic and statically linked Rubies tested. But I'm not seeing the result of that.

@ianks
Copy link

ianks commented Apr 25, 2024

Happy to give another review once ready as well, since it has been awhile since the first one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants