Skip to content

Commit

Permalink
Require Parser 3.0.0.0 or higher
Browse files Browse the repository at this point in the history
Ruby 3.0 and Parser 3.0.0.0 have been released.

- https://www.ruby-lang.org/en/news/2020/12/25/ruby-3-0-0-released/
- https://rubygems.org/gems/parser/versions/3.0.0.0

This PR requires Parser 3.0.0.0 or higher due to suppress
the following warning when using Ruby 3.0.0.

```console
% ruby -v
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin19]
% rubocop
warning: parser/current is loading parser/ruby30, which recognizes
warning: 3.0.0-dev-compliant syntax, but you are running 3.0.0.
warning: please see
https://github.com/whitequark/parser#compatibility-with-ruby-mri.
```

And this PR removes "experimental" label from support matrix.
CI matrix will be updated when CI image is released.
  • Loading branch information
koic authored and bbatsov committed Dec 26, 2020
1 parent 60264e0 commit 2004383
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog/change_require_parser_3_0_0_0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* [#9288](https://github.com/rubocop-hq/rubocop/pull/9288): Require Parser 3.0.0.0 or higher. ([@koic][])
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/compatibility.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The following table is the support matrix.
| 2.5 | -
| 2.6 | -
| 2.7 | -
| 3.0 (experimental) | -
| 3.0 | -
|===

NOTE: The compatibility xref:configuration.adoc#setting-the-target-ruby-version[target Ruby version mentioned here] is about code analysis (what RuboCop can analyze), not runtime (is RuboCop capable of running on some Ruby or not).
Expand Down
2 changes: 1 addition & 1 deletion rubocop.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Gem::Specification.new do |s|
}

s.add_runtime_dependency('parallel', '~> 1.10')
s.add_runtime_dependency('parser', '>= 2.7.1.5')
s.add_runtime_dependency('parser', '>= 3.0.0.0')
s.add_runtime_dependency('rainbow', '>= 2.2.2', '< 4.0')
s.add_runtime_dependency('regexp_parser', '>= 1.8', '< 3.0')
s.add_runtime_dependency('rexml')
Expand Down

0 comments on commit 2004383

Please sign in to comment.