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

Pin the version of parser/current to whatever Ruby version we're using #5461

Closed
jeffwidman opened this issue Aug 1, 2022 · 1 comment
Closed

Comments

@jeffwidman
Copy link
Member

Currently, we pull in whatever the latest version of parser/current is... if that is ahead of our actual Ruby version, then we can get warnings, which we currently silence:

# Ignore parser warnings for ruby 2.7 minor version mismatches.
# This is a recurring issue that occurs whenever the parser gets
# ahead of our installed ruby version.
%r{parser/current is loading parser/ruby27},
/2.7.\d-compliant syntax, but you are running 2.7.\d/,
%r{whitequark/parser}

However, there's another way to handle this--by having the parser version match whatever version of Ruby we're using.

See how the Rubocop project did it:

jeffwidman added a commit to jeffwidman/dependabot-core that referenced this issue Aug 1, 2022
I originally thought we were only hitting this warning due to Rubocop,
and tried removing it, but it turns out we pull in this library for
other code. I don't have time to dig deeper right now, so I filed
dependabot#5461 explaining
what I learned so far and this PR adds a TODO note in the code so the
information doesn't get lost in the issue tracker.
@jeffwidman
Copy link
Member Author

Actually, looking at https://github.com/whitequark/parser/blob/492871419b298e233bb788ec1793b7af7004e23e/lib/parser/current.rb#L95-L99 the warning can still be thrown even if we pin the parser to the current ruby minor version... if the patch versions are outdated. Since the parser doesn't appear to have patch versions--those regexes will catch all patch versions under the same comparison with the latest ruby patch version.

So closing as I don't think there's anything we can do here.

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

No branches or pull requests

1 participant