Comments (11)
It would be simple, but it would require a incrementing the major version since it breaks compatibility.
A similar, non-breaking change would be to define a the method in a separate interface and promise that all Conn
instances returned by the relevant Pool
can be type-asserted to that interface.
(FWIW, that sort of incompatibility is exactly why the advice in https://go.dev/wiki/CodeReviewComments#interfaces is to return concrete types instead of interfaces.)
from redigo.
Since this isn't something that this package can do anything about, are you happy for me to close?
from redigo.
I still don't know that it'll work right if/once this package is updated. I'm working on it.
Got all the dependencies updated. Thank you.
from redigo.
CC @bcmills, maybe, since he was involved with getting #440 squared away.
from redigo.
It seems to me that the difficulty here is that github.com/go-redsync/redsync v1.4.2
is the latest version of that module (they appear to have dropped maintenance on v1
in 2020) and has a requirement on redigo v2.0.0+incompatible
.
So, one solution would be to find a way to drop your project's dependency on github.com/go-redsync/redsync
(perhaps by migrating to github.com/go-redsync/redsync/v4
).
Another would be to request that the owners of redsync
issue a v1.4.3
changing their dependency on redigo
from v2.0.0+incompatible
to v0.0.0-20180314223443-9c11da706d9b
, which is another name for the same commit. (Both are valid because there is no go.mod
file at that revision to give a canonical module path).
A third would be to add exclude github.com/gomodule/redigo v2.0.0+incompatible
to your go.mod
file, pruning the spurious dependency out of your module graph.
from redigo.
To clarify something, redigo
has no dependency on redsync
. I believe it's the other way round
> go get github.com/gomodule/redigo@latest
go: downgraded github.com/go-redsync/redsync v1.4.2 => v1.0.1
go: downgraded github.com/gomodule/redigo v2.0.0+incompatible => v1.8.9
As bcmills states if you update your project to use github.com/go-redsync/redsync/v4
then I believe go get -u
will just work.
from redigo.
My project does depend on github.com/go-redsync/redsync/v4
. It's a dependency that uses github.com/go-redsync/redsync
.
I hate golang's dependency management so much.
from redigo.
To be fair its come a long way and this is really down to unmaintained code.
I would try to see if your dependency really needs the original or if it could be updated.
Try this and see if it works:
go mod edit -replace github.com/go-redsync/redsync=github.com/go-redsync/redsync/v4
from redigo.
Sadly, it still needs the old version. The Pool
interface chaged in v3. In v2 and prior, Pool.Get()
returned a github.com/gomodule/redigo/redis.Conn
, which you can call .Do()
on and execute an arbitrary redis command.
The Pool
interface from v3 on returns a github.com/go-redsync/redsync/v4/redis.Conn, which only exposes helper methods and not a method for executing arbitrary redis commands (other than through scripting).
The dependency in question is doing something that it can't do with the existing methods on github.com/go-redsync/redsync/v4/redis.Conn, unless it changes to run a script just to run a single command.
I'll open an issue asking for the Conn
interface to expose something like the .Do()
method for arbitrary redis commands. It would be simple, but it would require a incrementing the major version since it breaks compatibility.
from redigo.
I still don't know that it'll work right if/once this package is updated. I'm working on it.
from redigo.
Ok will keep open for now, fingers crossed.
from redigo.
Related Issues (20)
- Just noticed a suspicious change in Redigo wiki HOT 3
- Occasional Hard Lockup In Pubsub Receive() HOT 8
- HSET command is having issue with the return type (reply return variable) : unexpected type for String, got type int64 HOT 1
- Need a way to execute arbitrary redis commands on a connection from a `Pool` HOT 2
- Act subscribe immediately without receive message HOT 1
- use pipline send got ERR wrong number of arguments for 'set' command HOT 6
- Why is v1.8.9 newer than v2.0.0 ? HOT 1
- Could you remove v2.0.0 tag HOT 2
- pool can support FIFO? HOT 3
- Potential goroutine leak in TestDialTLSHandshakeTimeout HOT 1
- Expose DialOptions used to create the connection to support instrumentation/tracing features HOT 10
- dial-tcp-connect-cannot-assign-requested-address? HOT 1
- Not able to connect when Redis Password contains"/" HOT 2
- Wait pool timeout? HOT 2
- The order of pipeline send commands is not fixed HOT 3
- buffio.Write may write less bytes than requested HOT 1
- pubSubConn.Receive() is insufficient HOT 1
- Increase tail latencies when migrated service to arm64 architecture HOT 1
- Vulnerability of dependency "gopkg.in/yaml.v3"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redigo.