Repository navigation
Make redis an optional dependency - #643
Open
behnam-oneschema wants to merge 1 commit into
Open
behnam-oneschema wants to merge 1 commit into
behnam-oneschema wants to merge 1 commit into
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #642.
Moves
redisfrom the gemspec's runtime dependencies to its development dependencies, so apps that use the default memory cache adapter (standalone mode) are no longer held toredis < 6.0by Bundler.splitclient-rb.gemspec:redis (>= 4.0.0, < 6.0)is now a development dependency (same range), so the SDK's own Redis specs and CI are unchanged.README.md: consumer mode (cache_adapter: :redis) requiresgem 'redis'in the application's Gemfile.CHANGES.txt: unreleased entry.spec/splitclient/split_config_spec.rb: the default config builds a memory adapter without requiringredis, andcache_adapter: :redisraises the existing "To use Redis as a cache adapter you must include it in your Gemfile" error whenrediscan't be loaded.No library code changes were needed:
lib/only requiresredislazily, insideSplitConfig.init_cache_adapterandinit_telemetry_adapter.Compatibility
Consumer-mode apps that relied on
splitclient-rbto pull inredistransitively will get the existing clear error at startup until they addgem 'redis'. You may prefer to ship this in a minor or major release and call it out in the release notes.Testing
bundle exec rspecwith Redis on localhost: 893 examples, 0 failures, 7 pending.require 'redis'blocked loads the SDK and builds the defaultSplitConfig;redisis never loaded.gem build splitclient-rb.gemspecsucceeds; the built gem listsredisonly under development dependencies.