elastic icon indicating copy to clipboard operation
elastic copied to clipboard

go get adds github.com/olivere/elastic/v7 as an indirect dependency in go.mod

Open mukulGoelTokopedia opened this issue 5 years ago • 3 comments

Please use the following questions as a guideline to help me answer your issue/question without further inquiry. Thank you.

Which version of Elastic are you using?

elastic.v7 (for Elasticsearch 7.x)

Please describe the expected behavior

github.com/olivere/elastic/v7 should have been added as a direct dependency import "github.com/olivere/elastic/v7" should be recognised as a valid path

Please describe the actual behavior

github.com/olivere/elastic/v7 added as an indirect dependency import "github.com/olivere/elastic/v7" not recognised as a valid path

Any steps to reproduce the behavior?

  1. Go version is 1.14.3
  2. go get github.com/olivere/elastic/[email protected]
  3. go mod vendor
  4. import "github.com/olivere/elastic/v7" in your package

mukulGoelTokopedia avatar May 26 '20 11:05 mukulGoelTokopedia

But when I first import "github.com/olivere/elastic/v7" in my package (without running go get) and then run go mod vendor, it's added as a direct dependency and import path is also recognised in my package

mukulGoelTokopedia avatar May 26 '20 12:05 mukulGoelTokopedia

Thanks for reporting. Yep, there's something wrong. I probably know why this happens, and will fix in the next release.

olivere avatar May 27 '20 10:05 olivere

Hmm... for the moment, I'm not sure where this is coming from. Need to investigate a bit more.

olivere avatar Jun 02 '20 11:06 olivere