ankane/ahoy

Warnings issued from device_detector dependency

ryenski opened this issue · 4 comments

The device_detector gem, which is required in the gemspec, is raising multiple errors:

~/.gem/ruby/3.0.2/gems/device_detector-1.0.6/lib/device_detector/parser.rb:88: warning: nested repeat operator '+' and '?' was replaced with '*' in regular expression
~/.gem/ruby/3.0.2/gems/device_detector-1.0.6/lib/device_detector/parser.rb:88: warning: nested repeat operator '+' and '?' was replaced with '*' in regular expression
~/.gem/ruby/3.0.2/gems/device_detector-1.0.6/lib/device_detector/parser.rb:88: warning: nested repeat operator '+' and '?' was replaced with '*' in regular expression
~/.gem/ruby/3.0.2/gems/device_detector-1.0.6/lib/device_detector/parser.rb:88: warning: nested repeat operator '+' and '?' was replaced with '*' in regular expression
~/.gem/ruby/3.0.2/gems/device_detector-1.0.6/lib/device_detector/parser.rb:88: warning: nested repeat operator '+' and '?' was replaced with '*' in regular expression

This is a known issue with device_detector and is addressed here:
podigee/device_detector#20
podigee/device_detector#89

Explicitly tracking the previous version of device_detector silences the warnings, but it's not clear if there is any disadvantage to downgrading:

gem 'device_detector', '1.0.5' # 1.0.6 raises noisy warnings.
gem 'ahoy_matey'

Hey @SatoshiGardener, thanks for sharing. I'm not sure there's anything we should do with Ahoy (hopefully it's addressed upstream), but good to know users can downgrade to silence the warnings.

Yeah, probably not worth binding the version; hopefully they will fix the issue in device_detector. Thought this might help anyone else who runs into this.

Seems like they updated the gem yesterday with a fix included: https://github.com/podigee/device_detector/blob/develop/CHANGELOG.md

Great, thanks @BasJoosten!