-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Ruby 3.0 #146
Support Ruby 3.0 #146
Conversation
REXML is a bundled gem in Ruby 3.0. As a consequence, it must be specified in the gemspec. I've chosen ~> 3.0 dependency version constraint for REXML, so that REXML provided in Ruby 2.6 and 2.7 satisfies it. More about the Gemified Standard Library: - https://stdgems.org/ - https://stdgems.org/rexml/
Thanks! We can make the dependency optional even, since this is only used to convert to BibTeXML. |
It's a bundled gem in Ruby 3 and a default gem in Ruby 2.6-2.7. That means that all these Rubies have REXML gem pre-installed. |
Placing REXML in Gemfile only as in b002b79 is not a good idea IMO. Tests will pass, locally it will work, but software which depends on this gem will break unless developers explicitly specify REXML gem in the Gemfile or gemspec themselves. |
It will break only if they use the BibTeXML conversion though (or did I miss a require?) and only if they do not have the Gem installed (which, as you've pointed out should be pre-installed currently). In this case it's just like other optional dependencies (like the old rdf gem) are treated. |
I did miss one require. They should all be allowed to fail. |
The idea is that you have to specify REXML as a dependency if you use the BibTeXML conversion -- if you don't, that converter will not be available and some |
Well, it's all up to you. ;) Do whatever you consider the best for this project, I guess you'll have to add some installation notes in README or something. Sure I can simply add REXML as a runtime dependency to my gem, no worries here. |
This pull request adds compatibility with Ruby 3.0, which has been released recently.
The only important change is that REXML has been specified as a runtime dependency. This is necessary because REXML is now a bundled gem (see https://stdgems.org/). Version constraint for this gem (
~> 3.0
) is relaxed enough to support REXML provided in Ruby 2.6 and 2.7.