Skip to content

QUA-619: remove mry gem (beta) #328

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 9, 2022
Merged

Conversation

dantevvp
Copy link

@dantevvp dantevvp commented Aug 8, 2022

This PR removes the mry gem and the ConfigUpgrader class, that was using that gem to migrate older rubocop configuration attributes to their newer equivalents.

The mry gem is intended to be used in pre-1.0 versions of rubocop. In more recent versions, this gem seems to behave unpredictably, breaking some specific cops, so there's a reason to remove it entirely for rubocop versions post 1.0

The ConfigUpgrader class was removed because it's sole purpose was to use mry to migrate config files.

Example:

This is the CLI analyzing a piece of code with rubocop version 1.22.3, while using mry to migrate configs

image

When removing the mry gem, running the same analysis on the same piece of code returns this:

image

NOTE: the removal of this gem makes the engine produce more issues compared to previous versions in some cases. There might be a big difference in new issues that weren't being caught before when using this update (between 10-100 in large codebases).

@dantevvp dantevvp requested review from a team, larkinscott and camillof and removed request for a team August 8, 2022 17:12
@BrianHawley
Copy link

BrianHawley commented Aug 8, 2022

@dantevvp you should also remove spec/support/config_upgrader_rubocop.yml because it's only used in that deleted test.

@dantevvp dantevvp merged commit 94b03a3 into channel/beta Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants