-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Bump minimum required version to meet required dependencies #1949
Conversation
While fpm may run on Ruby 1.9, several of it's dependencies no longer support that release. I recently discovered this trying to build on an older ruby. The `json` gem requires 2.3 or later and the `public_suffix` gem requires 2.6 or later. So I'm proposing this PR to bump the minumum version requirement to 2.6.2 which seems to work without issue.
Hi Carl! I’m in favor of making the minimum version more accurate as you propose :) I have some good news — I recently removed the dependency on public_suffix in #1946, and that should bring the minimum down to what the json gem requires. as for json? Maybe we can figure out what minimum version of Ruby ships with json and go with that? I forget some of the history, but Ruby ships with json in the standard library, so it’s possible we don’t even need as an external gem dependency? |
A quick search tells me that a version of |
In fairness, I don't think it's a big deal that the |
Looking at the history, the As a test, I tried removing the Test suite without
Maybe we could try removing the I have trouble testing very old Ruby versions because they dont' compile against newer versions of OpenSSL, etc, and I haven't tried using VMs. |
Here's the diff I used: diff --git a/fpm.gemspec b/fpm.gemspec
index 1848da4..f4f8f04 100644
--- a/fpm.gemspec
+++ b/fpm.gemspec
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
# For parsing JSON (required for some Python support, etc)
# http://flori.github.com/json/doc/index.html
- spec.add_dependency("json", ">= 1.7.7", "< 3.0") # license: Ruby License
+ #spec.add_dependency("json", ">= 1.7.7", "< 3.0") # license: Ruby License
# For logging
# https://github.com/jordansissel/ruby-cabin If you can test, that'd be awesome. You can build your own fpm gem file by running |
Regrettably, I have taken this too far, and fortunately, I now have some fun news to share! I was able to get Ruby 1.9.3 to run fpm with only minor modifications. Would that help? |
The original `json` gem dependency was added in the original fpm.gemspec because, at the time, Ruby 1.8.7 was common and required an external `json` dependency for parsing JSON. Later, Ruby releases since 1.9.1 have bundled `json`[1]. Therefore, it feels safe to remove this dependency. As a bonus, the rubygems `json` gem places requirements on the minimum version of Ruby. At this time, the latest `json` gem requires Ruby >= 2.3. If the `json` gem dependency is removed, fpm will still retain the ability to process JSON while lowering the minimum required Ruby version to Ruby 1.9.x -- It's not perfect, but it's a start! :) [1] https://docs.ruby-lang.org/en/2.3.0/NEWS-1_9_1.html The idea for this change change came originally from a discussion with @edolnx in #1949
The original `json` gem dependency was added in the original fpm.gemspec because, at the time, Ruby 1.8.7 was common and required an external `json` dependency for parsing JSON. Later, Ruby releases since 1.9.1 have bundled `json`[1]. Therefore, it feels safe to remove this dependency. As a bonus, the rubygems `json` gem places requirements on the minimum version of Ruby. At this time, the latest `json` gem requires Ruby >= 2.3. If the `json` gem dependency is removed, fpm will still retain the ability to process JSON while lowering the minimum required Ruby version to Ruby 1.9.x -- It's not perfect, but it's a start! :) [1] https://docs.ruby-lang.org/en/2.3.0/NEWS-1_9_1.html The idea for this change change came originally from a discussion with @edolnx in #1949 Fixes #1741, #1264, #1949
The original `json` gem dependency was added in the original fpm.gemspec because, at the time, Ruby 1.8.7 was common and required an external `json` dependency for parsing JSON. Later, Ruby releases since 1.9.1 have bundled `json`[1]. Therefore, it feels safe to remove this dependency. As a bonus, the rubygems `json` gem places requirements on the minimum version of Ruby. At this time, the latest `json` gem requires Ruby >= 2.3. If the `json` gem dependency is removed, fpm will still retain the ability to process JSON while lowering the minimum required Ruby version to Ruby 1.9.x -- It's not perfect, but it's a start! :) [1] https://docs.ruby-lang.org/en/2.3.0/NEWS-1_9_1.html The idea for this change change came originally from a discussion with @edolnx in #1949 Fixes #1741, #1264, #1949
The original `json` gem dependency was added in the original fpm.gemspec because, at the time, Ruby 1.8.7 was common and required an external `json` dependency for parsing JSON. Later, Ruby releases since 1.9.1 have bundled `json`[1]. Therefore, it feels safe to remove this dependency. As a bonus, the rubygems `json` gem places requirements on the minimum version of Ruby. At this time, the latest `json` gem requires Ruby >= 2.3. If the `json` gem dependency is removed, fpm will still retain the ability to process JSON while lowering the minimum required Ruby version to Ruby 1.9.x -- It's not perfect, but it's a start! :) [1] https://docs.ruby-lang.org/en/2.3.0/NEWS-1_9_1.html The idea for this change change came originally from a discussion with @edolnx in #1949 Fixes #1741, #1264, #1949
The original `json` gem dependency was added in the original fpm.gemspec because, at the time, Ruby 1.8.7 was common and required an external `json` dependency for parsing JSON. Later, Ruby releases since 1.9.1 have bundled `json`[1]. Therefore, it feels safe to remove this dependency. As a bonus, the rubygems `json` gem places requirements on the minimum version of Ruby. At this time, the latest `json` gem requires Ruby >= 2.3. If the `json` gem dependency is removed, fpm will still retain the ability to process JSON while lowering the minimum required Ruby version to Ruby 1.9.x -- It's not perfect, but it's a start! :) [1] https://docs.ruby-lang.org/en/2.3.0/NEWS-1_9_1.html The idea for this change change came originally from a discussion with @edolnx in #1949 Fixes #1741, #1264, #1949
Sorry it took so long to get back to you. Works fine in my environment. Thanks Jordan! |
While fpm may still stick to the conventions of Ruby 1.9, several of it's dependencies no longer support that release. I recently discovered this trying to build on an older ruby in a resource constrained system. The
json
gem requires ruby 2.3 or later and thepublic_suffix
gem requires ruby 2.6 or later. So I'm proposing this PR to bump the minimum version requirement to 2.6.2 which seems to work without issue. Hopefully this will help someone in the future who is in the same boat I was in.@jordansissel if you feel this is inappropriate, just let me know what you think would be a better approach. Happy to just make a PR to the README if that makes more sense.