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

2: Upgrade standard and parser to avoid parser warning #1537

Merged
merged 2 commits into from Jan 20, 2022

Conversation

rgarner
Copy link
Contributor

@rgarner rgarner commented Jan 20, 2022

Changes in this PR

Upgrade from very old 0.1.8 standard to 1.5.0. We were manually pinning parser to ~> 2.6.3.0 and that was generating the parser warning on the beginning of every test suite.

Avoid bumping Ruby to 2.7.5 right this second; this will make the job a bit easier when we come to do it. Acknowledge that pinning parser has the effect of potentially generating the parser warning whenever we upgrade Ruby (although Rubocop has since been patched to silence the warning so will no longer be a source), and we'll need to manually move it along in the Gemfile when we do so.

See rubocop/rubocop#9700 (comment) for details

Next steps

  • Is an ADR required? An ADR should be added if this PR introduces a change to the architecture.
  • Is a changelog entry required? An entry should always be made in CHANGELOG.md, unless this PR is a small tweak which has no impact outside the development team.
  • Do any environment variables need amending or adding?
  • Have any changes to the XML been checked with the IATI validator? See XML Validation

This is the result of pinning parser to ~> 3.0.1.0 (or a 2.7.3
compatible) and `bundle update standard`.

We were on a very old 0.1.8 standard and we can only get to 1.5.0
without warnings by moving parser on to the version that handles 2.7.3.

A simpler thing would be to bump the .ruby-version to 2.7.5 but since
this requires lengthy installs on all incoming dev boxes, we can put
that off for the moment.
Going from 0.1.8 to 1.5.0 produces a slew of errors due to breaking
changes in style – mostly commas on the last elements in arrays. A
couple of "don't define constants in blocks this way" which are bobbins
in specs and we can ignore with standard:disable.
@rgarner
Copy link
Contributor Author

rgarner commented Jan 20, 2022

Ruby parser

@rgarner rgarner requested a review from edavey January 20, 2022 08:15
Copy link
Contributor

@edavey edavey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks again for this!

@rgarner rgarner merged commit f540fde into develop Jan 20, 2022
@rgarner rgarner deleted the 2292-ruby-parser branch January 20, 2022 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants