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

Convert to go 1.11 modules #5153

Closed
smyrman opened this issue Dec 18, 2018 · 3 comments · Fixed by #6912
Closed

Convert to go 1.11 modules #5153

smyrman opened this issue Dec 18, 2018 · 3 comments · Fixed by #6912
Labels
area/packaging feature request Requests for new plugin and for new features to existing plugins

Comments

@smyrman
Copy link

smyrman commented Dec 18, 2018

Feature Request

I searched and didn't find an issue for this. I realize telegraf have recently (within the last 6 months) moved to Go dep. But is there interest for moving it yet again to go modules?

Proposal:

Use go modules instead of dep (and Godeps?) for managing/installing dependencies. For maintenance reasons, remove the old dependency files and update Makefiles to utilize them.

Requires the minimal supported Go version to be 1.11

Current behavior:

Uses dep (and Godeps?) for managing dependencies.

Use case: [Why is this important (helps with prioritizing requests)]

First of all, it's a lot faster for the number of dependencies required by telegraf to utilize go modules, especially while working with several check-outs:

  • Go modules appear to be faster at downloading dependencies.
  • Go modules holds a user-scoped cache of all dependencies, making it faster and more convinient to work with

Secondly, it doesn't require telegraf to be checked out into GOPATH, making it easeir to checkout and work with telegraf using multiple checkouts.

As a final small benefit, if working with a project that uses go modules, checking out a copy of telegraf within your application module (.e.g. as part of a Docker build-process), the main module won't dive into telegraf to look for dependencies, and won't run it's tests on go teset ./....

@danielnelson
Copy link
Contributor

We will consider this and likely make the change in the future but for now we still need support for building with Go 1.9 and we don't want to support two systems.

@danielnelson danielnelson added area/packaging feature request Requests for new plugin and for new features to existing plugins labels Dec 18, 2018
@caelifer
Copy link

caelifer commented Feb 4, 2019

We will consider this and likely make the change in the future but for now we still need support for building with Go 1.9 and we don't want to support two systems.

As of Go v1.9.7, support for go.mod was backported - cmd/go: add minimal support for vgo transition. Would this speed up adoption of official Go modules?

@danielnelson
Copy link
Contributor

It might, could you try to update the appveyor and circleci configurations and see if we can get it building on all versions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/packaging feature request Requests for new plugin and for new features to existing plugins
Projects
None yet
3 participants