-
Notifications
You must be signed in to change notification settings - Fork 29
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
date
dependency requires native compilation
#96
Comments
The issue here is that I really wish Rubygems had optional dependencies so I could disable this type of unnecessary dependency. |
@mperham instead of locking to mail 2.7.1, you could lock the Gem::Specification.find{_1.name == "date" && _1.default_gem?}.version You could even add that to the Gemfile (although you would still need a different lockfile for each version of ruby). Or you could add Or you could lock Obviously, manually managing gem versions like this is a pain. |
@mperham, I was about to start a discussion over at https://github.com/rubygems/rubygems, but then I wondered if the feature I wanted wasn't already supported. So I read through the bundler docs and found an existing option which might work for you,
It's not exactly what I was looking for, but it might be a better solution than the others I suggested? In addition to your "optional dependencies" suggestion, I have a few other ideas for potential bundler features that maybe would help. i.e. |
I think explicitly locking versions with a comment is superior to using Bundler in a non-default mode. The KISS principle. 99% of Ruby developers, including myself, have no idea what the side effects of that switch are. |
I know what I want and expect the effects to be, but I've never actually used it so that also puts me in the 99% who have no idea! 😉 |
I can release it. But pre-compiled gems need many of maintenance resources. I'm negative to do it.
It's the short-term solution. Because We don't have to extract embedded |
Originally posted by @mperham in #66 (comment)
I've been deploying everything in containers for a while now, so I forget about these pain points. It's a common pattern for production Dockerfiles to either uninstall compilers or copy compiled libs over from another image layer.
Unless you are deploying to ruby 2.4 and older, some version of the date gem should be installed already... so if you are willing and able to simply pin the version that matches your distro ruby installation, that should work, I think.
Another option might be to create native gem files, maybe scripted with docker or rake-compiler or maybe rake-compiler-dock, upload them to S3, and configure the server with an S3 gem source.
I wonder if ruby/date would consider a PR for publishing pre-compiled native gems?
And, of course, you could fork net-imap and install from your fork. Or we could drop the explicit dependency.☹️
@hsbt Any thoughts?
The text was updated successfully, but these errors were encountered: