baygeldin / tantiny

Tiny full-text search for Ruby powered by Tantivy
MIT License
218 stars 8 forks source link

Error converting to String #21

Closed bendangelo closed 2 months ago

bendangelo commented 3 months ago

Just pulled the repo and getting this error. Using Ruby 3.3.3

Steps:

bin/setup
rake build
rake spec
=>
TypeError:                                                                                                                                                
        Error converting to String                                                                                                                              
      # ./lib/tantiny/tokenizer.rb:15:in `__new_stemmer_tokenizer'                                                                                              
      # ./lib/tantiny/tokenizer.rb:15:in `new'                         
baygeldin commented 3 months ago

The code really does become obsolete very quickly if not supported, huh... I'll try to fix it next week, but I'll be honest, after that I'll probably archive the repo 😢 The project that I'm working on currently doesn't have a use for this gem, and I don't have the spare time to support it.

bendangelo commented 3 months ago

No problem. A fix would be much appriciated.

baygeldin commented 3 months ago

Okay, so it turned out to be way more complicated than I hoped for, unfortunately. The issue is with the rutie gem that provides Ruby/Rust bindings. Apparently it doesn't support Ruby 3.x.x, although I haven't found it be the case when running specs on my local machine with Ruby 3.3.3 and Rust 1.76.0. However, when I updated Rust to 1.79.0 and everything broke :/ Again, seems to be a problem with rutie.

One option is to rewrite the gem to using magnus (example), but this will take some effort and I'm not confident that it wouldn't have the same issues with support down the line.

bendangelo commented 3 months ago

I'm on Rust 1.79.0. So maybe just update the docs to say only supports Rust 1.76.0.