nats-io / stan.go

NATS Streaming System
https://nats.io
Apache License 2.0
706 stars 117 forks source link

Tests still import nats-streaming-server and break go mod #280

Closed asiragusa closed 4 years ago

asiragusa commented 5 years ago

The old import can be found here: https://github.com/nats-io/stan.go/blob/master/stan_test.go#L35. This breaks go mod, as the old repository is archived.

kozlovic commented 5 years ago

Yes, tests import the streaming server and that is expected. I am not sure what you are referring to as "the old import".

kozlovic commented 5 years ago

It seems that your go.mod is still using old nats-server and nats-streaming-server releases (pre go.mod). Try to update those to the latest. https://github.com/Jeffail/benthos/pull/275/files#diff-37aff102a57d3d7b797f152915a6dc16R54

kozlovic commented 5 years ago

Also, note that if you are using Go 1.13, you will have problems with nats and stan repos (since their name ends in .go): https://github.com/golang/go/issues/32483

asiragusa commented 5 years ago

Ok I managed to make it work, by updating the nats-streaming-server dependency, but I had to specify the latest commit, as there is an issue with the v0.16.0 and golang,org/x/sys:

go: finding github.com/nats-io/nats-streaming-server v0.16.0
go: downloading github.com/nats-io/nats-streaming-server v0.16.0
go: extracting github.com/nats-io/nats-streaming-server v0.16.0
go: github.com/nats-io/nats-streaming-server@v0.16.0 requires
        golang.org/x/sys@v0.0.0-20190726091711-fde4db37ae7a: invalid pseudo-version: does not match version-control timestamp (2019-08-13T06:44:41Z)

A new patch release could fix this

kozlovic commented 5 years ago

A new patch release could fix this

Correct. We are going to release a new version soon that will include https://github.com/nats-io/nats-streaming-server/pull/924/.

asiragusa commented 5 years ago

Ok thanks

kozlovic commented 4 years ago

Closing this issue now.