-
Notifications
You must be signed in to change notification settings - Fork 11
Upgrade Ruby to 4.0 and fix build compatibility issues #82
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
base: main
Are you sure you want to change the base?
Conversation
2e7bd90 to
621bfb6
Compare
4d7b65d to
2f5b55f
Compare
|
Hi @mmenanno. Thank you for doing this! This PR is listed as a draft. Is it ready to be merged? |
|
@jpjpjp I kept it in draft since the next major Ruby version comes out tomorrow on Christmas, so I figured once that is out I'll update this PR to use that so that we will maximize how much time we have till approaching EOL of a version again. |
|
Hi @mmenanno, just wanted to ask if you can rebase if you do decide to push a version with the latest Ruby. |
- Upgrade Ruby from 3.2 to 3.4 (3.2 EOL in ~3 months) - Update Bundler and gems to latest versions - Upgrade Haml to 7.1 (blocking issue now resolved) - Replace deprecated sass gem with sassc - Replace Redcarpet with Kramdown to fix link_to nil error on Ruby 3.x - Enable Uglifier harmony mode for ES6 syntax support - Remove unused lib/unique_head.rb and lib/multilang.rb Closes middleman/middleman#2818 workaround via Kramdown migration
d2e97e7 to
96ec8ab
Compare
4fddd03 to
96ec8ab
Compare
|
@jpjpjp I've rebased it and updated to the latest ruby version in here. That being said I've tried both 4.0.0 and 4.0.1 and netlify is failing to initialize the repo with I'm a little confused by this because the netlify docs say that it should support any version:
I'm not sure why it isn't picking up the latest version. That being said the docs reverence RVM, and the logs seem to reference mise. Do we have any special configs in our build? Even mise should be able to resolve it though, that is how I manage my ruby locally myself. |
Hmm. According to https://docs.netlify.com/build/configure-builds/available-software-at-build-time/, it looks like Netlify only supports Ruby 3.x |
The default is 3.x but the available versions on that page is listed as "Any official Ruby version" which includes 4.x 🤔 |
I can't help thinking that the simplest fix would be to upgrade to 3.4 instead of 4.x. That way we avoid any 3.2 end of life issues. Our longer-term plan is to eventually deprecate the v1 API and move the legacy docs somewhere under the new v2 API docs: https://alpha.lunchmoney.dev/v2/docs. Net/Net we don't need a solution that is multi-year future proof. |
Summary
Upgrades Ruby and dependencies to address upcoming EOL and resolve build issues with modern Ruby versions.
Changes
Ruby & Bundler
Gem Updates
Haml: Upgraded to 7.1 (the monkey patch issue that previously blocked this has been resolved)Build Fixes
Sass Deprecation
sassgem withsasscMarkdown Renderer
Replaced Redcarpet with Kramdown to fix
undefined method 'link_to' for nilerror. This is a known Middleman issue with Ruby 3.x where the Redcarpet renderer context is nil.Config changes:
fenced_code_blocks,tables,strikethrough,no_intra_emphasisinput: 'GFM'(GitHub Flavored Markdown)smartypantssmart_quoteswith_toc_dataauto_ids: trueUniqueHeadCounterrendererdisable_indented_code_blocksprettifyRemoved unused files:
lib/unique_head.rb- Custom Redcarpet renderer for unique header IDs (Kramdown handles this natively)lib/multilang.rb- Redcarpet extension that wasn't being usedJavaScript Minification
const,let, arrow functions)Not Updated
//comments before compilation)