-
Notifications
You must be signed in to change notification settings - Fork 1k
[feature request]: add concept of a devDependency #1572
Comments
Something that I (and perhaps others) have done in the past is to import the package in a silly way, to make dependency management tools pull it. For example, import all the linters (even if they are main packages) in a Go file that will never be built, e.g. behind an "ignore" build tag. |
Interesting. A bit hackish, but certainly a solution. It would be great though if dep had proper support for it. |
Very early designs separated out the idea of a "dev dependency" explicitly, but it made less sense as time went on: |
Hmm .. definitely better than the build tag hack. But the fact that there is no proper way to install and run the binary is bit of a bother. Installing I think dep should atleast expose a way to build binaries from packages installed through And lastly, a way to run those binaries. Something like Until then, doing a simple |
This is filler for "it's a long story, and i don't have time to write it out right now."
It's out of scope for dep to directly perform compilation. Not because i don't think the use cases are important, but because it steps too much into territory of things the go toolchain already does. Adding support for it, while certainly convenient, makes the already-very-difficult task of navigating the transition into the toolchain more difficult. |
Understood. dep need not perform the compilation. IIUC once its integrated as part of the toolchain, this would be simpler to tackle ? As long as the toolchain as a whole is able to do this some day, I am good. Thanks for all your work ! |
Yes, very much simpler to tackle sane workflows around this once it's clear what exactly the new toolchain will look like. thanks for understanding! |
Currently, I have the linter flow in my pipeline. Therefore, I need to install
github.com/golang/lint/golint
separately because the code does not depend on it, but still it is needed as a dev dependency.It would be great if it could be managed by
dep
so that I don't have to use a separatego get
command to do extra stuff.P.S. - Apologies if this is already being worked on. I searched the issue but could not find anything like this. I think this is a common enough use case, so I am wondering how is this tackled by others ?
The text was updated successfully, but these errors were encountered: