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

[WIP] Support Rails 7.0 #133

Closed
wants to merge 8 commits into from
Closed

Conversation

jrafanie
Copy link
Member

@jrafanie jrafanie commented Jan 12, 2024

Allow rails 7 gems in gemspec

see rails/rails#40776 for changes around the preloader

@jrafanie
Copy link
Member Author

@kbrock early call for help whenever you have time to look at the rails 7 failures or guide me on where to start... 🙇

@jrafanie jrafanie changed the title Allow rails 7 gems in gemspec [WIP] Allow rails 7 gems in gemspec Jan 17, 2024
@jrafanie jrafanie added wip Work in progress rails7 labels Jan 17, 2024
@Fryguy
Copy link
Member

Fryguy commented Jan 19, 2024

I had started down this path in #125, but since this gem follows version matching with Rails, we decided to close that one. Should this be on a new separate branch?

Comment on lines -28 to +29
spec.add_runtime_dependency "activerecord", "~> 6.1.0"
spec.add_runtime_dependency "activerecord", ">=6.1.7.6"
Copy link
Member

Choose a reason for hiding this comment

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

I think this was the main sticking point in #125 and is why I closed it - in production this unlocks all versions of Rails, but this gem is intentionally not semver and matches the version of Rails that it supports directly. That is, this gem at this version can't (and shouldn't) work with versions >= 6.1.

In my PR I tried to make this part dynamic and only for test, but it turns out you really can't have "dynamic" code in a gemspec because it won't be packaged properly.

@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|

spec.require_paths = ["lib"]

spec.add_runtime_dependency "activerecord", "~> 6.1.0"
spec.add_runtime_dependency "activerecord", ">=6.1.7.6"
Copy link
Member

Choose a reason for hiding this comment

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

agreed, this needs to be:

Suggested change
spec.add_runtime_dependency "activerecord", ">=6.1.7.6"
spec.add_runtime_dependency "activerecord", "~>7.0.8"

Copy link
Member

Choose a reason for hiding this comment

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

and then also drop the 6.1 test suites.

Copy link
Member Author

Choose a reason for hiding this comment

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

will do this once 6.1/7.0 get feature parity.

@jrafanie jrafanie force-pushed the allow_rails_7 branch 2 times, most recently from 6742cb8 to 1c5ab04 Compare June 21, 2024 17:44
@kbrock kbrock changed the title [WIP] Allow rails 7 gems in gemspec Fix Rails 7.0 Jul 30, 2024
@kbrock kbrock changed the title Fix Rails 7.0 Support Rails 7.0 Jul 30, 2024
@kbrock kbrock changed the title Support Rails 7.0 [WIP] Support Rails 7.0 Jul 30, 2024
@kbrock
Copy link
Member

kbrock commented Jul 30, 2024

Ugh. Joe. I just blew away this branch for you.
Please repush yours

@kbrock
Copy link
Member

kbrock commented Jul 30, 2024

update:

  • fixed some cops

(still unsure if I should open another branch or just keep pushing here)

@kbrock kbrock changed the title [WIP] Support Rails 7.0 Support Rails 7.0 Jul 30, 2024
@kbrock kbrock removed wip Work in progress unmergeable labels Jul 30, 2024
@kbrock
Copy link
Member

kbrock commented Jul 30, 2024

update:

  • rubocop spacing fix

@miq-bot
Copy link
Member

miq-bot commented Jul 30, 2024

Checked commits jrafanie/activerecord-virtual_attributes@61aa955~...c8f525c with ruby 3.1.5, rubocop 1.56.3, haml-lint 0.51.0, and yamllint
8 files checked, 1 offense detected

lib/active_record/virtual_attributes/virtual_fields.rb

@miq-bot
Copy link
Member

miq-bot commented Jul 30, 2024

This pull request is not mergeable. Please rebase and repush.

@kbrock kbrock changed the title Support Rails 7.0 [WIP] Support Rails 7.0 Jul 30, 2024
@miq-bot miq-bot added the wip Work in progress label Jul 30, 2024
@jrafanie
Copy link
Member Author

This is being replaced by #150

@jrafanie jrafanie closed this Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants