-
Notifications
You must be signed in to change notification settings - Fork 686
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
Not seeing v2.0.0 for nats-io/nats.go #475
Comments
I could reproduce, another issue is that the entry |
We have some issues also with the nats server not be able to tag v2.0.0.. I am looking into that, but wonder if the issue is not due to circle dependencies.. Again, working on that, thanks! |
Moving to a v2 was in my opinion a mistake (since we did not break backward compatibility in the client library). That being said, we would have to comply with the rule for go.mod for versions v2 and above. That is, go.mod should something like:
and all internal imports for
That would be required to use any API that is in v2 (for instance Message.Respond). If you don't do that, it would pull the latest 1.7.2 I am guessing. Note that this is not done yet, and may require a 2.0.1 to fix the go.mod thing. We are discussing internally what we are going to do. Thanks! |
We put back to v1.8. Should work with that import now. |
After this tag v1.8.0 i have error:
|
(i'm try to go get github.com/nats-io/nats.go/@v1.8.0) but go mod tidy and go mod vendor display this message.... |
I think the issue now is with nats.go and stan.go libs not modified to change the nats-server |
@vangent As explained, we have downgraded to v1.8.0 (now v1.8.1). Hopefully things are getting slowly resolved. There is still NATS Server that needs proper v2.0.0 release (right now still -RC19). Let me know if you still experience the issue. If you do, you could also try to add this to your go.mod file (before or after the
|
thanks for hint |
@vtolstov You mean that it worked only because of the |
not, it working without this replace line |
Ok, good to know. |
I am still seeing that error:
|
Yes, you are pulling gnatsd v1.4.1 that probably causes the old go-nats to be referenced. Try the
|
alternatively, pull nats-serve 2.0.0 if you can. |
and move to |
go get github.com/nats-io/nats.go@latest Cleared the mod cache, etc. |
@psiservices-scohen We have documented that because of the unfortunate naming decision of the repo to be ending with
Let me know if that works for you. |
Tried that - this is what I get: go: github.com/nats-io/go-nats@v1.8.1: parsing go.mod: unexpected module path "github.com/nats-io/nats.go" Is there something I should clear out? |
Your go mod may be pulling older (pre repo rename) NATS client repo. If you can't clean up your go.mod, add this at the end as I just suggested to previous poster:
Does that work? |
Tried that - github.com/nats-io/nats.go@v1.8.1 used for two different module paths (github.com/nats-io/go-nats and github.com/nats-io/nats.go) Deleted go from my system, cleared the /pkg /bin folders, then reinstalled, same thing |
@psiservices-scohen can you share your go mod? Here is an example of using the deps in a way that it works: https://github.com/wallyqs/hello-nats-go-mod/blob/master/go.mod |
module pass go 1.12 require ( replace github.com/nats-io/go-nats => github.com/nats-io/nats.go v1.8.1 p.s. - Love your book - thanks! |
Have you tried removing |
If you have applications using NATS you should update all your import paths for the new repo (nats.go instead of go-nats) |
Deleted the go .mod/.sum files and re-inited - added the replace... now it works. Thanks for the assist. |
Still, I think you should go to the trouble of updating your import paths for nats.go and you may then not need the |
WIll do - |
Sharing in case anyone is still having issues such as:
To fix it:
module github.com/wallyqs/hello-nats-go-mod
go 1.12
require (
github.com/nats-io/nats.go v1.8.1
github.com/nats-io/stan.go v0.5.0
) Or if want to import the NATS Server v2 to embed it, notice the require (
github.com/nats-io/nats-server/v2 v2.0.0
github.com/nats-io/nats.go v1.8.1
)
find ./ -type f -name "*.go" -exec sed -i -e 's/github.com\/nats-io\/go-nats-streaming/github.com\/nats-io\/stan.go/g' {} \;
find ./ -type f -name "*.go" -exec sed -i -e 's/github.com\/nats-io\/go-nats/github.com\/nats-io\/nats.go/g' {} \;
find ./ -type f -name "*.go" -exec sed -i -e 's/github.com\/nats-io\/nats-server/github.com\/nats-io\/nats-server\/v2/g' {} \;
|
@vangent for the go-cloud project, made this branch with the updated latest deps, sharing in case it helps: google/go-cloud@master...wallyqs:nats-deps |
@wallyqs -- thanks! Updating the import paths for the server to |
ok closing this one for now since v2.0.0 for |
Shouldn't it be
v2.0.0
?The text was updated successfully, but these errors were encountered: