ISSUE
Back in the day, community members created a gem to ease managing deprecation warnings (see https://rubygems.org/gems/deprecation). Since that time Rails has incorporated direct support for managing deprecation warnings. Unfortunately the call signature has changed and we have a mix of old and new style calls throughout the codebase. When the wrong signature is called, we only get a very generic warning:
Warning using wrong call signature
DEPRECATION WARNING: You are using deprecated behavior which will be removed from the next major or minor release.
(called from <class:Work> at /app/samvera/hyrax-engine/app/models/hyrax/work.rb:98)
Warning using the correct call signature
DEPRECATION WARNING: globally including `Hyrax::Schema(:core_metadata)` at the work level is deprecated.
Add `include Hyrax::Schema(:core_metadata)` to your individual work classes or set
up flexible metadata, then set `work_default_metadata = false` in config/hyrax.rb to remove this warning.
(called from <class:Work> at /app/samvera/hyrax-engine/app/models/hyrax/work.rb:98)
Now that Rails provides the required functionality directly, we need to retire the dependency on the deprecation gem.
DETAILS
SCOPE OF WORK
Listing the dependencies from Hyrax (and presumably Hyku), a number of gems include the old dependency:
# bundle info deprecation
* deprecation (1.1.0)
Summary: Stand-alone deprecation library borrowed from ActiveSupport::Deprecation
Homepage: http://github.com/cbeer/deprecation
Path: /app/bundle/ruby/3.3.0/gems/deprecation-1.1.0
Reverse Dependencies:
active-fedora (15.0.1) depends on deprecation (>= 0)
blacklight (7.41.0) depends on deprecation (>= 0)
blacklight-access_controls (6.1.0) depends on deprecation (~> 1.0)
hydra-access-controls (13.2.0) depends on deprecation (~> 1.0)
hydra-derivatives (4.0.0) depends on deprecation (>= 0)
ldp (1.2.1) depends on deprecation (>= 0)
qa (5.15.0) depends on deprecation (>= 0)
riiif (2.8.0) depends on deprecation (>= 1.0.0)
ACCEPTANCE
ISSUE
Back in the day, community members created a gem to ease managing deprecation warnings (see https://rubygems.org/gems/deprecation). Since that time Rails has incorporated direct support for managing deprecation warnings. Unfortunately the call signature has changed and we have a mix of old and new style calls throughout the codebase. When the wrong signature is called, we only get a very generic warning:
Warning using wrong call signature
Warning using the correct call signature
Now that Rails provides the required functionality directly, we need to retire the dependency on the
deprecationgem.DETAILS
Old signature takes 3 positional arguments:
https://github.com/cbeer/deprecation/blob/v1.1.0/lib/deprecation/reporting.rb#L12
New signature only takes 2 arguments(so positions change):
https://github.com/rails/rails/blob/v6.0.0/activesupport/lib/active_support/deprecation/reporting.rb#L18
SCOPE OF WORK
Listing the dependencies from Hyrax (and presumably Hyku), a number of gems include the old dependency:
ACCEPTANCE
riiifqaldphydra-derivativeshydra-access-controlsblacklight-access-controlsactive-fedorablacklightNOTE: this is addressed in Blacklight 8.x - see Replace deprecation gem with ActiveSupport's deprecation behavior projectblacklight/blacklight#2793