-
Notifications
You must be signed in to change notification settings - Fork 899
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
Hotfix for support of Rails 7.2.0 #1485
Conversation
a6c0107
to
2a5da16
Compare
29b952b
to
12fa951
Compare
12fa951
to
bb656a4
Compare
Duplicate of #1477. But either version should be merged, since we already have rails 7.2. |
This is the last blocker for our app to be upgraded to 7.2, can wait to have this merged 🙏🏻 ! 😃 |
Same for us, the only blocker thats left. |
any update on this please? |
lib/paper_trail/compatibility.rb
Outdated
@@ -18,7 +18,7 @@ module PaperTrail | |||
# versions. | |||
module Compatibility | |||
ACTIVERECORD_GTE = ">= 6.1" # enforced in gemspec | |||
ACTIVERECORD_LT = "< 7.2" # not enforced in gemspec | |||
ACTIVERECORD_LT = "< 8" # not enforced in gemspec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should most likely be 7.3, as we're cautious with Rails introducing breaking changes in minor versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There won't be 7.3, only 8 as a next.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyway, changed it 🙂
So many people wait for the update 🙂
Any update on this? |
Stoked to see this merge. Let us know if we can help! |
please merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
@jaredbeck hey! Sorry for the mention. Could you please help us and merge it or add comments 🙂 |
Can we get this in? |
Why is it taking so long to merge this? |
@jaredbeck could you help? |
Looking forward to seeing this PR being merged. |
Are there any blockers to merge this? |
Any update here? |
We've been waiting for this PR for a long time. 😭 |
Could we release a beta to test it out in larger scale than using this branch directly? |
.github/workflows/test.yml
Outdated
|
||
# To keep matrix size down, only test highest and lowest rubies. | ||
# See "Lowest supported ruby version" in CONTRIBUTING.md | ||
ruby: [ '3.0', '3.2' ] | ||
ruby: [ '3.2', '3.3' ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be updated?
ruby : [ '3.1', '3.3']
see https://endoflife.date/ruby
per https://github.com/paper-trail-gem/paper_trail/blob/master/.github/CONTRIBUTING.md#lowest-supported-ruby-version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch! Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kalashnikovisme looks like the following need updating as well according to CONTRIBUTING:
paper_trail/paper_trail.gemspec
Line 50 in be31c66
s.required_ruby_version = ">= 3.0.0" Line 26 in be31c66
TargetRubyVersion: 3.0 paper_trail/.github/workflows/test.yml
Line 20 in be31c66
ruby-version: '3.0'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joshRpowell is right. This 3 files should be updated, @kalashnikovisme . And why have you removed 3.2?
@@ -18,7 +18,7 @@ module PaperTrail | |||
# versions. | |||
module Compatibility | |||
ACTIVERECORD_GTE = ">= 6.1" # enforced in gemspec | |||
ACTIVERECORD_LT = "< 7.2" # not enforced in gemspec | |||
ACTIVERECORD_LT = "< 7.3" # not enforced in gemspec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was set to < 8
originally but there was a request to set to < 7.3
here.
README.md
Outdated
@@ -92,7 +92,7 @@ Choose version: | |||
|
|||
| paper_trail | ruby | activerecord | | |||
|-------------|----------|---------------| | |||
| unreleased | >= 3.0.0 | >= 6.1, < 7.2 | | |||
| unreleased | >= 3.0.0 | >= 6.1, <= 7.2 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kalashnikovisme and >= 3.1.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it 🙂 Thanks!
Now that #1477 has been closed, I'd really prefer their definition for the deprecation object in the PR rather than relying on some internal method that isn't part of the official API AFAIK. could we recover that piece of code to this PR? |
As per the comment from @bvogel here: paper-trail-gem#1485 (comment)
@kalashnikovisme I've created a PR on your fork to adjust the deprecator definition as per @bvogel request above. If you're good with it can we merge and then hopefully the Paper Trail Gem folks can then get this PR merged? 🙏👍 |
Adjust deprecator definition to be more inline with the official API
Merged it! thanks @tbrammar 🙂 |
@@ -14,7 +14,7 @@ module PaperTrail | |||
|
|||
context "when incompatible" do | |||
it "writes a warning to stderr" do | |||
ar_version = ::Gem::Version.new("7.2.0") | |||
ar_version = ::Gem::Version.new("8.0.0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be 7.3 in line with the other changes?
ar_version = ::Gem::Version.new("8.0.0") | |
ar_version = ::Gem::Version.new("7.3.0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a pretty interesting question.
I think no because there is >
method in other places to compare versions. But in this place we have exact version to test with.
At the first version of this pull request, I used 7.3
because of these commits in the rails repository here and here. But I changed it to 8.0 because of this comment.
So, I think that we should use 7.3 in cases with >
.
I tested it with Rails 7.2.1. Everything works fine. |
Hello everyone, I try this PR and I have some issue in tests related to Papertrail. we have the following helper:
And when we use in test with the following pattern:
we have the following error:
For us Papertrail is not well working with RoR 7.2 and it's blocking our upgrade. Regards |
@Migoo The issue is probably caused by how the |
@spickermann Thanks for the quick answer ! I didn't see you reply above. I juste update the code and it's working 🙌 |
this one takes too long, i bet Rails 8 comes ahead of this merge 😑 |
Pretty please @seanlinsley @gurgelrenan @aried3r @jaredbeck - can we get this PR merged and released? 🙏🫠 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks everyone who contributed.
Released as 15.2.0 |
This is just a hotfix. I didn't make big changes. So, the core team of the gem should make these updates:
ActiveSupport::Deprecation._instance.warn
. Rails contributors suggest creating own deprecation class. More hereschema_migration
in tests. Looks like, I made the needed change, but maybe I didn't understand the purpose of the test.Check the following boxes:
master
(if not - rebase it).code introduces user-observable changes.
and description in grammatically correct, complete sentences.