From acd06c82fac6fe2b284603a8030e5e24282f3249 Mon Sep 17 00:00:00 2001 From: Edward Muller Date: Wed, 1 Jun 2016 21:10:29 -0700 Subject: [PATCH] Enable vendor/ for go1.7 & Godep workspace -> vendor/ go1.7beta1 is out. Time to make sure things work with go1.7+ Once go1.8 is released support for Godep workspaces (./Godeps/_workspace) will be removed. --- Changelog.md | 6 ++++++ Godeps/Godeps.json | 4 ++-- Godeps/_workspace/.gitignore | 2 -- diff.go | 2 +- main.go | 2 ++ msg.go | 2 +- restore.go | 2 +- rewrite.go | 2 +- save.go | 2 +- vcs.go | 2 +- {Godeps/_workspace/src => vendor}/github.com/kr/fs/LICENSE | 0 {Godeps/_workspace/src => vendor}/github.com/kr/fs/Readme | 0 .../src => vendor}/github.com/kr/fs/filesystem.go | 0 {Godeps/_workspace/src => vendor}/github.com/kr/fs/walk.go | 0 .../src => vendor}/github.com/kr/pretty/.gitignore | 0 .../_workspace/src => vendor}/github.com/kr/pretty/License | 0 .../_workspace/src => vendor}/github.com/kr/pretty/Readme | 0 .../_workspace/src => vendor}/github.com/kr/pretty/diff.go | 0 .../src => vendor}/github.com/kr/pretty/formatter.go | 2 +- .../src => vendor}/github.com/kr/pretty/pretty.go | 0 .../_workspace/src => vendor}/github.com/kr/pretty/zero.go | 0 .../_workspace/src => vendor}/github.com/kr/text/License | 0 {Godeps/_workspace/src => vendor}/github.com/kr/text/Readme | 0 {Godeps/_workspace/src => vendor}/github.com/kr/text/doc.go | 0 .../_workspace/src => vendor}/github.com/kr/text/indent.go | 0 .../_workspace/src => vendor}/github.com/kr/text/wrap.go | 2 +- .../src => vendor}/github.com/pmezard/go-difflib/LICENSE | 0 .../github.com/pmezard/go-difflib/difflib/difflib.go | 0 .../_workspace/src => vendor}/golang.org/x/tools/LICENSE | 0 .../_workspace/src => vendor}/golang.org/x/tools/PATENTS | 0 .../src => vendor}/golang.org/x/tools/go/vcs/discovery.go | 0 .../src => vendor}/golang.org/x/tools/go/vcs/env.go | 0 .../src => vendor}/golang.org/x/tools/go/vcs/http.go | 0 .../src => vendor}/golang.org/x/tools/go/vcs/vcs.go | 0 version.go | 2 +- 35 files changed, 19 insertions(+), 13 deletions(-) delete mode 100644 Godeps/_workspace/.gitignore rename {Godeps/_workspace/src => vendor}/github.com/kr/fs/LICENSE (100%) rename {Godeps/_workspace/src => vendor}/github.com/kr/fs/Readme (100%) rename {Godeps/_workspace/src => vendor}/github.com/kr/fs/filesystem.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/kr/fs/walk.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/kr/pretty/.gitignore (100%) rename {Godeps/_workspace/src => vendor}/github.com/kr/pretty/License (100%) rename {Godeps/_workspace/src => vendor}/github.com/kr/pretty/Readme (100%) rename {Godeps/_workspace/src => vendor}/github.com/kr/pretty/diff.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/kr/pretty/formatter.go (99%) rename {Godeps/_workspace/src => vendor}/github.com/kr/pretty/pretty.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/kr/pretty/zero.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/kr/text/License (100%) rename {Godeps/_workspace/src => vendor}/github.com/kr/text/Readme (100%) rename {Godeps/_workspace/src => vendor}/github.com/kr/text/doc.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/kr/text/indent.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/kr/text/wrap.go (97%) mode change 100644 => 100755 rename {Godeps/_workspace/src => vendor}/github.com/pmezard/go-difflib/LICENSE (100%) rename {Godeps/_workspace/src => vendor}/github.com/pmezard/go-difflib/difflib/difflib.go (100%) rename {Godeps/_workspace/src => vendor}/golang.org/x/tools/LICENSE (100%) rename {Godeps/_workspace/src => vendor}/golang.org/x/tools/PATENTS (100%) rename {Godeps/_workspace/src => vendor}/golang.org/x/tools/go/vcs/discovery.go (100%) rename {Godeps/_workspace/src => vendor}/golang.org/x/tools/go/vcs/env.go (100%) rename {Godeps/_workspace/src => vendor}/golang.org/x/tools/go/vcs/http.go (100%) rename {Godeps/_workspace/src => vendor}/golang.org/x/tools/go/vcs/vcs.go (100%) diff --git a/Changelog.md b/Changelog.md index 2a70397..6cadb4e 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,9 @@ +#v74 (2016/06/01) + +* Enable vendor/ on go1.7 +* No longer use a godep workspace, use vendor/ (yay!) +* Notify that support for Godep workspaces will be removed once go1.8 ships + #v73 (2016/05/31) * Fix permission changes on Windows via @alexbrand. Closes #481. diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 9bd89be..fdb8c69 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1,7 +1,7 @@ { "ImportPath": "github.com/tools/godep", - "GoVersion": "go1.6", - "GodepVersion": "v63", + "GoVersion": "go1.7", + "GodepVersion": "v74", "Deps": [ { "ImportPath": "github.com/kr/fs", diff --git a/Godeps/_workspace/.gitignore b/Godeps/_workspace/.gitignore deleted file mode 100644 index f037d68..0000000 --- a/Godeps/_workspace/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/pkg -/bin diff --git a/diff.go b/diff.go index 6a5beff..c43faa4 100644 --- a/diff.go +++ b/diff.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - "github.com/tools/godep/Godeps/_workspace/src/github.com/pmezard/go-difflib/difflib" + "github.com/pmezard/go-difflib/difflib" ) var cmdDiff = &Command{ diff --git a/main.go b/main.go index 765f855..b1abebe 100644 --- a/main.go +++ b/main.go @@ -77,11 +77,13 @@ func determineVendor(v string) bool { go15ve := os.Getenv("GO15VENDOREXPERIMENT") ev := (v == "go1.5" && go15ve == "1") || (v == "go1.6" && go15ve != "0") || + (v == "go1.7") || (strings.HasPrefix(v, "devel") && go15ve != "0") ws := filepath.Join("Godeps", "_workspace") s, err := os.Stat(ws) if err == nil && s.IsDir() { + log.Printf("WARNING: Godep workspaces (./Godeps/_workspace) are deprecated and support for them will be removed when go1.8 is released.") if ev { log.Printf("WARNING: Go version (%s) & $GO15VENDOREXPERIMENT=%s wants to enable the vendor experiment, but disabling because a Godep workspace (%s) exists\n", v, go15ve, ws) } diff --git a/msg.go b/msg.go index 1ddbd63..4a60378 100644 --- a/msg.go +++ b/msg.go @@ -4,7 +4,7 @@ import ( "fmt" "log" - "github.com/tools/godep/Godeps/_workspace/src/github.com/kr/pretty" + "github.com/kr/pretty" ) func debugln(a ...interface{}) (int, error) { diff --git a/restore.go b/restore.go index 82e306b..9de53e0 100644 --- a/restore.go +++ b/restore.go @@ -7,7 +7,7 @@ import ( "os" "path/filepath" - "github.com/tools/godep/Godeps/_workspace/src/golang.org/x/tools/go/vcs" + "golang.org/x/tools/go/vcs" ) var cmdRestore = &Command{ diff --git a/rewrite.go b/rewrite.go index fb70c15..c4c8594 100644 --- a/rewrite.go +++ b/rewrite.go @@ -13,7 +13,7 @@ import ( "go/printer" "go/token" - "github.com/tools/godep/Godeps/_workspace/src/github.com/kr/fs" + "github.com/kr/fs" ) // rewrite visits the go files in pkgs, plus all go files diff --git a/save.go b/save.go index 2bcd3e6..ff0891a 100644 --- a/save.go +++ b/save.go @@ -14,7 +14,7 @@ import ( "regexp" "strings" - "github.com/tools/godep/Godeps/_workspace/src/github.com/kr/fs" + "github.com/kr/fs" ) var cmdSave = &Command{ diff --git a/vcs.go b/vcs.go index 655c507..05d74fd 100644 --- a/vcs.go +++ b/vcs.go @@ -9,7 +9,7 @@ import ( "path/filepath" "strings" - "github.com/tools/godep/Godeps/_workspace/src/golang.org/x/tools/go/vcs" + "golang.org/x/tools/go/vcs" ) // VCS represents a version control system. diff --git a/Godeps/_workspace/src/github.com/kr/fs/LICENSE b/vendor/github.com/kr/fs/LICENSE similarity index 100% rename from Godeps/_workspace/src/github.com/kr/fs/LICENSE rename to vendor/github.com/kr/fs/LICENSE diff --git a/Godeps/_workspace/src/github.com/kr/fs/Readme b/vendor/github.com/kr/fs/Readme similarity index 100% rename from Godeps/_workspace/src/github.com/kr/fs/Readme rename to vendor/github.com/kr/fs/Readme diff --git a/Godeps/_workspace/src/github.com/kr/fs/filesystem.go b/vendor/github.com/kr/fs/filesystem.go similarity index 100% rename from Godeps/_workspace/src/github.com/kr/fs/filesystem.go rename to vendor/github.com/kr/fs/filesystem.go diff --git a/Godeps/_workspace/src/github.com/kr/fs/walk.go b/vendor/github.com/kr/fs/walk.go similarity index 100% rename from Godeps/_workspace/src/github.com/kr/fs/walk.go rename to vendor/github.com/kr/fs/walk.go diff --git a/Godeps/_workspace/src/github.com/kr/pretty/.gitignore b/vendor/github.com/kr/pretty/.gitignore similarity index 100% rename from Godeps/_workspace/src/github.com/kr/pretty/.gitignore rename to vendor/github.com/kr/pretty/.gitignore diff --git a/Godeps/_workspace/src/github.com/kr/pretty/License b/vendor/github.com/kr/pretty/License similarity index 100% rename from Godeps/_workspace/src/github.com/kr/pretty/License rename to vendor/github.com/kr/pretty/License diff --git a/Godeps/_workspace/src/github.com/kr/pretty/Readme b/vendor/github.com/kr/pretty/Readme similarity index 100% rename from Godeps/_workspace/src/github.com/kr/pretty/Readme rename to vendor/github.com/kr/pretty/Readme diff --git a/Godeps/_workspace/src/github.com/kr/pretty/diff.go b/vendor/github.com/kr/pretty/diff.go similarity index 100% rename from Godeps/_workspace/src/github.com/kr/pretty/diff.go rename to vendor/github.com/kr/pretty/diff.go diff --git a/Godeps/_workspace/src/github.com/kr/pretty/formatter.go b/vendor/github.com/kr/pretty/formatter.go similarity index 99% rename from Godeps/_workspace/src/github.com/kr/pretty/formatter.go rename to vendor/github.com/kr/pretty/formatter.go index c991dd9..8dacda2 100644 --- a/Godeps/_workspace/src/github.com/kr/pretty/formatter.go +++ b/vendor/github.com/kr/pretty/formatter.go @@ -7,7 +7,7 @@ import ( "strconv" "text/tabwriter" - "github.com/tools/godep/Godeps/_workspace/src/github.com/kr/text" + "github.com/kr/text" ) const ( diff --git a/Godeps/_workspace/src/github.com/kr/pretty/pretty.go b/vendor/github.com/kr/pretty/pretty.go similarity index 100% rename from Godeps/_workspace/src/github.com/kr/pretty/pretty.go rename to vendor/github.com/kr/pretty/pretty.go diff --git a/Godeps/_workspace/src/github.com/kr/pretty/zero.go b/vendor/github.com/kr/pretty/zero.go similarity index 100% rename from Godeps/_workspace/src/github.com/kr/pretty/zero.go rename to vendor/github.com/kr/pretty/zero.go diff --git a/Godeps/_workspace/src/github.com/kr/text/License b/vendor/github.com/kr/text/License similarity index 100% rename from Godeps/_workspace/src/github.com/kr/text/License rename to vendor/github.com/kr/text/License diff --git a/Godeps/_workspace/src/github.com/kr/text/Readme b/vendor/github.com/kr/text/Readme similarity index 100% rename from Godeps/_workspace/src/github.com/kr/text/Readme rename to vendor/github.com/kr/text/Readme diff --git a/Godeps/_workspace/src/github.com/kr/text/doc.go b/vendor/github.com/kr/text/doc.go similarity index 100% rename from Godeps/_workspace/src/github.com/kr/text/doc.go rename to vendor/github.com/kr/text/doc.go diff --git a/Godeps/_workspace/src/github.com/kr/text/indent.go b/vendor/github.com/kr/text/indent.go similarity index 100% rename from Godeps/_workspace/src/github.com/kr/text/indent.go rename to vendor/github.com/kr/text/indent.go diff --git a/Godeps/_workspace/src/github.com/kr/text/wrap.go b/vendor/github.com/kr/text/wrap.go old mode 100644 new mode 100755 similarity index 97% rename from Godeps/_workspace/src/github.com/kr/text/wrap.go rename to vendor/github.com/kr/text/wrap.go index 1c85cd2..ca88565 --- a/Godeps/_workspace/src/github.com/kr/text/wrap.go +++ b/vendor/github.com/kr/text/wrap.go @@ -31,7 +31,7 @@ func WrapBytes(b []byte, lim int) []byte { // WrapWords is the low-level line-breaking algorithm, useful if you need more // control over the details of the text wrapping process. For most uses, either -// Wrap or WrapBytes will be sufficient and more convenient. +// Wrap or WrapBytes will be sufficient and more convenient. // // WrapWords splits a list of words into lines with minimal "raggedness", // treating each byte as one unit, accounting for spc units between adjacent diff --git a/Godeps/_workspace/src/github.com/pmezard/go-difflib/LICENSE b/vendor/github.com/pmezard/go-difflib/LICENSE similarity index 100% rename from Godeps/_workspace/src/github.com/pmezard/go-difflib/LICENSE rename to vendor/github.com/pmezard/go-difflib/LICENSE diff --git a/Godeps/_workspace/src/github.com/pmezard/go-difflib/difflib/difflib.go b/vendor/github.com/pmezard/go-difflib/difflib/difflib.go similarity index 100% rename from Godeps/_workspace/src/github.com/pmezard/go-difflib/difflib/difflib.go rename to vendor/github.com/pmezard/go-difflib/difflib/difflib.go diff --git a/Godeps/_workspace/src/golang.org/x/tools/LICENSE b/vendor/golang.org/x/tools/LICENSE similarity index 100% rename from Godeps/_workspace/src/golang.org/x/tools/LICENSE rename to vendor/golang.org/x/tools/LICENSE diff --git a/Godeps/_workspace/src/golang.org/x/tools/PATENTS b/vendor/golang.org/x/tools/PATENTS similarity index 100% rename from Godeps/_workspace/src/golang.org/x/tools/PATENTS rename to vendor/golang.org/x/tools/PATENTS diff --git a/Godeps/_workspace/src/golang.org/x/tools/go/vcs/discovery.go b/vendor/golang.org/x/tools/go/vcs/discovery.go similarity index 100% rename from Godeps/_workspace/src/golang.org/x/tools/go/vcs/discovery.go rename to vendor/golang.org/x/tools/go/vcs/discovery.go diff --git a/Godeps/_workspace/src/golang.org/x/tools/go/vcs/env.go b/vendor/golang.org/x/tools/go/vcs/env.go similarity index 100% rename from Godeps/_workspace/src/golang.org/x/tools/go/vcs/env.go rename to vendor/golang.org/x/tools/go/vcs/env.go diff --git a/Godeps/_workspace/src/golang.org/x/tools/go/vcs/http.go b/vendor/golang.org/x/tools/go/vcs/http.go similarity index 100% rename from Godeps/_workspace/src/golang.org/x/tools/go/vcs/http.go rename to vendor/golang.org/x/tools/go/vcs/http.go diff --git a/Godeps/_workspace/src/golang.org/x/tools/go/vcs/vcs.go b/vendor/golang.org/x/tools/go/vcs/vcs.go similarity index 100% rename from Godeps/_workspace/src/golang.org/x/tools/go/vcs/vcs.go rename to vendor/golang.org/x/tools/go/vcs/vcs.go diff --git a/version.go b/version.go index 77d5058..24bcaff 100644 --- a/version.go +++ b/version.go @@ -8,7 +8,7 @@ import ( "strings" ) -const version = 73 +const version = 74 var cmdVersion = &Command{ Name: "version",