Skip to content

Commit

Permalink
Workaround for a build error when using Ruby 2.7.0 with YARD
Browse files Browse the repository at this point in the history
This PR fixes a build error when using Ruby 2.7.0 with YARD.

```console
% cd path/to/repo/rubocop
% ruby -v
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-darwin17]

% bundle exec rake
rake aborted!
LoadError: cannot load such file -- e2mmap
/Users/koic/.rbenv/versions/2.7.0/bin/bundle:23:in `load'
/Users/koic/.rbenv/versions/2.7.0/bin/bundle:23:in `<main>'
Tasks: TOP => default => documentation_syntax_check =>
yard_for_generate_documentation
(See full trace by running task with --trace)
```

After adding `e2mmap` gem, the following error occurs.

```console
% bundle exec rake
rake aborted!
LoadError: cannot load such file -- irb/slex
/Users/koic/.rbenv/versions/2.7.0/bin/bundle:23:in `load'
/Users/koic/.rbenv/versions/2.7.0/bin/bundle:23:in `<main>'
Tasks: TOP => default => documentation_syntax_check =>
yard_for_generate_documentation
(See full trace by running task with --trace)
```

The following PR has been opened to resolve these errors.
lsegal/yard#1296
  • Loading branch information
koic authored and bbatsov committed Dec 28, 2019
1 parent f986523 commit 73ac8bf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Gemfile
Expand Up @@ -5,6 +5,12 @@ source 'https://rubygems.org'
gemspec

gem 'bump', require: false
# Workaround for YARD 0.9.20 or lower.
# Depends on `e2mmap` and `irb` until the release that includes
# the following changes:
# https://github.com/lsegal/yard/pull/1296
gem 'e2mmap'
gem 'irb', '1.0.0'
# Workaround for Parser 2.7.0.0.
# It specifies the upper version until Parser 2.7.0.1 release.
gem 'parser', '>= 2.6', '< 2.7'
Expand Down

0 comments on commit 73ac8bf

Please sign in to comment.