From 94757277bc34451b908bdc10cf00da02f272d5a9 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sun, 1 May 2022 12:36:39 +0100 Subject: [PATCH] build: fix go mod tidy removing golang.org/x/mobile dependency Before this running `go mod tidy` caused the build to break because it removed the dependency on golang.org/x/mobile and a command line tool from this package is needed for the build. This adds an explicit dependency which will mean the tool is always present. --- go.mod | 1 + librclone/gomobile/gomobile.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/go.mod b/go.mod index e5d66ff5b..21c8d1363 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,7 @@ require ( github.com/golang-jwt/jwt/v4 v4.1.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/google/go-querystring v1.1.0 // indirect + golang.org/x/mobile v0.0.0-20220414153400-ce6a79cf6a13 golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect ) diff --git a/librclone/gomobile/gomobile.go b/librclone/gomobile/gomobile.go index 90bfd033e..cc899e43c 100644 --- a/librclone/gomobile/gomobile.go +++ b/librclone/gomobile/gomobile.go @@ -6,6 +6,8 @@ import ( _ "github.com/rclone/rclone/backend/all" // import all backends _ "github.com/rclone/rclone/lib/plugin" // import plugins + + _ "golang.org/x/mobile/event/key" // make go.mod add this as a dependency ) // RcloneInitialize initializes rclone as a library