Skip to content

Conversation

@iangmaia
Copy link
Contributor

@iangmaia iangmaia commented Oct 5, 2023

What does it do?

Building on top of #492 and related PRs, this PR finally upgrades release-toolkit's Ruby version to 3.2.2, also fixing all reported Rubocop offences (see commits breakdown) and updates known issues (.rubocop_todo.yml).

Note: This PR should be merged only when we're ready to support Ruby 3 on all client projects (or at least when we're sure they will jump straight to the release-toolkit Ruby 3 version).

Checklist before requesting a review

  • Run bundle exec rubocop to test for code style violations and recommendations
  • Add Unit Tests (aka specs/*_spec.rb) if applicable
  • Run bundle exec rspec to run the whole test suite and ensure all your tests pass
  • Make sure you added an entry in the CHANGELOG.md file to describe your changes under the appropriate existing ### subsection of the existing ## Trunk section.
  • If applicable, add an entry in the MIGRATION.md file to describe how the changes will affect the migration from the previous major version and what the clients will need to change and consider.

@iangmaia iangmaia added the enhancement New feature or request label Oct 5, 2023
@iangmaia iangmaia mentioned this pull request Oct 6, 2023
5 tasks
@iangmaia iangmaia added the Do Not Merge e.g. if it depends on another PR to be merged first, or if that PR is only to trigger CI on forks, … label Oct 26, 2023
@crazytonyli
Copy link
Contributor

All of our apps and most projects that are in active development have been migrated to Ruby 3.2.2. I think it's time for release-toolkit to make the transition too?

@iangmaia iangmaia removed the Do Not Merge e.g. if it depends on another PR to be merged first, or if that PR is only to trigger CI on forks, … label Feb 1, 2024
@wordpress-mobile wordpress-mobile deleted a comment from wpmobilebot Feb 1, 2024
@iangmaia
Copy link
Contributor Author

iangmaia commented Feb 1, 2024

Great @crazytonyli, thanks for the heads up 👍 I've rebased the PR and will mark it as Ready for Review.

@iangmaia iangmaia marked this pull request as ready for review February 1, 2024 16:33
@iangmaia iangmaia requested review from a team and crazytonyli February 1, 2024 17:13
# Rule enforced after migrating to Ruby 3, to prevent the new syntax which allows for hash values and keyword arguments
# omission, such as `myMethod(x:, y:)` and `h = { a:, b: }`.
Style/HashSyntax:
EnforcedShorthandSyntax: never
Copy link
Contributor

Choose a reason for hiding this comment

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

May I know why adding this rule? I think it'd good to adopt Ruby 3 features from now on?

Copy link
Contributor

Choose a reason for hiding this comment

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

@crazytonyli see paaHJt-5yi-p2

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks! I have seen that post, but it didn't come to me while reviewing the code. 🙈

@iangmaia iangmaia requested a review from crazytonyli February 5, 2024 14:49
Copy link
Contributor

@crazytonyli crazytonyli left a comment

Choose a reason for hiding this comment

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

Thanks for the changes! Probably worth P2 about it, considering there may be linting issues from rubocop while we write new code. 😄

matrix:
setup:
ruby:
- 2.7.4
Copy link
Contributor

Choose a reason for hiding this comment

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

The trunk branch protection rule needs to be changed to accommodate the pipeline change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, I've seen there's this required check that is pending, but was removed.

I don't seem to have access to the branch protection rules in release-toolkit though 🤔 . In fact, I don't see the Settings tab at all. Perhaps you or someone else can change it / change my role in the repo?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

@iangmaia iangmaia merged commit 6c7e2b2 into trunk Feb 7, 2024
@iangmaia iangmaia deleted the update/ruby3 branch February 7, 2024 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants