-
Notifications
You must be signed in to change notification settings - Fork 883
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
Add compatibility with Rails 6.1 #1273
Conversation
This comment has been minimized.
This comment has been minimized.
I'll have a look a this, thanks! |
Getting error:
|
@aried3r any idea what might cause this error? |
I believe See also rails/rails#36544. I currently don't have time to look into this further myself. |
I should have checked better, paper_trail has a helper of that kind itself already. paper_trail/spec/support/paper_trail_spec_migrator.rb Lines 13 to 25 in f66c702
From what I see it is still there https://github.com/rails/rails/blob/ddec53519e2c61665761e26d8c91a18724570b96/activerecord/lib/active_record/migration.rb#L1050. This is just a wild guess, but maybe it has to do with zeitwerk and the dummy app in the specs not yet compatible with it But again, just a guess. |
AFAIK zeitwerk is used since Rails 6. Did Zeitwerk change in 6.1? |
Good news! rails/rails#40806 I don't think this directly fixes our problem here, but at least this method will be officially supported, should it be merged and released.
Again, this is just a wild guess and maybe not worth going on a wild goose chase. But I tried to read up on it a bit more, it says zeitwerk is the default for Rails 6 applications. Our From the docs: # config/application.rb
config.load_defaults 6.0
https://guides.rubyonrails.org/upgrading_ruby_on_rails.html#autoloading I don't see what happens if you omit this line. My assumption was, that with 6.1 the new defaults of 6.0 become the default, enabling zeitwerk. These are the settings for each version: https://guides.rubyonrails.org/configuring.html#results-of-config-load-defaults. But, again, I'm not even sure it's that. Maybe shouldn't have mentioned it. Does anyone here maybe have time to look into this locally some more? I'm currently busy at work with the last tickets before the winter holidays, so I cannot promise looking into it. But happy to review and discuss potential solutions. |
Ok, I was curious and tried it locally. Adding However, then other tests start to fail, some of them being because we use Arel, which I believe is still private API. One example is:
Indeed, If you'd like to continue, these would need to be fixed for us to release a version compatible with Rails 6.1. |
Suggested in #1273 (comment)
oh yeah 🏆 |
Fixes #1272
master
(if not - rebase it).code introduces user-observable changes.
and description in grammatically correct, complete sentences.