<div dir="ltr">In an effort to make sure that dependencies.tsv is actually correct, the tests in <a href="http://github.com/juju/juju">github.com/juju/juju</a> now run <font face="courier new, monospace"><span style="background-color:rgb(238,238,238)">godeps -t ./...</span> </font>and compare its output to dependencies.tsv.  The test looks for godeps first in the $PATH, and then in the first $GOPATH/bin.  If it is not found, it currently skips the test (because CI doesn't have godeps when it runs the tests).  Eventually I'd like to make the test not skippable, since anyone running the tests (except CI) needs godeps anyway... but to get this in sooner rather than later, I think it's ok to let it be skipped.<div>
<br></div><div>Note that in submitting the PR, I actually had to fix dependencies.tsv to get the test to pass, because it was wrong.... which is exactly why this test exists.</div><div><br></div><div>You can now run <font face="courier new, monospace" style="background-color:rgb(238,238,238)">go test</font> from <a href="http://github.com/juju/juju">github.com/juju/juju</a> and it'll tell you if something's wonky with dependencies.tsv... it'll tell you if there are entries in it that aren't needed, it'll tell you if you're missing entries that should be in it, and it'll tell you if one of your branches is on the wrong commit.</div>
<div><br></div><div><b>Note:</b> this means you can't just willy-nilly append your latest dependency to dependencies.tsv.  They need to be in alphabetical order.  The easiest way to do that is just to run <font face="courier new, monospace" style="background-color:rgb(238,238,238)">godeps -t ./... > dependencies.tsv</font> from <a href="http://github.com/juju/juju">github.com/juju/juju</a>.  That'll produce the right output.  Obviously, check the diff to make sure the changes it produces are the ones you expect.</div>
<div><br></div><div>This also means that we need to ensure godeps produces the right output on all OSes.  If you have a dependency that exists only in an OS-specific file, the godeps test will fail on OSes other than that one (e.g. if there's a dependency in an _windows.go file, the test will fail on linux, because godeps doesn't see the windows dependencies).  To fix this, the easiest thing to do is import the same library in an OS-agnostic file, and give it a name of underscore, which will prevent the unused package error, thusly:  <font face="courier new, monospace" style="background-color:rgb(238,238,238)">_ "<a href="http://foo.com/my/win/lib">foo.com/my/win/lib</a>"</font></div>
<div><br></div><div><div>-Nate</div><div><br></div></div></div>