-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
No go.mod in release-branch.v6 #1112
Comments
Although that's the obvious way to do it, I have refrained from doing so until now. I was an early adopter of Go modules with v6, and it caused a lot of problems to users (see e.g. #877). So I decided to not introduce Go modules to v6 and delay that until v7. I'm confused about v5 having a |
Ok I see. I'm new to Go and its ecosystem. Are Go modules more established now? If so, maybe |
Yes, they are. We could very simply upgrade to Go modules now. But that would break all existing v6 clients when they update; backwards compatibility is more important to me than using Go modules, so I won't do that. If you use Go modules within your project, you should be able to use all three versions in the same project—in parallel—even if they don't use Go modules. The import paths don't look too nice, but that's all there is:
|
Definitely agree about backwards compatibility. The reason I wanted to use the GitHub-based URLs was so I could import a specific revision from GitHub. However I just discovered I can also do this with the gopkg.in URLs, as in:
So I guess I don't need a Context: I'm working on the following PR: phillbaker/terraform-provider-elasticsearch#27 |
No. You must not use that import path for v6. You should use the import paths as stated in the README. The reason is because v6 will import other parts of the library, like |
Which version of Elastic are you using?
[ ] elastic.v7 (for Elasticsearch 7.x)
[x] elastic.v6 (for Elasticsearch 6.x)
[ ] elastic.v5 (for Elasticsearch 5.x)
[ ] elastic.v3 (for Elasticsearch 2.x)
[ ] elastic.v2 (for Elasticsearch 1.x)
Please describe the expected behavior
I see that both branch
release-branch.v5
andrelease-branch.v7
have ago.mod
file.It would be nice if
release-branch.v6
also had ago.mod
file.That way I should be able to import the library directly from GitHub using:
instead of importing from
gopkg.in/olivere/elastic.v*
. This is needed when developing against an unreleased version.The text was updated successfully, but these errors were encountered: