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

Upgrade to Ruby 2.6 #671

Merged
merged 8 commits into from
Feb 6, 2021
Merged

Conversation

jasl
Copy link
Contributor

@jasl jasl commented Jan 15, 2021

Have discussed at #669 (comment)

This PR includes

  • Ruby minimum 2.6.0
    • Update CI
      • Remove tests against Ruby 2.3 - 2.5
      • Linux OS image upgrade to 20.04
  • Bundler bump (CI & Dev only)
  • Rubocop bump (dev only)
  • ActiveSupport version specification bumped to '>= 5.0', '< 7'
  • Upgrade WebMock

In future:

@jasl jasl force-pushed the upgrade-minimal-ruby branch 2 times, most recently from 54feb9a to bdf3a59 Compare January 15, 2021 15:46
@jasl
Copy link
Contributor Author

jasl commented Jan 15, 2021

@igor-makarov Please review

cocoapods-core.gemspec Outdated Show resolved Hide resolved
lib/cocoapods-core/yaml_helper.rb Show resolved Hide resolved
lib/cocoapods-core/yaml_helper.rb Show resolved Hide resolved
Gemfile.lock Show resolved Hide resolved
@igor-makarov
Copy link
Contributor

Can you explain what Zeitwerk is and why it's useful? Also, how hard is it to integrate? Does it have performance benefits?

@jasl
Copy link
Contributor Author

jasl commented Jan 15, 2021

About the last commit, rubocop outputs

Inspecting 42 files
.........................................W

Offenses:

lib/cocoapods-core/yaml_helper.rb:215:7: W: [Correctable] Lint/UselessAccessModifier: Useless private access modifier.
      private
      ^^^^^^^
lib/cocoapods-core/yaml_helper.rb:294:26: C: [Correctable] Style/TrailingCommaInArguments: Avoid comma after the last parameter of a method call, unless each item is on its own line.
        /\.(nan|NaN|NAN)/, # NaN
                         ^
lib/cocoapods-core/yaml_helper.rb:299:25: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
      INDICATOR_START = /\A#{Regexp.union(INDICATOR_START_CHARS)}/
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/cocoapods-core/yaml_helper.rb:302:31: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
      RESOLVED_TAGS_PATTERN = /\A#{Regexp.union(RESOLVED_TAGS)}\z/
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/cocoapods-core/yaml_helper.rb:305:35: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
      VALID_PLAIN_SCALAR_STRING = %r{\A ...
                                  ^^^^^

42 files inspected, 5 offenses detected, 5 offenses auto-correctable

@jasl
Copy link
Contributor Author

jasl commented Jan 15, 2021

Can you explain what Zeitwerk is and why it's useful? Also, how hard is it to integrate? Does it have performance benefits?

It's Ruby thread-safe file loader (although CocoaPods no need to care about of thread-safe),
it starts with a very good practice naming convention, then you no longer need do reqiure files in your project.

No performance benefits.

off-topic: For CLI application, maybe https://github.com/Shopify/bootsnap can help to reduce start up time

.rubocop_cocoapods.yml Show resolved Hide resolved
cocoapods-core.gemspec Outdated Show resolved Hide resolved
@jasl
Copy link
Contributor Author

jasl commented Jan 17, 2021

In addition I upgrade WebMock

@igor-makarov
Copy link
Contributor

@jasl could you rebase on master, discarding changes I pushed - #673 is better and it's already merged.

@jasl
Copy link
Contributor Author

jasl commented Jan 24, 2021

@jasl could you rebase on master, discarding changes I pushed - #673 is better and it's already merged.

Done

@igor-makarov
Copy link
Contributor

Could you drop the af1c and 5631 commits?

@jasl
Copy link
Contributor Author

jasl commented Jan 24, 2021

Could you drop the af1c and 5631 commits?

Done

@igor-makarov
Copy link
Contributor

igor-makarov commented Jan 24, 2021

@jasl I've noticed that RuboCop wasn't linting specs anymore so I fixed, see also CocoaPods/shared#11

@dnkoutso dnkoutso added this to the 1.11.0 milestone Jan 27, 2021
@igor-makarov igor-makarov merged commit 1c47685 into CocoaPods:master Feb 6, 2021
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

5 participants