Open Trickx opened 7 years ago
Yes, I've been starting to clean things up. Unfortunately, the project started without using govendor
.
However, on the subject of weather to include vendor code in the repo or not, I am in favor of keeping copies of the vendored dependencies locally. This is why I intentionally skipped that optional step.
Govendor supports definition of specific versions of a dependency. Govendors goals is to keep track of the required dependencies. If we would copy all dependencies (including their sources) into this repository, then there is no need for govendor at all anymore. Bugfixes in dependencies would get lost. Govendor provides all required tools to fetch required dependencies without creating overhead and redundancy here. Don't get me wrong. I appreciate your efforts, but we should clean up this repository from other projects code.
There are many reasons that including vendor dependencies is a good idea. It is a common practice among almost every project I work on.
govendor sync
.Disk space is cheap, and once you sync the initial repo there's minimal changes to vendoring. The overhead of doing this is not an issue.
I would however like to do a history purge to get rid of the duplicate tree of stuff before I implemented govendor here. However this will require a bunch of git history maintenance that I don't think can be done in a pull request, and will require someone with the ability to force-push to do.
Does anyone have experience with using govendor? Although I'm in the gopath, I get the error message: Package "/home/jens/share/Produkte/SmartPi/github/SmartPi" not a go package or not in GOPATH My GOPATH: declare -x GOPATH="/home/jens/share/Produkte/SmartPi/github/SmartPi/"
I do, the way the build system currently works is somewhat broken, and the GOPATH is incorrect for managing govendor.
What you want is something like this:
GOPATH="/home/jens/go"
And the source checked out to /home/jens/go/src/github.com/nDenerserve/SmartPi/
Then you can run govendor from that directory.
If you take a look at the build instructions here you can see a more typical Go build setup.
I can send a PR to update the makefile and build instructions that will make govendor easier to work with.
May I raise a simple question? In order to build smartpi, shall govendor being used to pull latest sources of dependencies or the sources distributed within the vendor folder of this repository? Having both in place does not seem to be logic to me. Govendor supports specifcation of a specific version or revision to fetch.
A quicl start is found here: https://github.com/kardianos/govendor
Dear Contributors/Maintainers,
the SmartPi rporsitory seems to be messed up. At the time writing these lines, there are log files (e.g. "csv.csv"), as well as dependencies within the repository.
May I ask all of you to keep the repository clean?
Additionally, I would like to cite a beginners tutorial for govendor, available at https://gocodecloud.com/blog/2016/03/29/go-vendoring-beginner-tutorial/
Thanks in advance, TriCX