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

Workaround for Ruby's warning in YARD #12999

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

koic
Copy link
Member

@koic koic commented Jun 17, 2024

This is a workaround to prevent the following warning in YARD:

$ 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.

The fundamental resolution will likely be addressed in lsegal/yard#1546.


Before submitting the PR make sure the following are checked:

  • The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
  • Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.

This is a workaround to prevent the following warning in YARD:

```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.
```

The fundamental resolution will likely be addressed in lsegal/yard#1546.
@bbatsov bbatsov merged commit 885b16c into rubocop:master Jun 17, 2024
20 of 21 checks passed
@koic koic deleted the add_logger_to_gemfile branch June 17, 2024 04:59
koic added a commit to koic/rubocop that referenced this pull request Jun 17, 2024
This is a workaround to prevent the following error in 3.4.0dev CI matrix:

```console
==> Failures

  1) RuboCop::CLI profiling creates memory profile file
     Got 3 failures from failure aggregation block.
(snip)

     *.1) Failure/Error: expect(cli.run(['--profile', '--memory', 'example1.rb'])).to eq(0)

            expected: 0
                 got: 2

            (compared using ==)
          # ./spec/rubocop/cli_spec.rb:2200:in 'block (3 levels) in <top (required)>'

     *.2) Failure/Error: expect($stdout.string.include?('Building memory report...')).to be(true)

            expected true
                 got false
          # ./spec/rubocop/cli_spec.rb:2201:in 'block (3 levels) in <top (required)>'

     *.3) Failure/Error: expect(File).to exist(memory_profile)
            expected File to exist
          # ./spec/rubocop/cli_spec.rb:2202:in 'block (3 levels) in <top (required)>'
```

https://github.com/rubocop/rubocop/actions/runs/9542192514/job/26296594698

It is necessary to investigate and resolve the error that occurred with Ruby 3.4-dev in rubocop#12999 separately.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants