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

[experimental] Drop support of Ruby < 2.2 & Rails < 5.2 #2225

Closed
wants to merge 4 commits into from

Conversation

pirj
Copy link
Member

@pirj pirj commented Dec 8, 2019

As per Rails' support policy, Rails dropped all support for 5.0/5.1, even for severe security issues.

This comment mentioned that we planned to keep support for 5.0.
Another comment mentioning plans to drop 4.2 support.

From Versioning Strategy RFC:

Release a major with any Rails Major, removing support for any newly unsupported versions of Rails, and adding support for the new major.

This pull request has some rough edges, but I can iron it out if you feel like dropping support for < 5.2 is the way to go.

@pirj pirj self-assigned this Dec 8, 2019
@pirj pirj marked this pull request as ready for review December 8, 2019 19:11
1.8.5 fails hard `rake` locally with:

    rm config/application.rb
    bin/rake app:template LOCATION='../../example_app_generator/generate_stuff.rb'
    rake aborted!
    LoadError: dlopen(/Users/pirj/source/rspec-dev/repos/bundle/ruby/2.5.0/gems/nokogiri-1.8.5/lib/nokogiri/nokogiri.bundle, 9): Library not loaded: /Users/pirj/.rvm/rubies/ruby-2.5.3/lib/libruby.2.5.dylib
      Referenced from: /Users/pirj/source/rspec-dev/repos/bundle/ruby/2.5.0/gems/nokogiri-1.8.5/lib/nokogiri/nokogiri.bundle
      Reason: image not found - /Users/pirj/source/rspec-dev/repos/bundle/ruby/2.5.0/gems/nokogiri-1.8.5/lib/nokogiri/nokogiri.bundle
    /Users/pirj/source/rspec-dev/repos/bundle/ruby/2.5.0/gems/nokogiri-1.8.5/lib/nokogiri.rb:32:in `require'
    ...

    Caused by:
    LoadError: cannot load such file -- nokogiri/2.5/nokogiri
    /Users/pirj/source/rspec-dev/repos/bundle/ruby/2.5.0/gems/nokogiri-1.8.5/lib/nokogiri.rb:30:in `require'
    /Users/pirj/source/rspec-dev/repos/bundle/ruby/2.5.0/gems/nokogiri-1.8.5/lib/nokogiri.rb:30:in `<top (required)>'
    /Users/pirj/source/rspec-dev/repos/bundle/ruby/2.5.0/gems/loofah-2.4.0/lib/loofah.rb:4:in `require'

1.9.1 supports Ruby 2.1+.
@pirj
Copy link
Member Author

pirj commented Dec 8, 2019

The only failure is YARD on JRuby mistakenly takes {lib} in

       gem lib, :git => "https://github.com/rspec/#{lib}.git", :branch => 'master'

for a reference. Appreciate any guidance here.

I'm getting a weird nokogiri issue locally, running rake fails to find 1.8.5. Update to nokogiri 1.9.1 (that requires Ruby 2.1+) fixes the issue.

PS rake passed locally.

RuboCop 0.77 only supports 2.3, support for 2.2 was dropped in 0.69
@pirj
Copy link
Member Author

pirj commented Dec 8, 2019

Questions/TODO:

Is it possible to get rid of this?

# We need to copy this method from Thor for older Rails versions
def comment_lines(path, flag, *args)

Evaluate numerous respond_to? calls, e.g.:

          ::ActiveRecord::Migration.respond_to?(:check_pending!)
I18n.enforce_available_locales = true if I18n.respond_to?(:enforce_available_locales)

Simplify FixtureFileUploadSupport that has some trick to support Rails 3.

@pirj pirj changed the title [experimental] Cleanup support of Ruby < 2.2 & Rails < 5.2 [experimental] Drop support of Ruby < 2.2 & Rails < 5.2 Dec 8, 2019
@JonRowe
Copy link
Member

JonRowe commented Dec 8, 2019

I seem to recall the original discussion was to drop support for 4.x in 4, but not 5.x, leaving that for later, I know thats not what the RFC says, but basically kicking out all of the previously supported rails versions at once is a bit much.

@JonRowe
Copy link
Member

JonRowe commented Dec 8, 2019

See #2071 for reference

@JonRowe JonRowe closed this Dec 8, 2019
@pirj pirj deleted the cleanup-unsupported-ruby-and-rails-checks branch December 9, 2019 06:40
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.

None yet

2 participants