Skip to content
This repository has been archived by the owner on Nov 30, 2024. It is now read-only.

Drop Ruby < 2.3 #435

Closed
wants to merge 42 commits into from
Closed

Drop Ruby < 2.3 #435

wants to merge 42 commits into from

Conversation

pirj
Copy link
Member

@pirj pirj commented Nov 12, 2020

Better viewed ignoring indentation changes https://github.com/rspec/rspec-support/pull/435/files?diff=split&w=1

As per rspec/rspec#61 (comment)

Minimal changes to rspec-core and rspec-mocks were required to run rspec-support's own spec suite, pushed to branches with the same name.

What has been done

Done:

  • reduce Travis matrix to rubies with complete kwargs support (and compatibility issues with modern openssl)
  • reduce Appveyor matrix
  • clean up RubyFeatures
  • check respond_to?
  • check method_defined?
  • check send (where we call private methods that later became public)
  • cleanup Gemfile
  • update required_ruby_version
  • update VERSION
  • check RUBY_VERSION
  • check if we require_rspec_support ruby_features where RubyFeatures are not used
  • [-] check define_method where def would suffice
  • [+] check (class << self; self; end) usages
  • check if Java::JavaLang::String.instance_method(:char_at).arity == -1
  • [?] check Java::JavaLang::String.instance_method(:char_at).parameters == [] - still the case
  • check 1.8, 1.9, 2.0, 2.1, jruby, 9.0, 9.1, mri
  • change old ruby induced rubocop settings, fix offences
  • check requires for support's mutex

Discuss:

  • [?] introduce https://github.com/ruby/ruby2_keywords dependency and remove respond_to?(:ruby2_keywords, true) check
  • [?] cleanup of build functions/predicates
  • [?] drop Ruby 2.3 - problematic'ish due to a dependency on outdated OpenSSL, EOL'ed, not supported by RuboCop, still used by 8% of users

TODO:

  • check "work around", "workaround" - there are two cases: check if this was fixed in JRuby 9.2
  • check docs

for rspec-dev:

  • remove unused predicate_functions
  • remove legacy .rubocop settings

pirj added 30 commits November 12, 2020 19:44
https://rubies.travis-ci.org/ claims they don't even have 9.1.7.0

jruby-head
jruby-9.1.9.0
jruby-9.1.5.0
jruby-9.1.4.0
jruby-9.1.3.0
jruby-9.1.2.0
jruby-9.1.1.0
jruby-9.1.0.0
jruby-9.0.5.0
jruby-9.0.4.0
jruby-9.0.3.0
jruby-9.0.1.0
jruby-9.0.0.0

RVM has 9.2 now
We're always on Ruby 2.3+
We always test against 9.0+, 9.2 actually, and 9.2 is recommended for
all users, there's no excuse to be using 9.0 or 9.1
Java::JavaLang::String.instance_method(:char_at).arity evaluates to 1 on
JRuby 9.2(.13.0)
@pirj pirj self-assigned this Nov 12, 2020
@pirj pirj requested review from JonRowe and benoittgt and removed request for JonRowe November 12, 2020 22:31
end
end
end
# FIXME: if you remove this, `double`, `hide_const`, `stub_const` can't be found in specs
Copy link
Member Author

Choose a reason for hiding this comment

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

🤯 🤷‍♂️

@pirj

This comment has been minimized.

pirj added 2 commits November 13, 2020 03:06
Firstly, for some reason I can't push there to rc4.0 branch and the
build fails when trying to check it out.

Additionally, why is it needed?
@JonRowe JonRowe closed this Nov 13, 2020
@JonRowe JonRowe reopened this Nov 13, 2020
@JonRowe JonRowe marked this pull request as draft November 13, 2020 08:54
@JonRowe
Copy link
Member

JonRowe commented Nov 13, 2020

Any PRs working up proposals for RSpec 4.0 need to be marked as draft as they will require very careful release management, they will not be merged to main for a long time.

@JonRowe JonRowe changed the base branch from main to 4-0-dev November 13, 2020 08:57
@JonRowe
Copy link
Member

JonRowe commented Nov 13, 2020

I've created a 4-0-dev branch on all the repos, please target any PRs to that branch

@pirj
Copy link
Member Author

pirj commented Nov 13, 2020

@JonRowe Sounds good, thanks!

May I kindly ask you to grant me rspec/rspec repo branch push permission? I can push to any other repo's branch, but not rspec/rspec.
Not being able to push a branch with matching name results in build errors:

Fetching https://github.com/rspec/rspec.git

fatal: Needed a single revision

Git error: command `git rev-parse --verify rc4.0` in directory

@pirj
Copy link
Member Author

pirj commented Nov 13, 2020

I'll close this PR and will open another one with a more descriptive branch name (drop-old-rubies or alike).

@pirj pirj closed this Nov 13, 2020
@pirj pirj deleted the rc4.0 branch November 13, 2020 11:11
@JonRowe
Copy link
Member

JonRowe commented Nov 13, 2020

@pirj just make sure to target 4-0-dev, I'll get it setup properly at the weekend. RSpec 3.x will continue to support the current Ruby matrix

@pirj
Copy link
Member Author

pirj commented Nov 14, 2020

Superseded by #436

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants