➕ Add logger dependency to suppress Ruby 3.5.0 deprecation warning#21
➕ Add logger dependency to suppress Ruby 3.5.0 deprecation warning#21
Conversation
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>
Summary of ChangesHello @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
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
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.
couchbase-orm.gemspec
Outdated
| 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+ |
There was a problem hiding this comment.
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+
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>
Summary
loggeras an explicit runtime dependency in the gemspecloggerno longer being part of default gemsTest plan
bundle installto install the logger gemDetails
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:
After: Warning is gone ✅
🤖 Generated with Claude Code