Skip to content

add rexml dependency to support ruby v3 - #2457

Closed
tonytonyjan wants to merge 1 commit into
aws:masterfrom
tonytonyjan:patch-1
Closed

add rexml dependency to support ruby v3#2457
tonytonyjan wants to merge 1 commit into
aws:masterfrom
tonytonyjan:patch-1

Conversation

@tonytonyjan

Copy link
Copy Markdown

The following default gems are now bundled gems.

  • rexml
  • rss

ref: https://www.ruby-lang.org/en/news/2020/12/25/ruby-3-0-0-released/

@alextwoods

Copy link
Copy Markdown
Contributor

Thanks for the contribution! It looks like tests are failing for Ruby 1.9.3, which we unfortunately still need to support:

/home/travis/.rvm/gems/ruby-1.9.3-p551/gems/rexml-3.2.4/lib/rexml/xpath.rb:73: syntax error, unexpected tPOW, expecting ')'

      parser = XPathParser.new(**options)

However, it looks like this may be happening without this change as well. In previous runs, rexml was not being installed at all (eg: https://travis-ci.com/github/aws/aws-sdk-ruby/jobs/459953938). But that same change when re-run now does install rexml 3.2.4 (see: https://travis-ci.com/github/aws/aws-sdk-ruby/jobs/459953937). It looks like it has been added as an indirect dependency. rexml >= 0 was added as a dependency to crack on Dec 27 2020, after which all of our CI started failing (we depend on crack indirectly from cucumber). Its a quick fix to our Gemfile to address that issue (build output w/ fix).

That being said - we still have an issue I believe that adding a dependency on rexml breaks Ruby 1.9.3 and I'm not quite sure what we should do about that.

@mullermp

mullermp commented Jan 5, 2021

Copy link
Copy Markdown
Contributor

Related: ruby/rexml#38

@alextwoods

Copy link
Copy Markdown
Contributor

We discussed this a bit more in: ruby/rexml#38 and #2459 - and given the compatibility issues with Ruby 1.9 have decided against including rexml as an explicit dependency. rexml is currently used as the last resort xml engine so I've added an error message when none can be loaded.

In almost all cases, other gems are already depending on at least one of the xml libraries we support so most users should not be impacted by rexml not being an explicit dependency (and in those cases, they can add it, or select any of the supported xml libraries).

If you have a specific use case where this is required as a dependency in the sdk, lets chat! Otherwise, I'm going to close this PR - but thank you for opening it and kicking off such an important discussion!

@alextwoods alextwoods closed this Jan 6, 2021
@patbl

patbl commented Jul 28, 2026

Copy link
Copy Markdown

Now that the required Ruby version is 2.7+, would you reconsider adding rexml as a requirement (especially since it's been a default or bundled gem since Ruby 2.6)?

https://stdgems.org/rexml/

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.

4 participants