-
Notifications
You must be signed in to change notification settings - Fork 362
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
ActiveSupport::Deprecation singleton was deprecated in 7.1, not 7.2 #407
ActiveSupport::Deprecation singleton was deprecated in 7.1, not 7.2 #407
Conversation
@@ -47,7 +50,7 @@ module ActiveResource | |||
autoload :Validations | |||
autoload :Collection | |||
|
|||
if ActiveSupport::VERSION::STRING >= "7.2" | |||
if ActiveSupport::VERSION::STRING >= "7.1" |
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 is the actual bug fix.
.github/workflows/ci.yml
Outdated
- ruby: "3.1" | ||
env: | ||
BRANCH: main | ||
experimental: true |
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.
Rails main doesn't support Ruby 3.1 anymore.
006fdeb
to
2ef69c6
Compare
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.
cc @byroot
test/abstract_unit.rb
Outdated
# Only necessary as long as Ruby 2.6 compatibility is maintained | ||
require "ruby2_keywords" |
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 wrapped in a condition for Ruby < 2.7? It seems to be a no-op in Ruby 3, but I don't know if there is a performance impact to be concerned about:
irb(main):001> require "ruby2_keywords"
=> false
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.
I'm also concerned about making keywords available in tests but not in the whole gem. Is that an okay approach? Should 2.6 support be dropped, or should the require be gem-wide?
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.
Why do you need this? I don't see any call to ruby2_keywords
, and even if there was, it's simpler to do ruby2_keywords :foo if respond_to?(:ruby2_keywords, true)
than to pull that dependency.
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.
Its coming from Drb: https://github.com/rails/activeresource/actions/runs/11599022232/job/32296232186
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.
I see, only a problem on 6-0-stable that has been EOL forever, we should drop Rails < 7.
2ef69c6
to
b1a0258
Compare
b1a0258
to
299d302
Compare
ActiveResource 6.1.2 included a custom deprecator which uses an instance of
ActiveSupport::Deprecation
rather than the singleton in Rails >= 7.2. That is because of this deprecation in ActiveSupport.The deprecation was actually shipped in Rails 7.1.0.beta1, so the condition should be on Rails >= 7.1.
The incorrect condition is causing CI for updates including ActiveResource >= 6.1.2 to fail with:
There are also two commits which fix CI.