Skip to content
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

Relax regexp_parser requirement. #9154

Merged
merged 1 commit into from
Dec 2, 2020

Conversation

marcandre
Copy link
Contributor

@marcandre
Copy link
Contributor Author

Should we issue a warning if the loaded version is < 2?

@bbatsov
Copy link
Collaborator

bbatsov commented Dec 2, 2020

Probably not. Users tend to complain about those. :-)

@tas50
Copy link
Contributor

tas50 commented Dec 2, 2020

Thanks @marcandre. This unblocks me in a major way.

@marcandre marcandre merged commit 2472e1c into rubocop:master Dec 2, 2020
@marcandre marcandre deleted the relax_regexp_parser branch December 2, 2020 22:32
@marcandre
Copy link
Contributor Author

Cool, thanks. Merged.

koic added a commit to koic/rubocop that referenced this pull request Dec 3, 2020
Follow rubocop#9154,
rubocop#9155,
and rubocop#9102.

This is a step towards the widespread use of regexp_parser 2.0.

RuboCop core accepts regexp_parser 1.8, but several code is already
incompatible with regexp_parser 1.8. It can cause issue because these
combination of versions.

Therefore, this PR ports code for regexp_parser 1.8 that will never be
maintained from rubocop#9102.

Implementation of this patch, code is intentionally duplicated because
it is evaluated only when the class is defined. Also, since obsoleted
code for regexp_parser 1.8 is assumed to never be maintained, the target
to be removed is clear.

To be honest, it's ugly as implementation, but I think it has the least
impact for RuboCop 1.x series users.
bbatsov pushed a commit that referenced this pull request Dec 3, 2020
Follow #9154,
#9155,
and #9102.

This is a step towards the widespread use of regexp_parser 2.0.

RuboCop core accepts regexp_parser 1.8, but several code is already
incompatible with regexp_parser 1.8. It can cause issue because these
combination of versions.

Therefore, this PR ports code for regexp_parser 1.8 that will never be
maintained from #9102.

Implementation of this patch, code is intentionally duplicated because
it is evaluated only when the class is defined. Also, since obsoleted
code for regexp_parser 1.8 is assumed to never be maintained, the target
to be removed is clear.

To be honest, it's ugly as implementation, but I think it has the least
impact for RuboCop 1.x series users.
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