Skip to content

➕ Add logger dependency to suppress Ruby 3.5.0 deprecation warning#21

Merged
pimpin merged 2 commits intomasterfrom
add-logger-dependency
Oct 27, 2025
Merged

➕ Add logger dependency to suppress Ruby 3.5.0 deprecation warning#21
pimpin merged 2 commits intomasterfrom
add-logger-dependency

Conversation

@pimpin
Copy link
Collaborator

@pimpin pimpin commented Oct 27, 2025

Summary

  • Add logger as an explicit runtime dependency in the gemspec
  • Resolves Ruby 3.5.0 deprecation warning about logger no longer being part of default gems

Test plan

  • Run bundle install to install the logger gem
  • Run tests and verify the logger deprecation warning no longer appears
  • Verify only the ostruct warning (from pry) remains

Details

Starting from Ruby 3.5.0, logger will no longer be part of the default gems. This change adds logger as an explicit runtime dependency to prevent deprecation warnings when running tests.

Before:

warning: logger was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.
You can add logger to your Gemfile or gemspec to silence this warning.

After: Warning is gone ✅

🤖 Generated with Claude Code

Starting from Ruby 3.5.0, logger will no longer be part of the default gems.
This change adds logger as an explicit runtime dependency to prevent
deprecation warnings.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@gemini-code-assist
Copy link

Summary of Changes

Hello @pimpin, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request proactively updates the "couchbase-orm" gem's dependencies to ensure future compatibility with Ruby 3.5.0. By explicitly declaring "logger" as a runtime dependency, it eliminates a deprecation warning that would otherwise appear when "logger" transitions from a default gem to a standard gem in upcoming Ruby versions, maintaining a clean and warning-free development experience.

Highlights

  • Dependency Management: Explicitly added the "logger" gem as a runtime dependency to the "couchbase-orm.gemspec" file.
  • Ruby 3.5.0 Compatibility: Resolves a deprecation warning that will occur in Ruby 3.5.0 when the "logger" gem is no longer part of the default gems.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly adds the logger gem as a runtime dependency to address a deprecation warning for the upcoming Ruby 3.5.0 release. This is a good proactive measure. I've added one suggestion to include a version constraint for the new dependency, which is a best practice for ensuring reproducible builds and improving maintainability.

gem.add_runtime_dependency 'couchbase', '>= 3.4.2'
gem.add_runtime_dependency 'radix', '~> 2.2' # converting numbers to and from any base
gem.add_runtime_dependency 'json-schema', '>= 3' # validating JSON against a schema
gem.add_runtime_dependency 'logger' # Required from Ruby 3.5.0+

Choose a reason for hiding this comment

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

medium

While adding logger as a dependency is correct, it's a good practice to specify a version constraint to ensure build reproducibility and prevent accidentally pulling in future versions with breaking changes. I'd suggest adding a pessimistic version constraint and aligning it with the other dependencies for consistency.

  gem.add_runtime_dependency     'logger',       '~> 1.6.0' # Required from Ruby 3.5.0+

@pimpin pimpin changed the title Add logger dependency to suppress Ruby 3.5.0 deprecation warning ➕ Add logger dependency to suppress Ruby 3.5.0 deprecation warning Oct 27, 2025
Use pessimistic version constraint (~> 1.6) to ensure build
reproducibility and prevent accidentally pulling in future versions
with potential breaking changes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@pimpin pimpin merged commit 4ad1362 into master Oct 27, 2025
15 of 16 checks passed
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.

2 participants