Clarify comment and remove TODO#5031
Conversation
The current version of the warning: ``` warning: parser/current is loading parser/ruby27, which recognizes2.7.6-compliant syntax, but you are running 2.7.5. Please see https://github.com/whitequark/parser#compatibility-with-ruby-mri. ``` So I removed the TODO comment because it's outdated. But I left the actual exclusion in because it will be a recurring issue from time to time.
| # 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/, |
There was a problem hiding this comment.
I am unclear why these first two lines are separate patterns, when the matching error line is a single line:
parser/current is loading parser/ruby27, which recognizes2.7.6-compliant syntax, but you are running 2.7.5.
This code was originally added here: https://github.com/dependabot/dependabot-core/pull/3913/files#diff-ccda7b2806a38f2ed3bdb918dd76c7720fd55e0d5c825f4d961edde095e97af4R3-R9 but that doesn't provide much context... @feelepxyz do you recall why?
There was a problem hiding this comment.
Just did a quick Google search for "compliant syntax, but you are running " and saw an issue wherein someone had the message displayed as:
warning: parser/current is loading parser/ruby22, which recognizes
warning: 2.2.3-compliant syntax, but you are running 2.2.4.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.I'd expect ALLOW_PATTERNS.none? { |pattern| pattern =~ message } to nicely handle that case and the case you quoted 🙂
There was a problem hiding this comment.
Ah, that makes perfect sense, thank you @landongrindheim!
|
Looks good to me! I'm wondering, given how long it takes for brightbox to package ruby, whether it would make sense to move to something else. |
@deivid-rodriguez I had the same question... but didn't know offhand where else to pick it up from. Beyond speed of updates, from a security perspective, we need to be especially careful where we pick this up from. |
|
@jeffwidman Absolutely! If I recall correctly, brightbox Ruby was born at the time because Linux distributions were too slow updating Ruby. However, now the situation seems exactly the opposite, for example, Ruby 3.0 is already available in Ubuntu 22.04. |
The current version of the warning:
So I removed the TODO comment because it's outdated.
But I left the actual exclusion in because it will be a recurring issue from time to time because https://ppa.launchpadcontent.net/brightbox/ruby-ng/ubuntu can be a little slow to update...
for example see various discussions on the mailing list that sometimes get no response from
the maintainers: https://groups.google.com/g/brightbox-ruby-ubuntu-packaging