On 8 July 2014 03:23, Gustavo Niemeyer <gust...@niemeyer.net> wrote:
> On Mon, Jul 7, 2014 at 10:49 PM, Gustavo Niemeyer <gust...@niemeyer.net> 
> wrote:
>> On Mon, Jul 7, 2014 at 8:49 PM, David Cheney <david.che...@canonical.com> 
>> wrote:
>>> I don't want to introduce another thing to break CI, we already pull
>>> from github which is bad enough, but going via gopkg.in introduces an
>>> additional point of failure which can further reduce the already
>>> bullet ridden credibility of our CI.
>>
>> Again, gopkg.in sits in a reliable deployment, with a provable track record.
>>
>>> I also don't want to start introducing versioned import paths into
>>> Juju without serious discussion of how to prevent two different
>>> versions of a package transitively.
>>
>>  go list -f '{{range .Deps}}{{printf "%s\n" .}}{{end}}' | grep gopkg.in
>>     | sort -u | sed 's/\.v[0-9]\+$/\.vN/' | uniq -c | sed '/ 1 /d'
>
> A bit faster and more correct (picks subpackages too):
>
> go list -f '{{range .Deps}}{{printf "%s\n" .}}{{end}}'
>     | sed -n  's,\(gopkg.in/.*\.v\)[0-9]\+.*$,\1N,p' | uniq -u -D

go list -f '{{join "\n" .Deps}}'

is slightly more compact. These days, I usually use
my showdeps (code.google.com/p/rog-go/cmd/showdeps)
command for this kind of thing - it's easier to type,
and makes it easy to find testing dependencies too.

FWIW, govers (see launchpad.net/govers) should
work fine for updating versioned import paths.

For instance, running:

    govers gopkg.in/juju/charm.v3

inside github.com/juju/juju will update all import
paths to use juju/charm.v3. More importantly,
it also checks that no package *outside* juju/juju
is using the original version.

Gustavo's little shell script is more comprehensive
in that respect, but doesn't help when a package
first moves to gopkg.in.

  cheers,
    rog, who must really move all his stuff to github some time.

-- 
Juju-dev mailing list
Juju-dev@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev

Reply via email to