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] Upgrade config to latest 5.x version for rails 7.1 compatibility #23275

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jrafanie
Copy link
Member

I noticed deep_merge was behaving differently in tests and failing on 7.1.

Digging in, rails 7.0 was using the gem, 7.1 was using the activesupport module:

rails 7.1:

(byebug) {}.method(:deep_merge)
  #<Method: Hash(DeepMerge::DeepMergeHash)#deep_merge(source, options=...) /Users/joerafaniello/.gem/ruby/3.3.6/gems/deep_merge-1.2.2/lib/deep_merge/deep_merge_hash.rb:18>

rails 7.0:

(byebug) {}.method(:deep_merge)
  #<Method: Hash#deep_merge(other_hash, &block) /Users/joerafaniello/.gem/ruby/3.3.6/gems/activesupport-7.0.8.6/lib/active_support/core_ext/hash/deep_merge.rb:18>

Rails 7.1 changed the way their deep_merge is defined via a refactored module: https://www.github.com/rails/rails/commit/43b980368a7628fac95cc4f673e0dfbcee77c10b

This was raised in:
https://www.github.com/rails/rails/issues/49457

Config gem fixed this in 5.0 and subsequently fixed another compatibility issue in 5.1 https://www.github.com/rubyconfig/config/commit/759c0fe271b4b90d534217a5b6e0653d0c94ee85

I noticed deep_merge was behaving differently in tests and failing on 7.1.

Digging in, rails 7.0 was using the gem, 7.1 was using the activesupport module:

rails 7.1:

```
(byebug) {}.method(:deep_merge)
  #<Method: Hash(DeepMerge::DeepMergeHash)#deep_merge(source, options=...) /Users/joerafaniello/.gem/ruby/3.3.6/gems/deep_merge-1.2.2/lib/deep_merge/deep_merge_hash.rb:18>
```

rails 7.0:

```
(byebug) {}.method(:deep_merge)
  #<Method: Hash#deep_merge(other_hash, &block) /Users/joerafaniello/.gem/ruby/3.3.6/gems/activesupport-7.0.8.6/lib/active_support/core_ext/hash/deep_merge.rb:18>
```

Rails 7.1 changed the way their deep_merge is defined via a refactored module:
https://www.github.com/rails/rails/commit/43b980368a7628fac95cc4f673e0dfbcee77c10b

This was raised in:
https://www.github.com/rails/rails/issues/49457

Config gem fixed this in 5.0 and subsequently fixed another compatibility issue in 5.1
https://www.github.com/rubyconfig/config/commit/759c0fe271b4b90d534217a5b6e0653d0c94ee85
@jrafanie
Copy link
Member Author

@miq-bot cross-repo-tests /all

miq-bot pushed a commit to ManageIQ/manageiq-cross_repo-tests that referenced this pull request Nov 20, 2024
@jrafanie jrafanie mentioned this pull request Nov 21, 2024
40 tasks
@jrafanie jrafanie changed the title [WIP] Upgrade to latest 5.x version for rails 7.1 compatibility [WIP] Upgrade config to latest 5.x version for rails 7.1 compatibility Nov 21, 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.

1 participant