GithubHelp home page GithubHelp logo

Comments (11)

bcmills avatar bcmills commented on June 2, 2024 2

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.

stevenh avatar stevenh commented on June 2, 2024 1

Since this isn't something that this package can do anything about, are you happy for me to close?

from redigo.

dcormier avatar dcormier commented on June 2, 2024 1

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.

dcormier avatar dcormier commented on June 2, 2024

CC @bcmills, maybe, since he was involved with getting #440 squared away.

from redigo.

bcmills avatar bcmills commented on June 2, 2024

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.

stevenh avatar stevenh commented on June 2, 2024

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.

dcormier avatar dcormier commented on June 2, 2024

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.

stevenh avatar stevenh commented on June 2, 2024

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.

dcormier avatar dcormier commented on June 2, 2024

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.

dcormier avatar dcormier commented on June 2, 2024

I still don't know that it'll work right if/once this package is updated. I'm working on it.

from redigo.

stevenh avatar stevenh commented on June 2, 2024

Ok will keep open for now, fingers crossed.

from redigo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.