Skip to content

Comments

Support Rails 7.1#675

Merged
benlangfeld merged 20 commits intomasterfrom
20240829-rails-7.1
Sep 19, 2024
Merged

Support Rails 7.1#675
benlangfeld merged 20 commits intomasterfrom
20240829-rails-7.1

Conversation

@benlangfeld
Copy link
Collaborator

No description provided.

@benlangfeld benlangfeld added this to the 8.1.0 milestone Sep 5, 2024
@benlangfeld
Copy link
Collaborator Author

I think the test failures are mostly coming from Modis and will address its compatibility with Rails 7.1 first in rpush/modis#52.

benlangfeld added a commit to rpush/modis that referenced this pull request Sep 6, 2024
@benlangfeld
Copy link
Collaborator Author

This is actually breakage in Rails itself: rails/rails#52820

@benlangfeld benlangfeld changed the title Support Rails 7.1 Support Rails 7.1 & 7.2 Sep 6, 2024
This was referenced Sep 6, 2024
@benlangfeld benlangfeld changed the title Support Rails 7.1 & 7.2 Support Rails 7.1 Sep 9, 2024
@benlangfeld benlangfeld marked this pull request as ready for review September 9, 2024 13:58
@jaahoo
Copy link

jaahoo commented Sep 10, 2024

In rpush.gemspec, the line is currently: s.add_runtime_dependency 'activesupport', '>= 6.0', '< 7.1.0'.
Shouldn't it be: s.add_runtime_dependency 'activesupport', '>= 6.0', '< 7.1'?
I have Rails 7.1.3.4, and I can't add it.

Could not find compatible versions

Because rails < 7.1.4 depends on activesupport = 7.1.3.4
  and rails >= 7.1.4, < 7.2.0 depends on activesupport = 7.1.4,
  rails < 7.2.0 requires activesupport = 7.1.3.4 OR = 7.1.4.
And because rails >= 7.2.0, < 7.2.1 depends on activesupport = 7.2.0
  and rails >= 7.2.1 depends on activesupport = 7.2.1,
  activesupport = 7.1.3.4 OR = 7.1.4 OR = 7.2.0 OR = 7.2.1 is required.
So, because rpush >= 9.0.0 depends on activesupport >= 6.0, < 7.1.0
  and Gemfile depends on rpush ~> 9.0,
  version solving has failed.

@benlangfeld
Copy link
Collaborator Author

In rpush.gemspec, the line is currently: s.add_runtime_dependency 'activesupport', '>= 6.0', '< 7.1.0'. Shouldn't it be: s.add_runtime_dependency 'activesupport', '>= 6.0', '< 7.1'? I have Rails 7.1.3.4, and I can't add it.

Could not find compatible versions

Because rails < 7.1.4 depends on activesupport = 7.1.3.4
  and rails >= 7.1.4, < 7.2.0 depends on activesupport = 7.1.4,
  rails < 7.2.0 requires activesupport = 7.1.3.4 OR = 7.1.4.
And because rails >= 7.2.0, < 7.2.1 depends on activesupport = 7.2.0
  and rails >= 7.2.1 depends on activesupport = 7.2.1,
  activesupport = 7.1.3.4 OR = 7.1.4 OR = 7.2.0 OR = 7.2.1 is required.
So, because rpush >= 9.0.0 depends on activesupport >= 6.0, < 7.1.0
  and Gemfile depends on rpush ~> 9.0,
  version solving has failed.

You're time traveling.

https://github.com/rpush/rpush/pull/675/files#diff-42f0537e2dac213adc4bf69f60cd7645eda3c5ef15d7021474470069cb370305R39

@benlangfeld
Copy link
Collaborator Author

This is pending #668

@WoutDev
Copy link
Contributor

WoutDev commented Sep 19, 2024

@benlangfeld

If you want the tests to fail, adding this before spec/spec_helper#20 does the trick:

if client == :active_record
  require 'active_record'
  if ActiveRecord::Base.respond_to?(:default_column_serializer)
    # New default in Rails 7.1: https://github.com/rails/rails/pull/47422
    ActiveRecord::Base.default_column_serializer = nil
  end
end

(not the cleanest code)

The error seems to be thrown when eager loading rpush:

[...]
Failure/Error: serialize :registration_ids

ArgumentError:
  missing keyword: :coder If no default coder is configured, a coder must be provided to `serialize`.
[...]

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.

3 participants