You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using deprecation-toolkit to capture ruby 2.7 warnings in our codebase. We'd disabled them earlier but want to enable again.
I recorded warnings using CIRecordHelper but I've hit a issue where the ruby code and gem paths in warnings are different on CI and developer environment. How do I handle this?
On local,
---
test_the_banking_inline_form_add_an_attachment_to_an_explanation:
- |
DEPRECATION WARNING: /Users/snehasomwanshi/dev/accouting/app/uploaders/attachment_attachment_uploader.rb:136: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/snehasomwanshi/.gem/ruby/2.7.1/gems/shrine-3.2.1/lib/shrine/plugins/store_dimensions.rb:75: warning: The called method `extract_metadata' is defined here
- |
DEPRECATION WARNING: /Users/snehasomwanshi/dev/accouting/app/uploaders/attachment_attachment_uploader.rb:124: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/snehasomwanshi/.gem/ruby/2.7.1/gems/shrine-3.2.1/lib/shrine.rb:222: warning: The called method `generate_location' is defined here
On CI,
---
test_the_banking_inline_form_adding_a_new_explanation:
- |
DEPRECATION WARNING: /home/ubuntu/workspace/fac/accounting/app/uploaders/attachment_attachment_uploader.rb:136: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/home/ubuntu/.gem/ruby/2.7.1/gems/shrine-3.2.1/lib/shrine/plugins/store_dimensions.rb:75: warning: The called method `extract_metadata' is defined here
- |
DEPRECATION WARNING: /home/ubuntu/workspace/fac/accounting/app/uploaders/attachment_attachment_uploader.rb:124: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/home/ubuntu/.gem/ruby/2.7.1/gems/shrine-3.2.1/lib/shrine.rb:222: warning: The called method `generate_location' is defined here
Does this mean that a developer can not record a new warning locally? How do I handle this?
The text was updated successfully, but these errors were encountered:
@snehaso in case this is still useful to you: while spiking out using deprecation toolkit I ran into this issue and worked around it by overriding deprecations_without_stacktrace. So, not a long term solution but as I said: just in case it's useful. Here's most of the initializer we were thinking of using:
DeprecationToolkit::Configuration.warnings_treated_as_deprecation=[/Using the last argument as keyword parameters is deprecated/,/Capturing the given block using Proc.new is deprecated/,]moduleDeprecationToolkitclassCollectoraliasold_deprecations_without_stacktracedeprecations_without_stacktracedefdeprecations_without_stacktraceold_deprecations_without_stacktrace.mapdo |deprecation|
deprecation.sub(/^DEPRECATION WARNING: \/.* warning: /,"DEPRECATION WARNING: ").sub(/\/.* is defined here$/,"")endendendend
Hi
I'm using deprecation-toolkit to capture ruby 2.7 warnings in our codebase. We'd disabled them earlier but want to enable again.
I recorded warnings using CIRecordHelper but I've hit a issue where the ruby code and gem paths in warnings are different on CI and developer environment. How do I handle this?
On local,
On CI,
Does this mean that a developer can not record a new warning locally? How do I handle this?
The text was updated successfully, but these errors were encountered: