warning: parser/current is loading parser/ruby30, which recognizes
warning: 3.0.1-compliant syntax, but you are running 3.0.0.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
Make sure to keep your version of the gem parser (a dependency of Rubocop among others) in lockstep with your version of Ruby:
Took longer than 20 minutes but I removed some warnings from my tests about datetimes without timezones when timezone support is active. I definitely have cleaner looking tests and I understood a minor error from a past bug I was fixing
Wow. Warning shame. No seriously this was really helpful in actually looking into the off-and-on warning that’s been coming up in Slack, and oh was it a problem! Not fixable in 30 minutes, but has justified a chunk of work in the next sprint.
Could not complete this up but picked an error log, this was coming for more than 4K times in every hour. Started working on it, understanding why this is happening, hopefully will be able to dig deep and resolve this in coming few days.
Deprecation warnings in Ruby code are not common in my project, as we treat them as exception and even track them in the exception notifier. But, well, javascript… I finally fixed some warnings that happen during development.
Deprecation notice: Discourse.base_uri is deprecated, use Discourse.base_path instead
Turns outs it was coming from a fork of a plugin that we have in a private repo that hadn’t been updated in awhile, but has been flooding our logs for quite some time now. I created a PR to that repo with the necessary change.
We used to redefine the scope in a decorator by naively calling #scope again on the class.
Using the prepend ClassMethods pattern instead fixes the issue, and brings the benefit of letting us reuse the original implementation using #super (we simply need to override an ORDER BY after all…):
class MyModel
scope :some_scope, -> { order("my_model_table.column_1 ASC") }
end
module MyModelDecorator
extend ActiveSupport::Concern
def self.prepended(base)
base.singleton_class.prepend ClassMethods
end
module ClassMethods
def some_scope
super.reorder("my_model_table.column_1 ASC, my_model_table.column_2 DESC")
end
end
::MyModel.prepend self
end
I think because our app is such a simple PHP / CodeIgniter app, there wasn’t too many warnings period. BUT I did notice when deploying a new set up, it was missing an optional config file I just keep manually making… and it would cause an error. So now i have it checked into the codebase as a template and updated the readme file!
FutureWarning: 'argmin' is deprecated, use 'idxmin' instead. The behavior of 'argmin'
will be corrected to return the positional minimum in the future.
Use 'series.values.argmin' to get the position of the minimum now.
Ran npm audit and fixed two security warnings in my package-lock.json. Then on a whim I started looking through other dependencies and found 3 unused ones that I was able to delete. This was on a relatively new codebase with only a dozen or so dependencies; code get stale fast!
I decided to take this opportunity to tackle a warning that has been spamming my alerting channel for a while, however it was harder than I thought and it’s going to take a lot longer than 20 minutes for me to resolve it. However, now I know that it’s a big task that needs the proper time allocated to fixing it
I know, I fell off - it has been quite some time, but we had the chance to do some needed upgrades for our app so I took a slight detour. I’m back, with a PR for day 3 that involved swapping the fog gem to fog-aws so we could get rid of post-install warnings and reduce unneeded dependencies.