Skip to content

Commit

Permalink
Add logger to runtime dependency
Browse files Browse the repository at this point in the history
This PR adds `logger` to runtime dependency to suppress the following warning:

```console
$ ruby -v
ruby 3.4.0dev (2024-06-14T03:14:32Z master 2677ab1607) [x86_64-darwin23]
$ cd path/to/rubocop
$ bundle exec rake
/Users/koic/.rbenv/versions/3.4-dev/lib/ruby/gems/3.4.0+0/gems/yard-0.9.36/lib/yard/logging.rb:3:
warning: logger was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.5.0.
Add logger to your Gemfile or gemspec.
```

This change is aimed at Ruby 3.5 and will start showing warnings from Ruby 3.4:
ruby/ruby@d7e558e

To maintain the following behavior, the dependency will be added in the gemspec to resolve this.
https://github.com/lsegal/yard/blob/v0.9.36/lib/yard/logging.rb#L3-L9
  • Loading branch information
koic committed Jun 17, 2024
1 parent ebd6269 commit 865ed05
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions yard.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ Gem::Specification.new do |s|
s.executables = ['yard', 'yardoc', 'yri']
s.license = 'MIT' if s.respond_to?(:license=)
s.metadata['yard.run'] = 'yri'
s.add_dependency 'logger'
end

0 comments on commit 865ed05

Please sign in to comment.