-
Notifications
You must be signed in to change notification settings - Fork 4
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
Go modules Dev Dependencies #19
Comments
Another solution: https://github.com/nordicdyno/golang-tools |
Both tools.go and golang-tools have problems, due to being third party systems. They rely on make + bash + awk to parse Go code. That's not particularly maintainable. Nevermind the complexity of setting up a Go project for contribution on native Windows COMSPEC (Command Prompt or PowerShell) environments. I may love the WSL effort, but I don't like having requiring anyone to install WSL when working on my projects. I'm not writing polyglot scripts with tofrodos hacks. Please don't suggest batsh, or worse, Python, as a shim. You might as well just install the tools in a Dockerfile, and always work in Docker. These workflows are heavyweight, compared to regular, built-in You can't simply reuse the go mod path when determining the right path as far as
Another problem with the third party systems is that each change in developer tools would require two different file changes: One to The most reliable system I've come up with so far is a POSIX sh script, like You could in theory automate these things with an insane go:generate setup, or write yet another third party tool. (Which inevitably breaks as the Go language releases new versions.) I might have a try at using Not. Fun. We want the normal |
Yeah me to. Looks like go run @Version is in though, probably could work something out with that |
I am automating the low level You may now use an accio.yaml configuration file to pin your Go developer tools which |
That's cool I'll try it out next time I'm on a go project. |
Go didn't have a concept of devDependencies like node.js does for a long time. They are sort of addressing this problem in a very go-esque way it sounds.
Go modules has something called a tools.go file: cmd/go: clarify best practice for tool dependencies golang/go#25922 (comment)
Details on go module support for vendoring cmd/go: add modvendor sub-command golang/go#27618
Experimental proposal thread: add experimental support for go.tools myitcv/gobin#44
gex: a tool to help manage devDeps: https://github.com/izumin5210/gex
https://github.com/srvc/wraperr: a project using tools.go
https://github.com/izumin5210/grapi: another project using tools.go pattern
https://github.com/oxequa/realize A go task runner
Use modules to install a "dev dependency" for use before or during a build golang/go#29494 Another example of someone asking the same issue
cmd/go: support module-local install/run of tool dependencies golang/go#27653: issue addressing some of the complications with the current solutions, canns the idea of devDeps beyond what's supported.
Go get outside of a module scope for global deps: cmd/go: allow "go get" when outside a module in module mode golang/go#24250
Retool: https://github.com/twitchtv/retool vendoring go bins
go hack https://github.com/rogpeppe/gohack
https://github.com/myitcv/gobin go bin, a proposed solution
https://github.com/myitcv/gobin/wiki/FAQ gobin fan
go 1.12 modules https://tip.golang.org/doc/go1.12#modules
Go tools.go https://github.com/go-modules-by-example/index/blob/master/010_tools/README.md
https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module
https://godoc.org/golang.org/x/tools/cmd/stringer a tool often used as an example
The text was updated successfully, but these errors were encountered: