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

Patch Rubocop to work with newer Psych versions #2779

Closed
wants to merge 5 commits into from

Conversation

dnasevic-godaddy
Copy link

@dnasevic-godaddy dnasevic-godaddy commented Dec 24, 2021

Description

Most recent RubyGems versions go with Psych >= 4.0 that breaks the RuboCop rake task. We use an old RuboCop version to target Ruby 2.2. So, we cannot upgrade RuboCop to latest and we have to patch it to work with the newer Psych versions.

We're also fixing some CI warnings for Ruby versions 2.3 - 2.5 for RubyGems versions having a bug that prevents required_ruby_version from working for Bundler.

You can see the failing CI builds here: https://github.com/puma/puma/actions/runs/1619499856.

Your checklist for this pull request

  • I have reviewed the guidelines for contributing to this repository.
  • I have added (or updated) appropriate tests if this PR fixes a bug or adds a feature.
  • My pull request is 100 lines added/removed or less so that it can be easily reviewed.
  • If this PR doesn't need tests (docs change), I added [ci skip] to the title of the PR.
  • If this closes any issues, I have added "Closes #issue" to the PR description or my commit messages.
  • I have updated the documentation accordingly.
  • All new and existing tests passed, including Rubocop.

@dentarg
Copy link
Member

dentarg commented Dec 31, 2021

Thanks, looks like we can bump RuboCop to 0.64.0 instead of patching it and still have compatibility with Ruby 2.2.

I'm not seeing exactly what changed recently in RubyGems to make this happening now, (Psych 4.0 was released a while ago, this summer), but saving a bunch of links I looked at anyways:

dentarg added a commit that referenced this pull request Dec 31, 2021
Last version we can use while still having Ruby 2.2 support, 0.65.0
drops it: https://github.com/rubocop/rubocop/blob/0c0bee18073201396f679848954235d10b9f8355/CHANGELOG.md#0650-2019-02-19

Fixes issues with RubyGems and Psych: #2779
@dentarg
Copy link
Member

dentarg commented Dec 31, 2021

I couldn't push to your branch so I opened up a new PR with a commit bumping RuboCop instead: #2783

dentarg added a commit that referenced this pull request Dec 31, 2021
* Patch Rubocop's yaml_safe_load to work with newer Psych versions

* Fix rubocop namespace

* Remove rubocop skip condition from workflow steps

* Fix rubygems warnings about required_ruby_version bug

* Fix step name

* Use RuboCop 0.64.0

Last version we can use while still having Ruby 2.2 support, 0.65.0
drops it: https://github.com/rubocop/rubocop/blob/0c0bee18073201396f679848954235d10b9f8355/CHANGELOG.md#0650-2019-02-19

Fixes issues with RubyGems and Psych: #2779

Co-authored-by: Dalibor Nasevic <dalibor.nasevic@gmail.com>
JuanitoFatas pushed a commit to JuanitoFatas/puma that referenced this pull request Sep 9, 2022
* Patch Rubocop's yaml_safe_load to work with newer Psych versions

* Fix rubocop namespace

* Remove rubocop skip condition from workflow steps

* Fix rubygems warnings about required_ruby_version bug

* Fix step name

* Use RuboCop 0.64.0

Last version we can use while still having Ruby 2.2 support, 0.65.0
drops it: https://github.com/rubocop/rubocop/blob/0c0bee18073201396f679848954235d10b9f8355/CHANGELOG.md#0650-2019-02-19

Fixes issues with RubyGems and Psych: puma#2779

Co-authored-by: Dalibor Nasevic <dalibor.nasevic@gmail.com>
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

3 participants