troessner / reek

Code smell detector for Ruby
https://github.com/troessner/reek
MIT License
4k stars 279 forks source link

Remove Kwalify #1757

Closed bkuhlmann closed 5 months ago

bkuhlmann commented 6 months ago

Why

Hello and Happy Holidays. :wave:

I'd like to suggest removing the Kwalify gem dependency from Reek. This dependency hasn't been maintained in years and when visiting the gem, there doesn't appear to be a valid link to the source code anymore. In addition, in Ruby 3.3.0, Kwalify is throwing performance warnings due to Object Shape violations. This means, every time I use Reek, I see these warnings show up.

How

To reproduce, run the following:

RUBYOPT="-W:performance" reek

Notice you get the following warning:

/Users/demo/.cache/frum/versions/3.3.0/lib/ruby/gems/3.3.0/gems/kwalify-0.7.2/lib/kwalify/rule.rb:391: warning: The class Kwalify::Rule reached 8 shape variations, instance variables accesses will be slower and memory usage increased.
It is recommended to define instance variables in a consistent order, for instance by eagerly defining them all in the #initialize method.

Notes

mvz commented 5 months ago

In fact, kwalify was already replaced with dry-schema in #1749.

I guess it's about time to release a new version.

bkuhlmann commented 5 months ago

Ah, good. Didn't realize work for that is complete. Yeah, a new version would be great! :bow:

I'll close this issue based on the above info.

mvz commented 5 months ago

@bkuhlmann Reek 6.2.0 has now been released including the change from kwalify to dry-schema.

bkuhlmann commented 5 months ago

Thanks! I've updated all of my projects accordingly. Nice to see this warning resolved now. :wink: