-
Notifications
You must be signed in to change notification settings - Fork 1
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
Bump Ruby to v3.1.4 #808
Bump Ruby to v3.1.4 #808
Conversation
Here we can see changes to `ffi` within Gemfile.lock. These same changes were initially made by the `Bump listen from 3.8.0 to 3.9.0` Dependabot PR (commit e296003). However, running `bundle install` with the prior Ruby version (3.0.5) made it simply switch to `ffi (1.17.0)`.
Copy/pasted `https://github.com/DMPRoadmap/roadmap/blob/fc047ac0ae1b10f9fd451909e11a2d31e50b3ada/.github/workflows/postgres.yml` (DMPRoadmap Release v4.2.0).
This commit updates the copy/paste commit (aa0508a) to make this file compatible with DMP Assistant.
The changes implemented via this commit address the following GitHub workflow error: ``` Run gem install bundler -v 2.4 Successfully installed bundler-2.4.0 1 gem installed [DEPRECATED] The `--without` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set --local without 'pgsql rollbar aws'`, and stop using this flag Your Ruby version is 3.1.6, but your Gemfile specified 3.1.4 Error: Process completed with exit code 18. ```
Prior to this commit, the Rubocop-related GitHub action was failing with the following (https://github.com/portagenetwork/roadmap/actions/runs/9618541179/job/26532655790): ``` 577 files inspected, 805 offenses detected, 805 offenses autocorrectable Error: Process completed with exit code 1. ``` These offences are due to the bump from Ruby 3.0 to Ruby 3.1. This commit disables the Cops corresponding to these offences. (Note: They are all "Style"-type offences)
These changes were mostly implemented by copy/pasting `.github/workflows/postgres.yml` over to `.github/workflows/ruby.yml`. Prior to this commit the following error was encountered during the "Bundle Install" step: ``` Run gem install bundler -v 2.4 Successfully installed bundler-2.4.0 1 gem installed [DEPRECATED] The `--without` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set --local without 'mysql rollbar aws'`, and stop using this flag Your Ruby version is 3.1.6, but your Gemfile specified 3.1.4 ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The following explains how some of the changes to https://github.com/ruby/setup-ruby?tab=readme-ov-file#caching-bundle-install-automatically Caching bundle install automatically - uses: ruby/setup-ruby@v1
with:
bundler-cache: true Note that any step doing bundle install (for the root Gemfile) or gem install bundler can be removed with bundler-cache: true. |
Changes proposed in this PR:
Bump Ruby from v3.0 to v3.1:
4.1.1+portage-4.1.0
release bumped Ruby from version 2.7.6 to v3.0.Set
.github/workflows
to execute using Ruby v3.1.ruby-version: '3.1.4'
within them. Errors would occur due to conflicting ruby versions (possibly because our codebase doesn't include a.ruby-version
file). Further changes were made to these workflows/ files to address these errors.Disable some "Style-Cops" within
.rubocop.yml
(see below). Although, this PR does not change the version ofrubocop
that we're using, the Ruby bump does result in new offences. This PR suppresses those offences to avoid DMP Assistant and DMP Roadmap's codebases from being too misaligned with one another: