Does glide support the notion of "my project requires stringer", please go install it for me?
See https://github.com/constabulary/gb/issues/100 for a similar feature request.
It does not have that feature at the moment. Currently, something like a Makefile is used for that. But, make is not cross platform.
Glide projects are inside the GOPATH meaning installed binaries are inside GOPATH/bin. Do you think versioning needs to be apart of fetching binaries like this? If so, how does that work in a multi-project world where there could be different versions?
Toying with the idea of a bin or _bin directory inside a project feels like a hack. Not to say it's not a good solution (you see it in other programming language projects).
Because this can be used by go:generate we should figure this out.
I think having a bin directory inside of vendor is the way to go; it's going to require that users add ./vendor/bin to their PATH, but it's the path of least friction and the only reasonable way to proceed
@tamird the problem with that is the vendor/ directory is a part of the go tool. Adding a _bin_ directory to that would be to deviate from the built in behavior.
I thought the go tool was only aware of vendor/ to the extent that it will look for imports in there, but never writes anything into that directory. What's the harm, then, in adding vendor/bin?
I suppose there is a slight danger of conflict with a package that has an import path starting with bin/, but that seems unlikely, and can be alleviated with the use of a different top-level directory (after appropriate bikeshedding).
What about having a scripts declaration like npm and then do a glide run errcheck and I suppose it would look like this
package: github.com/Masterminds/glide
scripts:
- name: "errcheck"
cmd: "go run vendor/github.com/kisielk/errcheck/main.go"
Then you wouldn't need a bin directory and don't need to use makefiles but of course it would be slow running those commands since they need to be compiled and its a bit verbose.
Even if its not used for this use case I think some scripting functionality is necessary for glide and this would be cross platform.
Hulk Smash! :hurtrealbad:
@mattfarina by the way, the readme says that glide installs dependencies with go install, but that doesn't seem to be the case - at least not for subpackages. If glide install would go install each subpackage, that would adequately resolve this issue for me.
@tamird glide install isn't a direct corollary to go install. This is likely part of the confusion. It's more akin to the install commands in other dependency managers.
I'm thinking about this request though.
Most helpful comment
What about having a scripts declaration like npm and then do a
glide run errcheckand I suppose it would look like thisThen you wouldn't need a bin directory and don't need to use makefiles but of course it would be slow running those commands since they need to be compiled and its a bit verbose.
Even if its not used for this use case I think some scripting functionality is necessary for glide and this would be cross platform.
Hulk Smash! :hurtrealbad: