[pkg-go] fsnotify

Anthony Fok foka at debian.org
Thu Apr 21 02:58:18 UTC 2016


Hi Tincho!

On Thu, Apr 21, 2016 at 9:21 AM, Martín Ferrari <tincho at tincho.org> wrote:
> Hi all,
>
> Starting from a build failure in prometheus, I identified a bug in
> fsnotify, which then propagated to golang itself and x/sys.
>
> This has now been fixed (for arm64, powerpc still pending), and I want
> to upload the new version that includes the fix.

Same here, but for hugo, see https://github.com/spf13/hugo/issues/1772
and https://github.com/fsnotify/fsnotify/issues/112.

> The problem is that fsnotify went through two important changes recently:
>
> 1. They changed the organisation name in github from go-fsnotify to
> fsnotify.
> 2. They provide versioned stable API namespace using gopkg.in/fsnotify.v1.
>
> So, now I don't know what to do with the package naming. Currently it
> reflects the go-fsnotify namespace, and still carries the old
> golang-fsnotify transitional package.
>
> Prometheus -for example- imports gopkg.in/fsnotify.v1, but the fsnotify
> tests actually import github.com/fsnotify/fsnotify. Making things more
> confusing.
>
> I see two options:
>
> 1. Transition to the new github org name
> (golang-github-fsnotify-fsnotify-dev), adding new
> breaks/replaces/provides, and also add a virtual provides for
> golang-gopkg-fsnotify.v1.
>
> 2. Transition instead to golang-gopkg-fsnotify.v1, making it B/R/P
> golang-github-go-fsnotify-fsnotify-dev, and provide
> golang-github-fsnotify-fsnotify-dev for packages that use the
> non-versioned namespace.
>
>
> Option 1 would probably give trouble down the line if we ever want to
> transition to 2, due to support of versioned B/R/P on virtual packages.
> (not sure about this).
>
> I think option 2 is the way to go, since that will free us from future
> namespace stupidity, provides an stable API, and is consistent with
> other packages using gopkg (yaml, check).
>
> What do you guys think?

I would go with Option 1.  Upstream, i.e., Nathan Youngman, is actually
trying to move away from gopkg.in, so the recommended import path is
"github.com/fsnotify/fsnotify" as of February 2016, and a few dependent
projects have already follow suit, see:

    https://github.com/fsnotify/fsnotify/issues/108
    (Move away from gopkg.in and rename organization)

and

    https://github.com/fsnotify/fsnotify/issues/118
    (gopkg.in very unreliable)

So, following @shurcooL's example, I went ahead and updated the
fsnotify import path for spf13/viper and spf13/hugo too.  I recommend
that you do the same for prometheus.

That said, since you already have 1.3.0-1 packaged, I think the
transition to golang-github-fsnotify-fsnotify-dev can happen in
1.3.0-2 instead.  It is up to you.  :-)  If/when you do, please update
debian/copyright and debian/watch too, and perhaps bump
Standards-Version to 3.9.8 (though Lintian hasn't caught up yet), and
perhaps update Vcs-Git to
https://anonscm.debian.org/git/pkg-go/packages/golang-fsnotify.git
too.  :-)

Cheers,
Anthony



More information about the Pkg-go-maintainers mailing list