Skip to content

Is it possible to unconstrain strscan or fallback if not available? #132

Closed
@adsr

Description

@adsr

Hello, as I understand it, strscan is a standard gem which means Ruby will always include some version of it. One can update the version via gem, but then it must be compiled on the target system as it isn't provided as a binary gem. Recent versions of strscan seem to require a Ruby compiled with libonig support[1], which may not be available. If I'm understanding all of this correctly, this effectively limits the kinds of Ruby installs where rexml can be used. (EDIT: I misinterpreted log output. libonig is optional. As mentioned here, workarounds include ensuring build-essential is installed (gcc and make) or using an earlier version of rexml as mentioned below.)

If your gem directly requires rexml, the easiest way to get around this is to require an earlier version of rexml that doesn't use strscan (e.g., 3.2.6). This isn't a great solution as we miss out on updates. And if rexml is further down the dependency chain, even this may not be viable.

  • Does rexml need to constrain the version of strscan? Could we leave it unpinned for better compatibility? (Potentially related to 372daf1)
  • If the version constraint is needed, can rexml fallback to the old routines if the correct strscan version is unavailable? (or something that uses an earlier version of strscan?)

Apologies if I'm off the mark. By no means a Ruby expert.

[1] https://github.com/ruby/strscan/blob/ca66d48c47d2b17753a660c628606f0bf788d594/ext/strscan/extconf.rb#L5-L6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions