-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Install tools (mage, goimports, etc.) from vendor folder #15998
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, like the including of the tools.
Probably should let someone with a little more experience then me on the project give the +1. I am excited to see this completed, along with the python3 work as well.
782c4b6
to
06c1081
Compare
c1eb64b
to
713b1ff
Compare
@@ -37,6 +37,19 @@ type Args struct { | |||
// ArgOpt is a functional option adding info to Args once executed. | |||
type ArgOpt func(args *Args) | |||
|
|||
type goInstall func(opts ...ArgOpt) error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, we copied gotool from go-txfile
to the Beats repo. Btw. go-txfile
magefile uses the gotools package (minor improvements + generalization of this approach) from https://github.com/urso/magetools
.
@@ -140,7 +141,6 @@ require ( | |||
google.golang.org/appengine v1.6.5 // indirect | |||
google.golang.org/genproto v0.0.0-20191115221424-83cc0476cb11 | |||
google.golang.org/grpc v1.25.1 // indirect | |||
gopkg.in/goracle.v2 v2.16.3 // indirect |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why has this been removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has been removed from master in the meantime: #15683
I'm missing at least 'stringer' as developer dependency. We use
Other dependencies: Looks like we inconsistently use Not all developer dependencies are go tools. We should document them somewhere. e.g. in the readme? |
@urso I have replaced I am wondering if we need to add |
We should at least mention the versions that have been used somehwere. If generated files contain version info in the file header this might be good enough. These generated files are not updated often and newer version of developer tools might introduce breaking changes, that you only recognize after a long time. In this case it is nice to know which version was working last in case you need to fix something ASAP. |
I am adding the required tools and versions to our contribution guide: https://www.elastic.co/guide/en/beats/devguide/current/beats-contributing.html |
I have opened a PR against master with the documentation changes. Now I am movint the PR to "In review" again. |
## What does this PR do? This PR adds information about tool dependencies to the contribution guide. ## Why is it important? Previously we did not specify what tools were required to run `go generate` in the repo. ## Related issues #15998
## What does this PR do? This PR adds a new file `tools/tools.go` to list the tools we need during checking, building and packaging Beats. This is the suggested approach to list tool dependencies: https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module The following tools are added: - `github.com/magefile/mage` - `github.com/pierrre/gotestcover` - `github.com/tsg/go-daemon` - `golang.org/x/tools/cmd/goimports` - `github.com/elastic/go-licenser` ## Why is it important? The tools are required to run `make check` on the CI.
## What does this PR do? This PR adds a new file `tools/tools.go` to list the tools we need during checking, building and packaging Beats. This is the suggested approach to list tool dependencies: https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module The following tools are added: - `github.com/magefile/mage` - `github.com/pierrre/gotestcover` - `github.com/tsg/go-daemon` - `golang.org/x/tools/cmd/goimports` - `github.com/elastic/go-licenser` ## Why is it important? The tools are required to run `make check` on the CI.
## What does this PR do? This PR adds a new file `tools/tools.go` to list the tools we need during checking, building and packaging Beats. This is the suggested approach to list tool dependencies: https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module The following tools are added: - `github.com/magefile/mage` - `github.com/pierrre/gotestcover` - `github.com/tsg/go-daemon` - `golang.org/x/tools/cmd/goimports` - `github.com/elastic/go-licenser` ## Why is it important? The tools are required to run `make check` on the CI.
## What does this PR do? This PR adds a new file `tools/tools.go` to list the tools we need during checking, building and packaging Beats. This is the suggested approach to list tool dependencies: https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module The following tools are added: - `github.com/magefile/mage` - `github.com/pierrre/gotestcover` - `github.com/tsg/go-daemon` - `golang.org/x/tools/cmd/goimports` - `github.com/elastic/go-licenser` ## Why is it important? The tools are required to run `make check` on the CI.
## What does this PR do? This PR adds a new file `tools/tools.go` to list the tools we need during checking, building and packaging Beats. This is the suggested approach to list tool dependencies: https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module The following tools are added: - `github.com/magefile/mage` - `github.com/pierrre/gotestcover` - `github.com/tsg/go-daemon` - `golang.org/x/tools/cmd/goimports` - `github.com/elastic/go-licenser` ## Why is it important? The tools are required to run `make check` on the CI.
## What does this PR do? This PR adds a new file `tools/tools.go` to list the tools we need during checking, building and packaging Beats. This is the suggested approach to list tool dependencies: https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module The following tools are added: - `github.com/magefile/mage` - `github.com/pierrre/gotestcover` - `github.com/tsg/go-daemon` - `golang.org/x/tools/cmd/goimports` - `github.com/elastic/go-licenser` ## Why is it important? The tools are required to run `make check` on the CI.
What does this PR do?
This PR adds a new file
tools/tools.go
to list the tools we need during checking, building and packaging Beats. This is the suggested approach to list tool dependencies: https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-moduleThe following tools are added:
github.com/magefile/mage
github.com/pierrre/gotestcover
github.com/tsg/go-daemon
golang.org/x/tools/cmd/goimports
github.com/elastic/go-licenser
Why is it important?
The tools are required to run
make check
on the CI.Checklist