hanwen / go-mtpfs

Mount MTP devices over FUSE
Other
680 stars 85 forks source link

Build is broken on master #138

Closed mvdan closed 5 years ago

mvdan commented 5 years ago
$ go version
go version devel +8a317ebc0f Thu Aug 1 02:15:18 2019 +0000 linux/amd64
$ export GO111MODULE=on
$ go env GOMOD
/dev/null
$ go get github.com/hanwen/go-mtpfs
go: finding github.com/hanwen/go-mtpfs latest
go: finding github.com/hanwen/usb latest
go: downloading golang.org/x/sys v0.0.0-20180830151530-49385e6e1522
go: extracting golang.org/x/sys v0.0.0-20180830151530-49385e6e1522
build github.com/hanwen/go-mtpfs: cannot load github.com/hanwen/go-fuse/fs: module github.com/hanwen/go-fuse@latest (v1.0.0) found, but does not contain package github.com/hanwen/go-fuse/fs
$ go get github.com/hanwen/go-mtpfs github.com/hanwen/go-fuse@master
go: finding github.com/hanwen/go-fuse master
go: finding github.com/hanwen/go-mtpfs latest
go: finding github.com/hanwen/usb latest
# github.com/hanwen/usb
cgo-gcc-prolog: In function ‘_cgo_afe072e410cc_Cfunc_libusb_set_debug’:
cgo-gcc-prolog:662:2: warning: ‘libusb_set_debug’ is deprecated: Use libusb_set_option instead [-Wdeprecated-declarations]
In file included from go/pkg/mod/github.com/hanwen/usb@v0.0.0-20141217151552-69aee4530ac7/usb.go:8:
/usr/include/libusb-1.0/libusb.h:1300:18: note: declared here
 1300 | void LIBUSB_CALL libusb_set_debug(libusb_context *ctx, int level);
      |                  ^~~~~~~~~~~~~~~~
# github.com/hanwen/go-mtpfs
go/pkg/mod/github.com/hanwen/go-mtpfs@v0.0.0-20190428175049-15e02c23ec6c/main.go:76:3: unknown field 'DefaultPermissions' in struct literal of type "github.com/hanwen/go-fuse/fs".Options

As you can see, the default build is broken, and even when I manually use master from go-fuse, the build is still broken.

I think the easy fix would be to use a go.mod, so that all users (under modules, which is a default in the upcoming 1.13) see the same versions of all dependencies.

hanwen commented 5 years ago

thanks, should be fixed now.

mvdan commented 5 years ago

Why not add a go.mod? Until you do that, there likely will be many more breakages in the future, because builds aren't reproducible.