<p dir="ltr">Hmm, no, you're right... Godeps will probably report your dev branch. Hmph.</p>
<div class="gmail_quote">On Aug 20, 2014 8:42 PM, "Nate Finch" <<a href="mailto:nate.finch@canonical.com">nate.finch@canonical.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p dir="ltr">You shouldn't have a failing test, you just need to update dependencies.tsv to 've correct before running tests... Which you'd need to do anyway because you changed the deps.</p>
<p dir="ltr">I don't know why Ian's godeps is broken... </p>
<div class="gmail_quote">On Aug 20, 2014 8:37 PM, "Tim Penhey" <<a href="mailto:tim.penhey@canonical.com" target="_blank">tim.penhey@canonical.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
A while back I added some useful make targets:<br>
<br>
if the env var `JUJU_MAKE_GODEPS` is "true", then<br>
<br>
make godeps<br>
<br>
runs the godeps -u, and also makes sure it is run before build and check.<br>
<br>
I tend to use this.<br>
<br>
Also, if you are working on integrating changes in other branches that<br>
aren't merged, you'll always have a failing test now, no?<br>
<br>
Tim<br>
<br>
On 21/08/14 12:33, Ian Booth wrote:<br>
> Ah yes godeps -t ./... fails the same way.<br>
> But I never run that.<br>
><br>
> I just run godeps -u dependencies.tsv<br>
> to update the revs of the imported libs as I switch juju-core branches.<br>
><br>
><br>
> On 21/08/14 10:30, Nate Finch wrote:<br>
>> And running godeps -t ./... Didn't give the same error?<br>
>> On Aug 20, 2014 8:26 PM, "Ian Booth" <<a href="mailto:ian.booth@canonical.com" target="_blank">ian.booth@canonical.com</a>> wrote:<br>
>><br>
>>> Don't think so<br>
>>><br>
>>> ian@wallyworld:~$ which godeps<br>
>>> /home/ian/juju/go/bin/godeps<br>
>>><br>
>>> ian@wallyworld:~$ ls -l `which godeps`<br>
>>> -rwxrwxr-x 1 ian ian 4821160 Aug 15 19:12 /home/ian/juju/go/bin/godeps<br>
>>><br>
>>><br>
>>><br>
>>> On 21/08/14 10:20, Nate Finch wrote:<br>
>>>> All the test does is run godeps -t ./... It looks for godeps in the path<br>
>>>> first and then looks in gopath/bin. Do you maybe have a version in your<br>
>>>> path that is old?<br>
>>>> On Aug 20, 2014 8:15 PM, "Ian Booth" <<a href="mailto:ian.booth@canonical.com" target="_blank">ian.booth@canonical.com</a>> wrote:<br>
>>>><br>
>>>>> I run godeps all the time as I switch between 1.20 and master. It Just<br>
>>>>> Works.<br>
>>>>><br>
>>>>> On 21/08/14 10:12, Nate Finch wrote:<br>
>>>>>> What happens when you run godeps normally?<br>
>>>>>><br>
>>>>>> It should ignore the std lib stuff, but I don't actually know how<br>
>>> that's<br>
>>>>>> implemented.<br>
>>>>>> On Aug 20, 2014 8:02 PM, "Ian Booth" <<a href="mailto:ian.booth@canonical.com" target="_blank">ian.booth@canonical.com</a>> wrote:<br>
>>>>>><br>
>>>>>>> Hmmmm. The test fails for me.<br>
>>>>>>><br>
>>>>>>><br>
>>>>>>> FAIL: dependencies_test.go:42: dependenciesTest.TestGodepsIsRight<br>
>>>>>>><br>
>>>>>>> dependencies_test.go:77:<br>
>>>>>>> ...<br>
>>>>>>> dependencies_test.go:70:<br>
>>>>>>> c.Fatal(string(out))<br>
>>>>>>> ... Error: godeps: no version control system found for<br>
>>>>>>> "/usr/lib/go/src/pkg/bufio"<br>
>>>>>>> godeps: no version control system found for<br>
>>> "/usr/lib/go/src/pkg/bytes"<br>
>>>>>>> godeps: no version control system found for<br>
>>> "/usr/lib/go/src/pkg/errors"<br>
>>>>>>> godeps: no version control system found for "/usr/lib/go/src/pkg/io"<br>
>>>>>>> godeps: no version control system found for "/usr/lib/go/src/pkg/sync"<br>
>>>>>>> godeps: no version control system found for<br>
>>>>>>> "/usr/lib/go/src/pkg/sync/atomic"<br>
>>>>>>> ...<br>
>>>>>>> ...<br>
>>>>>>><br>
>>>>>>><br>
>>>>>>> On 21/08/14 05:18, Nate Finch wrote:<br>
>>>>>>>> In an effort to make sure that dependencies.tsv is actually correct,<br>
>>>>> the<br>
>>>>>>>> tests in <a href="http://github.com/juju/juju" target="_blank">github.com/juju/juju</a> now run godeps -t ./... and compare<br>
>>> its<br>
>>>>>>>> output to dependencies.tsv. The test looks for godeps first in the<br>
>>>>>>> $PATH,<br>
>>>>>>>> and then in the first $GOPATH/bin. If it is not found, it currently<br>
>>>>>>> skips<br>
>>>>>>>> the test (because CI doesn't have godeps when it runs the tests).<br>
>>>>>>>> Eventually I'd like to make the test not skippable, since anyone<br>
>>>>> running<br>
>>>>>>>> the tests (except CI) needs godeps anyway... but to get this in<br>
>>> sooner<br>
>>>>>>>> rather than later, I think it's ok to let it be skipped.<br>
>>>>>>>><br>
>>>>>>>> Note that in submitting the PR, I actually had to fix<br>
>>> dependencies.tsv<br>
>>>>> to<br>
>>>>>>>> get the test to pass, because it was wrong.... which is exactly why<br>
>>>>> this<br>
>>>>>>>> test exists.<br>
>>>>>>>><br>
>>>>>>>> You can now run go test from <a href="http://github.com/juju/juju" target="_blank">github.com/juju/juju</a> and it'll tell you<br>
>>>>> if<br>
>>>>>>>> something's wonky with dependencies.tsv... it'll tell you if there<br>
>>> are<br>
>>>>>>>> entries in it that aren't needed, it'll tell you if you're missing<br>
>>>>>>> entries<br>
>>>>>>>> that should be in it, and it'll tell you if one of your branches is<br>
>>> on<br>
>>>>>>> the<br>
>>>>>>>> wrong commit.<br>
>>>>>>>><br>
>>>>>>>> *Note:* this means you can't just willy-nilly append your latest<br>
>>>>>>> dependency<br>
>>>>>>>> to dependencies.tsv. They need to be in alphabetical order. The<br>
>>>>> easiest<br>
>>>>>>>> way to do that is just to run godeps -t ./... > dependencies.tsv from<br>
>>>>>>>> <a href="http://github.com/juju/juju" target="_blank">github.com/juju/juju</a>. That'll produce the right output. Obviously,<br>
>>>>>>> check<br>
>>>>>>>> the diff to make sure the changes it produces are the ones you<br>
>>> expect.<br>
>>>>>>>><br>
>>>>>>>> This also means that we need to ensure godeps produces the right<br>
>>> output<br>
>>>>>>> on<br>
>>>>>>>> all OSes. If you have a dependency that exists only in an<br>
>>> OS-specific<br>
>>>>>>>> file, the godeps test will fail on OSes other than that one (e.g. if<br>
>>>>>>>> there's a dependency in an _windows.go file, the test will fail on<br>
>>>>> linux,<br>
>>>>>>>> because godeps doesn't see the windows dependencies). To fix this,<br>
>>> the<br>
>>>>>>>> easiest thing to do is import the same library in an OS-agnostic<br>
>>> file,<br>
>>>>>>> and<br>
>>>>>>>> give it a name of underscore, which will prevent the unused package<br>
>>>>>>> error,<br>
>>>>>>>> thusly: _ "<a href="http://foo.com/my/win/lib" target="_blank">foo.com/my/win/lib</a>"<br>
>>>>>>>><br>
>>>>>>>> -Nate<br>
>>>>>>>><br>
>>>>>>>><br>
>>>>>>>><br>
>>>>>>><br>
>>>>>>> --<br>
>>>>>>> Juju-dev mailing list<br>
>>>>>>> <a href="mailto:Juju-dev@lists.ubuntu.com" target="_blank">Juju-dev@lists.ubuntu.com</a><br>
>>>>>>> Modify settings or unsubscribe at:<br>
>>>>>>> <a href="https://lists.ubuntu.com/mailman/listinfo/juju-dev" target="_blank">https://lists.ubuntu.com/mailman/listinfo/juju-dev</a><br>
>>>>>>><br>
>>>>>><br>
>>>>><br>
>>>><br>
>>><br>
>><br>
><br>
<br>
</blockquote></div>
</blockquote></div>