Skip to content

rails 8 support #77

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

Merged
merged 2 commits into from
Jul 21, 2025
Merged

rails 8 support #77

merged 2 commits into from
Jul 21, 2025

Conversation

sebyx07
Copy link
Contributor

@sebyx07 sebyx07 commented Dec 30, 2024

Rails 8 Support

This PR adds support for Rails 8 while maintaining backward compatibility with Rails 7.1+.

🚀 Motivation

With Rails 8.0 now released, this gem needs to support the latest Rails version to enable users to upgrade their applications. Several users have requested this update to unblock their Rails 8 migrations.

📋 Changes Made

Version & Dependencies:

  • Bump gem version from 3.1.08.0.0 (aligned with Rails major version for easier tracking)
  • Update ActiveRecord dependency: '>= 7.1', '< 9' (supports Rails 7.1, 7.2, and 8.0+)
  • Drop support for Rails 6.x (breaking change)

CI & Testing:

  • Update GitHub Actions to test against Rails 8.0 and Rails 7.1
  • Upgrade Ruby version in CI to 3.4.1
  • Remove Rails 6.1 test matrix (no longer supported)
  • Add Gemfile.7.1 for backward compatibility testing

🧪 Testing

  • ✅ All existing tests pass on Rails 8.0
  • ✅ All existing tests pass on Rails 7.1 (backward compatibility verified)
  • Production tested - Running successfully in production for ~1 month (confirmed by @zaratan)

⚠️ Breaking Changes

  • Minimum Rails version: Now requires Rails 7.1+ (was 5.2+)
  • Version jump: 3.1.0 → 8.0.0 (semantic versioning for major breaking change)

Migration path for older Rails versions:

  • Rails < 7.1: Use jit_preloader v3.1.0
  • Rails 7.1+: Use jit_preloader v8.0.0+

@sebyx07 sebyx07 requested review from a team as code owners December 30, 2024 08:18
@zaratan
Copy link

zaratan commented Mar 4, 2025

Hey @sebyx07 did you try this on a Rails 8 stack in a production context ?

@sebyx07
Copy link
Contributor Author

sebyx07 commented Mar 18, 2025

yeah

@zaratan
Copy link

zaratan commented Mar 24, 2025

Thanks. I'll use it and report if I see any issue on my side.

samsarkleio
samsarkleio previously approved these changes Apr 23, 2025
@zaratan
Copy link

zaratan commented May 6, 2025

In case anyone needs a feedback : Seems to run perfectly in production since about a month.

@ryansdwilson
Copy link

Hey @samsarkleio we love this gem over at getwalter.com (half of us are former Clions! Ainsley Robertson, Jordan Raine, Joe Krump and Ying Ying Choi) would love to see you guys merge this to unblock the rails 8 upgrade! Thanks for sharing Jit preloader with the world

@samsarkleio
Copy link
Contributor

@clio/application-security Could we get the second review here and merge this in?

@samsarkleio samsarkleio requested review from a team, Drew-Goddyn, liamloxton and peerkleio May 15, 2025 19:11
@peerkleio
Copy link

As this new version also changes the minimum supported version of Rails the Readme should be updated to let users know what version of this gem they need depending on what version of Rails they have. Or, a note that mentions the minimum supported version of Rails

@sebyx07
Copy link
Contributor Author

sebyx07 commented May 21, 2025

cleaned up

samsarkleio
samsarkleio previously approved these changes May 21, 2025
@liamloxton
Copy link

Interesting, I've never seen version specific Gemfile.lock files before. I think I would need to be walked through this a little to better understand what is happening here in order to give a proper review.

spec.homepage = "https://github.com/clio/jit_preloader"
spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = spec.homepage
spec.email = ['[email protected]']
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick... not sure these needed to change 🙈

Choose a reason for hiding this comment

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

I mean, ya, now it alternates between single and double quotes. :P

@@ -1,3 +1,3 @@
module JitPreloader
VERSION = "3.1.0"
VERSION = "8.0.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason we're jumping versions from 3 -> 8 for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

to keep it in sync with rails, because this gem patches ar. it's simpler to then update it

Drew-Goddyn
Drew-Goddyn previously approved these changes May 30, 2025
Copy link
Contributor

@Drew-Goddyn Drew-Goddyn left a comment

Choose a reason for hiding this comment

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

Few small comments, looks fine otherwise. Can we include a PR description, even if its just re-iterating that we're upgrading to rails 8 and requiring the minimum version.

@jnraine 👋

@peerkleio peerkleio dismissed stale reviews from Drew-Goddyn and samsarkleio via 754600b May 30, 2025 20:02
@sebyx07
Copy link
Contributor Author

sebyx07 commented Jun 18, 2025

@ryansdwilson just self host the gem meanwhile, depending on others suck. this is what i do https://github.com/geminabox/geminabox

@anhari
Copy link

anhari commented Jul 18, 2025

@sebyx07, looks like we are good to merge this one.

@@ -1,2 +1,3 @@
require "bundler/gem_tasks"
# frozen_string_literal: true

Choose a reason for hiding this comment

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

This is enabled by default in Ruby 3.4

Copy link

@liamloxton liamloxton left a comment

Choose a reason for hiding this comment

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

Besides the ' vs " mixing and the redundant # frozen_string_literal: true, looks good.

@parsahonarmand99 parsahonarmand99 merged commit f7541cb into clio:master Jul 21, 2025
@ryansdwilson
Copy link

Thank you Clio squad! Appreciate your work on this.

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.

9 participants