-
Notifications
You must be signed in to change notification settings - Fork 1
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
The future of pre-compiled gems #1
Comments
Subscribe! (I know, I can do this with the little button the side, but I want to very visibly subscribe to the thread :) ) I maintain eventmachine and mysql2 and have spent sooo much time over the years sorting out Windows builds. Aside: It's a very thankless task. Microsoft would be well served with their forays into Open Source, not least of which is now buying GitHub, to also evangelize to Windows users on best practices for engaging with open source. |
My opinions (1.5 years after asked?!):
1a) With annual Ruby updates and ad-hoc (not scheduled by a public release plan) updates to native gems compounds the problem and users should not need to be exposed to this cycle or be required to build gems simply to continue using their software.
2a) With the continuing challenges in safe-computing and cyber-risk, integrators and developers will need to be able to rapidly update their applications -- to include the Ruby version as support ends -- easily. The discussion about not updating to 2.4 or 2.5 because of build challenges at a user level will only be increased if developers don't worry about updating their applications because of the challenges with moving to an updated Ruby version.
Thanks, MSP Greg! |
Thank you for being here. I’d like your opinions on the below. There may also be information you’re unaware of. Of course, I’ve placed it at the end…
Intro
The term ‘fat-binary gem’ has often been used. I think the term ‘pre-compiled gem’ is probably a more descriptive term. I’ll use the abbreviation PCG for them.
Ruby builds 2.3 and earlier are done with a proprietary build system known as RubyInstaller (RI).
Ruby builds from 2.4 onward are known as RubyInstaller2 (RI2) builds, and use a non-proprietary build system (MSYS2/MinGW). Again, thanks to Lars Kanis for his work on it and the runtime.
Should PCG’s exist?
In recent discussions, the issue of RI2 (ruby 2.4 +) adoption has been discussed, and the lack support for PCG’s has been mentioned as a strong deterrent, especially for using Ruby 2.5. The idea of stopping support for PCG’s has also been mentioned.
I believe that support for PCG’s should continue for the following reasons:
Ease of PCG construction
If PCG’s should be supported, what can be done to improve their support for current Ruby versions?
There are tools available to help build PCG’s. Regardless, gem owners/maintainers are lagging behind with releases supporting new Ruby versions.
After Ruby trunk testing on Windows was stable, I started encouraging gems to test using Appveyor, and also use trunk. Most of the gems I worked with were extension gems.
Recently, I considered the issue of PCG’s lagging behind.
My first thought was that they should be built on Appveyor, as all the required software is installed on their standard image. No one has to deal with cross-compiling.
Later, after experimenting with it, I realized that, given that testing involves compiling, why not combine PCG construction along with testing. Run it real-time, so every commit/PR constructs the PCG’s and tests them.
So, this repo contains the shared PowerShell files for that integration. To use it in on Appveyor, it requires changing the appveyor.yml file, and three additional files.
The first is a PowerShell script, which defines constants related to the gem, and also functions that are called by the shared framework. The second file is a ruby file that builds the gem. Third file is a rakefile specific to testing on Windows, as many rakefiles involve several tasks and often require gems that are not needed for testing.
Note that because the system tests by installing the gem, test files must be included in it.
Notes on the framework
Notes on Appveyor
At the time of writing, I have done PR's using this system for puma, sqlite3-ruby, and bcrypt-ruby. I should be updating a PR on EventMachine this weekend
Thanks for taking the time to read this, Greg
The text was updated successfully, but these errors were encountered: