fix: relax openfeature-sdk version constraint in Optimizely provider#133
fix: relax openfeature-sdk version constraint in Optimizely provider#133josecolella merged 2 commits intomainfrom
Conversation
Summary of ChangesHello, 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 addresses an incompatibility issue in the Optimizely provider by updating its dependency specification for the 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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly relaxes the version constraint for the openfeature-sdk gem to allow compatibility with newer versions. The change is functional, but I have suggested using a more concise and idiomatic approach for defining the version constraint in the gemspec file, which improves readability and aligns with common Ruby conventions.
|
|
||
| spec.add_runtime_dependency "logger" | ||
| spec.add_runtime_dependency "openfeature-sdk", "~> 0.4.0" | ||
| spec.add_runtime_dependency "openfeature-sdk", ">= 0.4.0", "< 1.0" |
There was a problem hiding this comment.
While this works, a more concise and idiomatic way to express this version constraint in RubyGems is to use the pessimistic version operator ~>. The constraint "~> 0.4" is equivalent to ">= 0.4.0", "< 1.0" and is generally preferred for its brevity and clarity.
spec.add_runtime_dependency "openfeature-sdk", "~> 0.4"
The current constraint `~> 0.4.0` only allows versions >= 0.4.0 and < 0.5.0, but the openfeature-sdk gem is now at 0.6.4. This makes the Optimizely provider unusable with current SDK versions. Relax the constraint to `>= 0.4.0, < 1.0` to allow compatibility with all pre-1.0 releases of the SDK. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Jose Colella <jose.colella@gusto.com>
Replace `>= 0.4.0, < 1.0` with the equivalent `~> 0.4` which is the standard RubyGems idiom for the same constraint. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Jose Colella <jose.colella@gusto.com>
317a7ea to
736d205
Compare
Summary
The Optimizely provider's gemspec currently constrains
openfeature-sdkto~> 0.4.0, which translates to>= 0.4.0, < 0.5.0. However, theopenfeature-sdkgem is now at version 0.6.4, making the Optimizely provider unusable with current SDK versions.This PR relaxes the constraint to
>= 0.4.0, < 1.0, allowing compatibility with all pre-1.0 releases of the SDK while still guarding against potential breaking changes in a 1.0 release.Changes
providers/openfeature-optimizely-provider/openfeature-optimizely-provider.gemspec: Changedspec.add_runtime_dependency "openfeature-sdk", "~> 0.4.0"tospec.add_runtime_dependency "openfeature-sdk", ">= 0.4.0", "< 1.0"🤖 Jose's AI agent