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

Unwedge docker build (rexml/strscan issue) #434

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

cabo
Copy link
Contributor

@cabo cabo commented Jun 17, 2024

This is a workaround, but it should work for a while.

Copy link
Owner

@martinthomson martinthomson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an upstream issue that I can track to follow along. This seems like it will fail at some point.

@martinthomson martinthomson merged commit 1a3e1a9 into martinthomson:main Jun 18, 2024
@cabo
Copy link
Contributor Author

cabo commented Jun 18, 2024

The upstream issues are

ruby/rexml#140
ruby/rexml#132
ruby/rexml#131

In ruby/rexml#140, @kou proposes to pin strscan instead (to the version that is included as a default gem in the Ruby version installed). This is better, as it allows the use of a current rexml, and worse, as it needs to be adjusted each time a new Ruby release updates the version of strscan included as default. Since a new Ruby release happens no more than three or four times a year (and not each of of these will update strscan), and the breakage is obvious (simply stopping the update of the docker image), I'd probably go with his recommendation.

The underlying issue is that bundler (reasonably) chooses the most recent revision of a gem, and that may not be the one that is included as a default gem in the ruby version in use -- a compiler run is then needed. A simply gem install does not have the problem and is (after the fix in rexml that had put in a lower bound before) content with the default gem of the installed Ruby version.

The issue is mostly invisible to most maintainers as they are not living under "pure ruby" constraints; the most recent (under certain constraints) revision of a gem is desirable even if it involves native compilation. (This occasionally still comes up as a "Windows issue", because there are additional prerequisites for getting things compiled in Windows.)

It seems that Ruby 3.4.0 (scheduled for 2024-12-25) will create a need to mention even default gems in the gem dependencies, so the fact that bundle does not allow to specify being content with the default gem will create a bigger problem with environments limited to pure ruby installations. Again, a simple gem install is unlikely to create problems.

@martinthomson
Copy link
Owner

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.

2 participants