Skip to content

replace REXML with nokogiri (note REXML code currently breaks in ruby 3.0) #68

Open

Description

@jrochkind

This code is still using REXML. It should be replaced with nokogiri, becuase REXML is unmaintained and abandoned and much slower than nokogiri.

If there are other alternatives to nokogiri someone wants to suggest, feel free. Nokogiri is definitely the most popular in ruby at present, and one most developers are familiar with (for purposes of writing the code in this gem), but perhaps there's something lighter weight suffiicent for needs here.

Activity

  1. jrochkind commented on Aug 22, 2019

    @jrochkind
    CollaboratorAuthor

    REXML is used both in tests and in actual live code.

    Replacing it in live code is more important than replacing it in tests. Although it might make sense to get it out of tests too, I'd start with replacing it in live code without touching the tests and still having them green, and then considering if you want to leave it that way, or replace REXML in tests too.

  2. jrochkind commented on Apr 4, 2022

    @jrochkind
    CollaboratorAuthor

    Note that current code fails on ruby 3.0, because of assuming rexml is in stdlib, which it no longer is.

    If I try to run tests in ruby 3.0, I get:

    $ bundle exec rake
    /Users/jrochkind/code/ruby-oai/lib/oai/provider.rb:1:in `require': cannot load such file -- rexml/document (LoadError)
    

    For Ruby 3.0, you may need to add rexml as an explicit dependency, but not sure if that will break things in older versions of ruby. We really have to fix this one way or another.

  3. changed the title [-]replace REXML with nokogiri[/-] [+]replace REXML with nokogiri (note REXML code currently breaks in ruby 3.0)[/+] on Apr 4, 2022
  4. added this to the 2.0 milestone on Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions