Skip to content
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

Merged
merged 3 commits into from
Jan 7, 2021
Merged

Support Ruby 3.0 #146

merged 3 commits into from
Jan 7, 2021

Conversation

skalee
Copy link
Contributor

@skalee skalee commented Jan 6, 2021

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.

skalee added 3 commits January 6, 2021 15:59
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/
@inukshuk
Copy link
Owner

inukshuk commented Jan 7, 2021

Thanks! We can make the dependency optional even, since this is only used to convert to BibTeXML.

@inukshuk inukshuk merged commit fa95f86 into inukshuk:master Jan 7, 2021
@skalee
Copy link
Contributor Author

skalee commented Jan 7, 2021

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.

inukshuk added a commit that referenced this pull request Jan 7, 2021
@skalee skalee deleted the ruby-3 branch January 7, 2021 09:37
@skalee skalee restored the ruby-3 branch January 7, 2021 09:37
@skalee
Copy link
Contributor Author

skalee commented Jan 7, 2021

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.

@inukshuk
Copy link
Owner

inukshuk commented Jan 7, 2021

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.

@inukshuk
Copy link
Owner

inukshuk commented Jan 7, 2021

I did miss one require. They should all be allowed to fail.

inukshuk added a commit that referenced this pull request Jan 7, 2021
@inukshuk
Copy link
Owner

inukshuk commented Jan 7, 2021

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 to_xml methods will fail if you do use them. Is that OK with you? We can also bump the major version for this.

@skalee
Copy link
Contributor Author

skalee commented Jan 7, 2021

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.

@skalee skalee deleted the ruby-3 branch January 7, 2021 10:44
@tmaier
Copy link
Collaborator

tmaier commented Jan 17, 2024

Hi @skalee,

I am still collecting the consents for the license change, which I propose at #154. It would be really great, if you could consent to it as well, because it would allow moving on.

Thank you and kind regards

Tobias

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.

3 participants