Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use v2.0.2 version in project #98

Closed
mixadior opened this issue Jan 11, 2021 · 5 comments · Fixed by #99
Closed

How to use v2.0.2 version in project #98

mixadior opened this issue Jan 11, 2021 · 5 comments · Fixed by #99
Assignees

Comments

@mixadior
Copy link

Hi, all

i try to add

bash-3.2$ ./go.sh get -d github.com/RediSearch/[email protected] go get: github.com/RediSearch/[email protected]: invalid version: module contains a go.mod file, so major version must be compatible: should be v0 or v1, not v2 bash-3.2$

but it failed with error.

@filipecosta90
Copy link
Collaborator

filipecosta90 commented Jan 11, 2021

@mixadior you're totally right and we've still not added an /v2 folder that is required due to the major version bump.
However, and to be able to use right-away all features you use the v2.0.2 commit within go get, as follows:

$ go mod init test/test
go: creating new go.mod: module test/test
$ GO111MODULE=on go get -v -d github.com/RediSearch/redisearch-go@4f1c7d992619a6ff048d84ba850fa6de28a7b72a
go: finding github.com/RediSearch 4f1c7d992619a6ff048d84ba850fa6de28a7b72a
go: finding github.com/RediSearch/redisearch-go 4f1c7d992619a6ff048d84ba850fa6de28a7b72a
go: finding github.com 4f1c7d992619a6ff048d84ba850fa6de28a7b72a

I've tested with this simple example that uses an v2.0.2 added function:

package main

import (
	"github.com/RediSearch/redisearch-go/redisearch"
)

func main(){
	c := redisearch.NewClient("localhost:6379", "myIndex")
	c.DropIndex(true)
}

Let's keep this issue open until we fix this issue and release v2.0.3 with the proper folder struct. Thank you for reporting it!

@mixadior
Copy link
Author

mixadior commented Jan 12, 2021

Hi, thx for fast response.
One more question - why do you use redigo v2.0.0, which is not adopted to gomodules?

https://github.com/RediSearch/redisearch-go/blob/master/go.mod :


go 1.12

require (
	github.com/gomodule/redigo v2.0.0+incompatible
	github.com/stretchr/testify v1.6.1
)

latest release is 1.8.3 , i'm not so fluent in go modules, but seems redigo v2.0.0 is left from migration and is orphaned - gomodule/redigo#366

@filipecosta90
Copy link
Collaborator

Hi, thx for fast response.
One more question - why do you use redigo v2.0.0, which is not adopted to gomodules?

https://github.com/RediSearch/redisearch-go/blob/master/go.mod :


go 1.12

require (
	github.com/gomodule/redigo v2.0.0+incompatible
	github.com/stretchr/testify v1.6.1
)

latest release is 1.8.3 , i'm not so fluent in go modules, but seems redigo v2.0.0 is left from migration and is orphaned - gomodule/redigo#366

@mixadior It seems that when we enabled go modules, for some reason that was the version that I was working with on a48d16f . One very interesting thing is that we kicked off go mod support pretty much at the same time across other redislabs projects ( example of redistimeseries-go https://github.com/RedisTimeSeries/redistimeseries-go/blob/master/go.mod ) and it seems that for some reason I did a bad version update on this one... ( on timeseries is as expected )
I'll discuss internally our versioning issue but I believe we should revert using v2 to when we add a new large feature(breaking one) that will probably be OSS cluster support (#34 ), and keep with the minor/patch release updates until then.

@mixadior
Copy link
Author

@filipecosta90 interesting )), redigo 2.0.0 has last commit in 2018. Probably it will be better to change go.mod file to redigo v1.8.3 , because redisearch is compatible with v1.x.x of redigo and everything should work ok. Anyway, thx.

@filipecosta90
Copy link
Collaborator

Hi there @mixadior, we've just released v1.1.0 that should have all fixes we've discussed. Once again thank you for raising this issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants