rubyjs / mini_racer

Minimal embedded v8
MIT License
594 stars 93 forks source link

sq_mini_racer Ruby 3.1 incompatibility (`Psych::DisallowedClass`) #266

Closed 64kramsystem closed 1 year ago

64kramsystem commented 1 year ago

Hello!

It seems that sq_mini_racer is incompatible with Ruby 3.1 (works on Ruby 2.7/3.0).

When I try to install it, I get this stack trace:

/path/to/lib/ruby/3.1.0/psych/class_loader.rb:99:in `find': Tried to load unspecified class: Libv8::Node::Location::Vendor (Psych::DisallowedClass)
    from /path/to/lib/ruby/3.1.0/psych/class_loader.rb:28:in `load'
    from /path/to/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:424:in `resolve_class'
    from /path/to/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:213:in `visit_Psych_Nodes_Mapping'
    from /path/to/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
    from /path/to/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
    from /path/to/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
    from /path/to/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:318:in `visit_Psych_Nodes_Document'
    from /path/to/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
    from /path/to/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
    from /path/to/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
    from /path/to/lib/ruby/3.1.0/psych.rb:335:in `safe_load'
    from /path/to/lib/ruby/3.1.0/psych.rb:370:in `load'
    from /path/to/sq_mini_racer-0.3.1.0.6/ext/mini_racer_extension/vendor/gems/libv8-node-15.5.1.0.beta1-x86_64-linux/ext/libv8-node/location.rb:18:in `block in load!'
    from /path/to/sq_mini_racer-0.3.1.0.6/ext/mini_racer_extension/vendor/gems/libv8-node-15.5.1.0.beta1-x86_64-linux/ext/libv8-node/location.rb:17:in `open'
    from /path/to/sq_mini_racer-0.3.1.0.6/ext/mini_racer_extension/vendor/gems/libv8-node-15.5.1.0.beta1-x86_64-linux/ext/libv8-node/location.rb:17:in `load!'
    from /path/to/sq_mini_racer-0.3.1.0.6/ext/mini_racer_extension/vendor/gems/libv8-node-15.5.1.0.beta1-x86_64-linux/lib/libv8/node.rb:8:in `configure_makefile'
    from extconf.rb:260:in `<main>'

Psych is v4.0.3. I'm on an Ubuntu 22.04 system.

tisba commented 1 year ago

Hey @64kramsystem 👋

sq_mini_racer is a fork (see over here https://github.com/sqreen/mini_racer). Any reason you're not using mini_racer directly?

64kramsystem commented 1 year ago

sq_mini_racer is a fork (see over here https://github.com/sqreen/mini_racer). Any reason you're not using mini_racer directly?

Hi there!

Oh, sorry for that, I didn't know it :flushed:

It's a dependency of a gem I've used (sqreen). I'm closing the issue, and will open it in the related repository/ies :smile:

Thanks! :smile: