question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make "redis" an optional dependency

See original GitHub issue

I use rate-limit-redis with ioredis as my preferred Redis client library.

While inspecting my projects dependencies I noticed that rate-limit-redis has a hard dependency on the redis NPM package. From the documentation, rate-limit-redis is compatible with either ioredis or redis

I suggest making redis an optional dependency. This would allow consumers of rate-limit-redis to choose which Redis client(s) are installed.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
wyattjohcommented, Oct 2, 2019

It’s certainly an interesting idea, but unfortunately, this would mean that every user of rate-limit-redis would need to add redis or ioredis to their dependencies themselves. This could be changed in a new major version, but I’d worry that the default behaviour still provides the easiest installation path.

Maybe a cleaner solution would be to introduce a new package that simply provides the rate-limit-redis interface only accepting the client and leave this package as one that includes the hard dependency on redis.

Does that sound like an ok solution going forward?

0reactions
stale[bot]commented, Mar 20, 2022

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Redis - make the dependencies optional · Issue #561 - GitHub
I thinks that the https://github.com/spring-projects/spring-security-oauth/blob/master/spring-security-oauth2/pom.xml#L148 redis depedencies ...
Read more >
Python poetry - how to install optional dependencies?
You need to add a tool.poetry.extras group to your pyproject.toml if you want to use the -E flag during install, as described in...
Read more >
Spring Data Redis
You can help make Spring Data best serve the needs of the Spring community by interacting ... Declaring a dependency to a Spring...
Read more >
Redis Extension Reference Guide - Quarkus
With this dependency, you can then inject Redis clients or datasource (high-level, ... Optional quarkus.redis.master-name=my-sentinel # Default is my-master ...
Read more >
FT.CREATE - Redis
Because the argument is optional, the default is * (all keys). ... In version 2.x, RediSearch indexes hashes and JSONs, and the dependency...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found