From fb842c374147e920d6a6324b69d265d396a6ac46 Mon Sep 17 00:00:00 2001 From: Chris Williams Date: Sat, 15 Jul 2017 15:05:59 -0600 Subject: [PATCH 1/6] Enable transitive analysis of other package manager constraints during init --- cmd/dep/init.go | 1 - .../testdata/harness_tests/init/glide/case1/final/Gopkg.lock | 4 ++-- .../init/glide/case3/{testcase.json.ignore => testcase.json} | 0 3 files changed, 2 insertions(+), 3 deletions(-) rename cmd/dep/testdata/harness_tests/init/glide/case3/{testcase.json.ignore => testcase.json} (100%) diff --git a/cmd/dep/init.go b/cmd/dep/init.go index 1afab53d66..a3eaacb689 100644 --- a/cmd/dep/init.go +++ b/cmd/dep/init.go @@ -149,7 +149,6 @@ func (cmd *initCommand) Run(ctx *dep.Ctx, args []string) error { } } - rootAnalyzer.skipTools = true // Don't import external config during solve for now copyLock := *p.Lock // Copy lock before solving. Use this to separate new lock projects from solved lock params := gps.SolveParameters{ diff --git a/cmd/dep/testdata/harness_tests/init/glide/case1/final/Gopkg.lock b/cmd/dep/testdata/harness_tests/init/glide/case1/final/Gopkg.lock index 56f9bb2b7a..774596953e 100644 --- a/cmd/dep/testdata/harness_tests/init/glide/case1/final/Gopkg.lock +++ b/cmd/dep/testdata/harness_tests/init/glide/case1/final/Gopkg.lock @@ -14,8 +14,8 @@ version = "v2.0.0" [solve-meta] - analyzer-name = "dep" + analyzer-name = "dep+import" analyzer-version = 1 - inputs-digest = "c53803413bd0160505cce903e1cba743e0b964088f8cc42a6123f6fe1a0ae9d3" + inputs-digest = "99a6ed2aee05cfb87aaaa6e3907bf31e4610afdda7139893e7c94ddcba626b9e" solver-name = "gps-cdcl" solver-version = 1 diff --git a/cmd/dep/testdata/harness_tests/init/glide/case3/testcase.json.ignore b/cmd/dep/testdata/harness_tests/init/glide/case3/testcase.json similarity index 100% rename from cmd/dep/testdata/harness_tests/init/glide/case3/testcase.json.ignore rename to cmd/dep/testdata/harness_tests/init/glide/case3/testcase.json From d1976e8d5b410e33b16c28c9c0949638b3f965c1 Mon Sep 17 00:00:00 2001 From: Chris Williams Date: Mon, 24 Jul 2017 15:53:04 -0700 Subject: [PATCH 2/6] Test fixes, first new test --- .../harness_tests/init/case4/final/Gopkg.lock | 4 ++-- .../broken-glide-fallback/README.md | 1 + .../broken-glide-fallback/final/Gopkg.lock | 21 +++++++++++++++++++ .../broken-glide-fallback/final/Gopkg.toml | 3 +++ .../broken-glide-fallback/initial/glide.lock | 8 +++++++ .../broken-glide-fallback/initial/glide.yaml | 3 +++ .../broken-glide-fallback/initial/main.go | 16 ++++++++++++++ .../broken-glide-fallback/testcase.json | 11 ++++++++++ .../init/godep/case1/final/Gopkg.lock | 4 ++-- 9 files changed, 67 insertions(+), 4 deletions(-) create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-fallback/README.md create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-fallback/final/Gopkg.lock create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-fallback/final/Gopkg.toml create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-fallback/initial/glide.lock create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-fallback/initial/glide.yaml create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-fallback/initial/main.go create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-fallback/testcase.json diff --git a/cmd/dep/testdata/harness_tests/init/case4/final/Gopkg.lock b/cmd/dep/testdata/harness_tests/init/case4/final/Gopkg.lock index e076e162c8..c35fd6b563 100644 --- a/cmd/dep/testdata/harness_tests/init/case4/final/Gopkg.lock +++ b/cmd/dep/testdata/harness_tests/init/case4/final/Gopkg.lock @@ -14,8 +14,8 @@ version = "v2.0.0" [solve-meta] - analyzer-name = "dep" + analyzer-name = "dep+import" analyzer-version = 1 - inputs-digest = "a6ba2237d28d125b55fc6c86e94e33363f1dfd880d471118d36d7587398c30b4" + inputs-digest = "18c94b4337424aa4cf603a57eb40e0e972e31497d69c71be2bd44792694783e7" solver-name = "gps-cdcl" solver-version = 1 diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-fallback/README.md b/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-fallback/README.md new file mode 100644 index 0000000000..aee04f5491 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-fallback/README.md @@ -0,0 +1 @@ +Test that we will fall back to 2.0.0 if our dependency has a broken glide.yaml in 2.1.0. \ No newline at end of file diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-fallback/final/Gopkg.lock b/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-fallback/final/Gopkg.lock new file mode 100644 index 0000000000..2fef395cac --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-fallback/final/Gopkg.lock @@ -0,0 +1,21 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + name = "github.com/chriswhelix/deptestglide1" + packages = ["."] + revision = "d9c0827097bf188473ebd50c67f1a0daaaeb3b0e" + version = "2.0.0" + +[[projects]] + name = "github.com/sdboyer/deptest" + packages = ["."] + revision = "ff2948a2ac8f538c4ecd55962e919d1e13e74baf" + version = "v1.0.0" + +[solve-meta] + analyzer-name = "dep+import" + analyzer-version = 1 + inputs-digest = "5ab25f1a057c57e9e0044208fd4c6433054d8f83bf2e616bb4e24a34804ba5f2" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-fallback/final/Gopkg.toml b/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-fallback/final/Gopkg.toml new file mode 100644 index 0000000000..71f29bffdb --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-fallback/final/Gopkg.toml @@ -0,0 +1,3 @@ + +[[constraint]] + name = "github.com/chriswhelix/deptestglide1" diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-fallback/initial/glide.lock b/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-fallback/initial/glide.lock new file mode 100644 index 0000000000..8fe9875343 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-fallback/initial/glide.lock @@ -0,0 +1,8 @@ +hash: c8bf500af2e7a1e92799aae67dd2e72a7df372399d6598ea8a759487e990e298 +updated: 2017-07-24T15:42:05.970755966-07:00 +imports: +- name: github.com/chriswhelix/deptestglide1 + version: d9c0827097bf188473ebd50c67f1a0daaaeb3b0e +- name: github.com/sdboyer/deptest + version: ff2948a2ac8f538c4ecd55962e919d1e13e74baf +testImports: [] diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-fallback/initial/glide.yaml b/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-fallback/initial/glide.yaml new file mode 100644 index 0000000000..4087206cb1 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-fallback/initial/glide.yaml @@ -0,0 +1,3 @@ +package: . +import: +- package: github.com/chriswhelix/deptestglide1 diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-fallback/initial/main.go b/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-fallback/initial/main.go new file mode 100644 index 0000000000..995dc5e881 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-fallback/initial/main.go @@ -0,0 +1,16 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package main + +import ( + "fmt" + + "github.com/chriswhelix/deptestglide1" +) + +func main() { + var x deptestglide1.Foo + fmt.Println(x) +} diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-fallback/testcase.json b/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-fallback/testcase.json new file mode 100644 index 0000000000..8d0688e705 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-fallback/testcase.json @@ -0,0 +1,11 @@ +{ + "commands": [ + ["init", "-no-examples"] + ], + "error-expected": "", + "gopath-initial": {}, + "vendor-final": [ + "github.com/chriswhelix/deptestglide1", + "github.com/sdboyer/deptest" + ] +} diff --git a/cmd/dep/testdata/harness_tests/init/godep/case1/final/Gopkg.lock b/cmd/dep/testdata/harness_tests/init/godep/case1/final/Gopkg.lock index ac445c05d2..b54f5f153c 100644 --- a/cmd/dep/testdata/harness_tests/init/godep/case1/final/Gopkg.lock +++ b/cmd/dep/testdata/harness_tests/init/godep/case1/final/Gopkg.lock @@ -14,8 +14,8 @@ version = "v2.0.0" [solve-meta] - analyzer-name = "dep" + analyzer-name = "dep+import" analyzer-version = 1 - inputs-digest = "1ed417a0bec57ffe988fae1cba8f3d49994fb893394d61844e0b3c96d69573fe" + inputs-digest = "4f789c5181842782eb895de762c28c87fde8bf448a8e4d0194d566e05c381438" solver-name = "gps-cdcl" solver-version = 1 From 412037fe58a29da0e30b10e030394c2be49f8b74 Mon Sep 17 00:00:00 2001 From: Chris Williams Date: Tue, 25 Jul 2017 11:04:08 -0700 Subject: [PATCH 3/6] WIP on tests; still trying to work out correct trans-trans-conflict case --- .../transitive/broken-glide-failure/README.md | 1 + .../broken-glide-failure/initial/glide.lock | 8 ++++++ .../broken-glide-failure/initial/glide.yaml | 4 +++ .../broken-glide-failure/initial/main.go | 16 +++++++++++ .../broken-glide-failure/testcase.json | 7 +++++ .../glide/transitive/direct-only/README.md | 1 + .../transitive/direct-only/final/Gopkg.lock | 15 +++++++++++ .../transitive/direct-only/final/Gopkg.toml | 4 +++ .../transitive/direct-only/initial/glide.lock | 6 +++++ .../transitive/direct-only/initial/glide.yaml | 4 +++ .../transitive/direct-only/initial/main.go | 16 +++++++++++ .../transitive/direct-only/testcase.json | 10 +++++++ .../direct-trans-conflict/README.md | 1 + .../direct-trans-conflict/initial/glide.lock | 8 ++++++ .../direct-trans-conflict/initial/glide.yaml | 6 +++++ .../direct-trans-conflict/initial/main.go | 20 ++++++++++++++ .../direct-trans-conflict/testcase.json | 7 +++++ .../glide/transitive/direct-trans/README.md | 1 + .../transitive/direct-trans/final/Gopkg.lock | 21 +++++++++++++++ .../transitive/direct-trans/final/Gopkg.toml | 8 ++++++ .../direct-trans/initial/glide.lock | 8 ++++++ .../direct-trans/initial/glide.yaml | 6 +++++ .../transitive/direct-trans/initial/main.go | 20 ++++++++++++++ .../transitive/direct-trans/testcase.json | 11 ++++++++ .../glide/transitive/trans-only/README.md | 1 + .../transitive/trans-only/final/Gopkg.lock | 21 +++++++++++++++ .../transitive/trans-only/final/Gopkg.toml | 4 +++ .../transitive/trans-only/initial/glide.lock | 8 ++++++ .../transitive/trans-only/initial/glide.yaml | 4 +++ .../transitive/trans-only/initial/main.go | 16 +++++++++++ .../glide/transitive/trans-only/testcase.json | 11 ++++++++ .../transitive/trans-trans-conflict/README.md | 1 + .../trans-trans-conflict/initial/glide.lock | 10 +++++++ .../trans-trans-conflict/initial/glide.yaml | 6 +++++ .../trans-trans-conflict/initial/main.go | 19 +++++++++++++ .../trans-trans-conflict/testcase.json | 12 +++++++++ .../trans-trans-unspecified/README.md | 1 + .../trans-trans-unspecified/final/Gopkg.lock | 27 +++++++++++++++++++ .../trans-trans-unspecified/final/Gopkg.toml | 8 ++++++ .../initial/glide.lock | 10 +++++++ .../initial/glide.yaml | 6 +++++ .../trans-trans-unspecified/initial/main.go | 19 +++++++++++++ .../trans-trans-unspecified/testcase.json | 12 +++++++++ .../glide/transitive/trans-trans/README.md | 1 + .../transitive/trans-trans/final/Gopkg.lock | 27 +++++++++++++++++++ .../transitive/trans-trans/final/Gopkg.toml | 8 ++++++ .../transitive/trans-trans/initial/glide.lock | 10 +++++++ .../transitive/trans-trans/initial/glide.yaml | 6 +++++ .../transitive/trans-trans/initial/main.go | 19 +++++++++++++ .../transitive/trans-trans/testcase.json | 12 +++++++++ 50 files changed, 488 insertions(+) create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-failure/README.md create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-failure/initial/glide.lock create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-failure/initial/glide.yaml create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-failure/initial/main.go create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-failure/testcase.json create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/direct-only/README.md create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/direct-only/final/Gopkg.lock create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/direct-only/final/Gopkg.toml create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/direct-only/initial/glide.lock create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/direct-only/initial/glide.yaml create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/direct-only/initial/main.go create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/direct-only/testcase.json create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans-conflict/README.md create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans-conflict/initial/glide.lock create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans-conflict/initial/glide.yaml create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans-conflict/initial/main.go create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans-conflict/testcase.json create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans/README.md create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans/final/Gopkg.lock create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans/final/Gopkg.toml create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans/initial/glide.lock create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans/initial/glide.yaml create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans/initial/main.go create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans/testcase.json create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/trans-only/README.md create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/trans-only/final/Gopkg.lock create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/trans-only/final/Gopkg.toml create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/trans-only/initial/glide.lock create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/trans-only/initial/glide.yaml create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/trans-only/initial/main.go create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/trans-only/testcase.json create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-conflict/README.md create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-conflict/initial/glide.lock create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-conflict/initial/glide.yaml create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-conflict/initial/main.go create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-conflict/testcase.json create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-unspecified/README.md create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-unspecified/final/Gopkg.lock create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-unspecified/final/Gopkg.toml create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-unspecified/initial/glide.lock create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-unspecified/initial/glide.yaml create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-unspecified/initial/main.go create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-unspecified/testcase.json create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans/README.md create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans/final/Gopkg.lock create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans/final/Gopkg.toml create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans/initial/glide.lock create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans/initial/glide.yaml create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans/initial/main.go create mode 100644 cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans/testcase.json diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-failure/README.md b/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-failure/README.md new file mode 100644 index 0000000000..40204db94d --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-failure/README.md @@ -0,0 +1 @@ +Test that if we can only accept versions of a dependency that have a broken glide.yaml, we will fail. \ No newline at end of file diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-failure/initial/glide.lock b/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-failure/initial/glide.lock new file mode 100644 index 0000000000..8fe9875343 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-failure/initial/glide.lock @@ -0,0 +1,8 @@ +hash: c8bf500af2e7a1e92799aae67dd2e72a7df372399d6598ea8a759487e990e298 +updated: 2017-07-24T15:42:05.970755966-07:00 +imports: +- name: github.com/chriswhelix/deptestglide1 + version: d9c0827097bf188473ebd50c67f1a0daaaeb3b0e +- name: github.com/sdboyer/deptest + version: ff2948a2ac8f538c4ecd55962e919d1e13e74baf +testImports: [] diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-failure/initial/glide.yaml b/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-failure/initial/glide.yaml new file mode 100644 index 0000000000..262cdfcbf4 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-failure/initial/glide.yaml @@ -0,0 +1,4 @@ +package: . +import: +- package: github.com/chriswhelix/deptestglide1 + version: ^2.1.0 diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-failure/initial/main.go b/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-failure/initial/main.go new file mode 100644 index 0000000000..995dc5e881 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-failure/initial/main.go @@ -0,0 +1,16 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package main + +import ( + "fmt" + + "github.com/chriswhelix/deptestglide1" +) + +func main() { + var x deptestglide1.Foo + fmt.Println(x) +} diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-failure/testcase.json b/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-failure/testcase.json new file mode 100644 index 0000000000..c9f6be153b --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/broken-glide-failure/testcase.json @@ -0,0 +1,7 @@ +{ + "commands": [ + ["init", "-no-examples"] + ], + "error-expected": "2.1.0: Unable to parse", + "gopath-initial": {} +} diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-only/README.md b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-only/README.md new file mode 100644 index 0000000000..cb0242d5a8 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-only/README.md @@ -0,0 +1 @@ +Baseline case for single direct reference to deptest. \ No newline at end of file diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-only/final/Gopkg.lock b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-only/final/Gopkg.lock new file mode 100644 index 0000000000..5666ffb5fa --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-only/final/Gopkg.lock @@ -0,0 +1,15 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + name = "github.com/sdboyer/deptest" + packages = ["."] + revision = "ff2948a2ac8f538c4ecd55962e919d1e13e74baf" + version = "v1.0.0" + +[solve-meta] + analyzer-name = "dep+import" + analyzer-version = 1 + inputs-digest = "4a9bd1608b1f825eb9c95c6ad01c12c89b2713b62857b153ae7f871e54738d2b" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-only/final/Gopkg.toml b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-only/final/Gopkg.toml new file mode 100644 index 0000000000..4391438ce1 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-only/final/Gopkg.toml @@ -0,0 +1,4 @@ + +[[constraint]] + name = "github.com/sdboyer/deptest" + version = ">0.8.0" diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-only/initial/glide.lock b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-only/initial/glide.lock new file mode 100644 index 0000000000..a12ee0a4a5 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-only/initial/glide.lock @@ -0,0 +1,6 @@ +hash: dc61e2a1a2479156822f891e3b6a157709a4c9e0ae802dec6fa3dc5e6da678cb +updated: 2017-07-24T16:14:07.152041683-07:00 +imports: +- name: github.com/sdboyer/deptest + version: ff2948a2ac8f538c4ecd55962e919d1e13e74baf +testImports: [] diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-only/initial/glide.yaml b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-only/initial/glide.yaml new file mode 100644 index 0000000000..be7813bab0 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-only/initial/glide.yaml @@ -0,0 +1,4 @@ +package: . +import: +- package: github.com/sdboyer/deptest + version: ">0.8.0" diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-only/initial/main.go b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-only/initial/main.go new file mode 100644 index 0000000000..bdfc22884e --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-only/initial/main.go @@ -0,0 +1,16 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package main + +import ( + "fmt" + + "github.com/sdboyer/deptest" +) + +func main() { + var x deptest.Foo + fmt.Println(x) +} diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-only/testcase.json b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-only/testcase.json new file mode 100644 index 0000000000..ea831423a1 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-only/testcase.json @@ -0,0 +1,10 @@ +{ + "commands": [ + ["init", "-no-examples"] + ], + "error-expected": "", + "gopath-initial": {}, + "vendor-final": [ + "github.com/sdboyer/deptest" + ] +} diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans-conflict/README.md b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans-conflict/README.md new file mode 100644 index 0000000000..054606ce80 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans-conflict/README.md @@ -0,0 +1 @@ +Both direct and transitive references, but conflicting. \ No newline at end of file diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans-conflict/initial/glide.lock b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans-conflict/initial/glide.lock new file mode 100644 index 0000000000..7a8acda190 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans-conflict/initial/glide.lock @@ -0,0 +1,8 @@ +hash: 95cc41fc7cad8cbcd41f53a9385cb17eebb61e6771c3b16327cc4fa0e5eff017 +updated: 2017-07-24T16:31:19.39161226-07:00 +imports: +- name: github.com/chriswhelix/deptestglide1 + version: a537ced77a626dadc23dfb36140e815be819a037 +- name: github.com/sdboyer/deptest + version: "" +testImports: [] diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans-conflict/initial/glide.yaml b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans-conflict/initial/glide.yaml new file mode 100644 index 0000000000..6a67ce533d --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans-conflict/initial/glide.yaml @@ -0,0 +1,6 @@ +package: . +import: +- package: github.com/sdboyer/deptest + version: "^1.0.0" +- package: github.com/chriswhelix/deptestglide1 + version: gt080 diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans-conflict/initial/main.go b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans-conflict/initial/main.go new file mode 100644 index 0000000000..7900d85fa6 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans-conflict/initial/main.go @@ -0,0 +1,20 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package main + +import ( + "fmt" + + "github.com/sdboyer/deptest" + "github.com/chriswhelix/deptestglide1" +) + + +func main() { + var x deptest.Foo + var y deptestglide1.Foo + fmt.Println(x) + fmt.Println(y) +} diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans-conflict/testcase.json b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans-conflict/testcase.json new file mode 100644 index 0000000000..590552165e --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans-conflict/testcase.json @@ -0,0 +1,7 @@ +{ + "commands": [ + ["init", "-no-examples"] + ], + "error-expected": "No versions of github.com/chriswhelix/deptestglide1 met constraints", + "gopath-initial": {} +} diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans/README.md b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans/README.md new file mode 100644 index 0000000000..1123827140 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans/README.md @@ -0,0 +1 @@ +Both direct and transitive references, with overlapping versions available. \ No newline at end of file diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans/final/Gopkg.lock b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans/final/Gopkg.lock new file mode 100644 index 0000000000..340c14be27 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans/final/Gopkg.lock @@ -0,0 +1,21 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + name = "github.com/chriswhelix/deptestglide1" + packages = ["."] + revision = "a537ced77a626dadc23dfb36140e815be819a037" + version = "gt080" + +[[projects]] + name = "github.com/sdboyer/deptest" + packages = ["."] + revision = "3f4c3bea144e112a69bbe5d8d01c1b09a544253f" + version = "v0.8.1" + +[solve-meta] + analyzer-name = "dep+import" + analyzer-version = 1 + inputs-digest = "32f48a9c5477d65d3f7f776fc1bd81bd859849dc47828571eab7dcb4ba463efd" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans/final/Gopkg.toml b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans/final/Gopkg.toml new file mode 100644 index 0000000000..465ef2c444 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans/final/Gopkg.toml @@ -0,0 +1,8 @@ + +[[constraint]] + name = "github.com/chriswhelix/deptestglide1" + version = "gt080" + +[[constraint]] + name = "github.com/sdboyer/deptest" + version = ">0.8.0" diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans/initial/glide.lock b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans/initial/glide.lock new file mode 100644 index 0000000000..66db958b19 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans/initial/glide.lock @@ -0,0 +1,8 @@ +hash: 769c374d382c5418a48154c0a54118539bea21d483855ac2c655d1d5b0454f3b +updated: 2017-07-24T16:24:26.764462561-07:00 +imports: +- name: github.com/chriswhelix/deptestglide1 + version: a537ced77a626dadc23dfb36140e815be819a037 +- name: github.com/sdboyer/deptest + version: ff2948a2ac8f538c4ecd55962e919d1e13e74baf +testImports: [] diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans/initial/glide.yaml b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans/initial/glide.yaml new file mode 100644 index 0000000000..ea0f0ca58a --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans/initial/glide.yaml @@ -0,0 +1,6 @@ +package: . +import: +- package: github.com/sdboyer/deptest + version: ">0.8.0" +- package: github.com/chriswhelix/deptestglide1 + version: gt080 diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans/initial/main.go b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans/initial/main.go new file mode 100644 index 0000000000..7900d85fa6 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans/initial/main.go @@ -0,0 +1,20 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package main + +import ( + "fmt" + + "github.com/sdboyer/deptest" + "github.com/chriswhelix/deptestglide1" +) + + +func main() { + var x deptest.Foo + var y deptestglide1.Foo + fmt.Println(x) + fmt.Println(y) +} diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans/testcase.json b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans/testcase.json new file mode 100644 index 0000000000..8d0688e705 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/direct-trans/testcase.json @@ -0,0 +1,11 @@ +{ + "commands": [ + ["init", "-no-examples"] + ], + "error-expected": "", + "gopath-initial": {}, + "vendor-final": [ + "github.com/chriswhelix/deptestglide1", + "github.com/sdboyer/deptest" + ] +} diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-only/README.md b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-only/README.md new file mode 100644 index 0000000000..c18f6fc4e5 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-only/README.md @@ -0,0 +1 @@ +Baseline case for single transitive reference to deptest. \ No newline at end of file diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-only/final/Gopkg.lock b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-only/final/Gopkg.lock new file mode 100644 index 0000000000..572c76e9b9 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-only/final/Gopkg.lock @@ -0,0 +1,21 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + name = "github.com/chriswhelix/deptestglide1" + packages = ["."] + revision = "a537ced77a626dadc23dfb36140e815be819a037" + version = "gt080" + +[[projects]] + name = "github.com/sdboyer/deptest" + packages = ["."] + revision = "3f4c3bea144e112a69bbe5d8d01c1b09a544253f" + version = "v0.8.1" + +[solve-meta] + analyzer-name = "dep+import" + analyzer-version = 1 + inputs-digest = "a8157aa25c4d4d8e5b76d531ac4b9eabaa4e2fcce632c663fa0c16e963e45f6e" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-only/final/Gopkg.toml b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-only/final/Gopkg.toml new file mode 100644 index 0000000000..56b273766b --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-only/final/Gopkg.toml @@ -0,0 +1,4 @@ + +[[constraint]] + name = "github.com/chriswhelix/deptestglide1" + version = "gt080" diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-only/initial/glide.lock b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-only/initial/glide.lock new file mode 100644 index 0000000000..ba1372369e --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-only/initial/glide.lock @@ -0,0 +1,8 @@ +hash: 072fc5b12aad8c38e91f07ba4097f6cc49ba9bf244763babf322eabc973447e2 +updated: 2017-07-24T16:07:14.911745947-07:00 +imports: +- name: github.com/chriswhelix/deptestglide1 + version: a537ced77a626dadc23dfb36140e815be819a037 +- name: github.com/sdboyer/deptest + version: 3f4c3bea144e112a69bbe5d8d01c1b09a544253f +testImports: [] diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-only/initial/glide.yaml b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-only/initial/glide.yaml new file mode 100644 index 0000000000..0560d9b704 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-only/initial/glide.yaml @@ -0,0 +1,4 @@ +package: . +import: +- package: github.com/chriswhelix/deptestglide1 + version: gt080 diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-only/initial/main.go b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-only/initial/main.go new file mode 100644 index 0000000000..995dc5e881 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-only/initial/main.go @@ -0,0 +1,16 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package main + +import ( + "fmt" + + "github.com/chriswhelix/deptestglide1" +) + +func main() { + var x deptestglide1.Foo + fmt.Println(x) +} diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-only/testcase.json b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-only/testcase.json new file mode 100644 index 0000000000..8d0688e705 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-only/testcase.json @@ -0,0 +1,11 @@ +{ + "commands": [ + ["init", "-no-examples"] + ], + "error-expected": "", + "gopath-initial": {}, + "vendor-final": [ + "github.com/chriswhelix/deptestglide1", + "github.com/sdboyer/deptest" + ] +} diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-conflict/README.md b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-conflict/README.md new file mode 100644 index 0000000000..98dcc68695 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-conflict/README.md @@ -0,0 +1 @@ +Two transitive references, with conflicting constraints. \ No newline at end of file diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-conflict/initial/glide.lock b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-conflict/initial/glide.lock new file mode 100644 index 0000000000..fe99369bab --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-conflict/initial/glide.lock @@ -0,0 +1,10 @@ +hash: aaa381b9594dc45664ab6526eb629939e5d0e24b63448a3c6f6fb7be530f1436 +updated: 2017-07-24T17:01:13.600587367-07:00 +imports: +- name: github.com/chriswhelix/deptestglide1 + version: d2925e73d1fc12ac1f61ba86bb1983452bfe5b49 +- name: github.com/chriswhelix/deptestglide2 + version: 9e840be4d01f8a760b4ae8117a03815afdad3188 +- name: github.com/sdboyer/deptest + version: ff2948a2ac8f538c4ecd55962e919d1e13e74baf +testImports: [] diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-conflict/initial/glide.yaml b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-conflict/initial/glide.yaml new file mode 100644 index 0000000000..40f9fcfb1f --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-conflict/initial/glide.yaml @@ -0,0 +1,6 @@ +package: . +import: +- package: github.com/chriswhelix/deptestglide1 + version: gt100 +- package: github.com/chriswhelix/deptestglide2 + version: exactly081 diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-conflict/initial/main.go b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-conflict/initial/main.go new file mode 100644 index 0000000000..f65a2af519 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-conflict/initial/main.go @@ -0,0 +1,19 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package main + +import ( + "fmt" + + "github.com/chriswhelix/deptestglide1" + "github.com/chriswhelix/deptestglide2" +) + +func main() { + var x deptestglide1.Foo + var y deptestglide2.Foo + fmt.Println(x) + fmt.Println(y) +} diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-conflict/testcase.json b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-conflict/testcase.json new file mode 100644 index 0000000000..3af58428af --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-conflict/testcase.json @@ -0,0 +1,12 @@ +{ + "commands": [ + ["init", "-no-examples"] + ], + "error-expected": "foo", + "gopath-initial": {}, + "vendor-final": [ + "github.com/chriswhelix/deptestglide1", + "github.com/chriswhelix/deptestglide2", + "github.com/sdboyer/deptest" + ] +} diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-unspecified/README.md b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-unspecified/README.md new file mode 100644 index 0000000000..052665a40a --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-unspecified/README.md @@ -0,0 +1 @@ +Two transitive references, one with unspecified version. \ No newline at end of file diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-unspecified/final/Gopkg.lock b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-unspecified/final/Gopkg.lock new file mode 100644 index 0000000000..c608a9c301 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-unspecified/final/Gopkg.lock @@ -0,0 +1,27 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + name = "github.com/chriswhelix/deptestglide1" + packages = ["."] + revision = "a537ced77a626dadc23dfb36140e815be819a037" + version = "gt080" + +[[projects]] + name = "github.com/chriswhelix/deptestglide2" + packages = ["."] + revision = "ee5909194b70b9781e210ffd394ffd47dda7a137" + version = "2.0.0" + +[[projects]] + name = "github.com/sdboyer/deptest" + packages = ["."] + revision = "3f4c3bea144e112a69bbe5d8d01c1b09a544253f" + version = "v0.8.1" + +[solve-meta] + analyzer-name = "dep+import" + analyzer-version = 1 + inputs-digest = "3b5775772cf0845db52469ca32e633e545ca507ea6bedd7b3dbe697aea1b2461" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-unspecified/final/Gopkg.toml b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-unspecified/final/Gopkg.toml new file mode 100644 index 0000000000..9f20321368 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-unspecified/final/Gopkg.toml @@ -0,0 +1,8 @@ + +[[constraint]] + name = "github.com/chriswhelix/deptestglide1" + version = "gt080" + +[[constraint]] + name = "github.com/chriswhelix/deptestglide2" + version = "2.0.0" diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-unspecified/initial/glide.lock b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-unspecified/initial/glide.lock new file mode 100644 index 0000000000..7436b5c413 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-unspecified/initial/glide.lock @@ -0,0 +1,10 @@ +hash: 669250c565b9b56491a70e800261e704dbcd8c176a046cecfd5971c9a5fc601d +updated: 2017-07-24T16:49:38.444448384-07:00 +imports: +- name: github.com/chriswhelix/deptestglide1 + version: a537ced77a626dadc23dfb36140e815be819a037 +- name: github.com/chriswhelix/deptestglide2 + version: ee5909194b70b9781e210ffd394ffd47dda7a137 +- name: github.com/sdboyer/deptest + version: 3f4c3bea144e112a69bbe5d8d01c1b09a544253f +testImports: [] diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-unspecified/initial/glide.yaml b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-unspecified/initial/glide.yaml new file mode 100644 index 0000000000..6898562677 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-unspecified/initial/glide.yaml @@ -0,0 +1,6 @@ +package: . +import: +- package: github.com/chriswhelix/deptestglide1 + version: gt080 +- package: github.com/chriswhelix/deptestglide2 + version: 2.0.0 diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-unspecified/initial/main.go b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-unspecified/initial/main.go new file mode 100644 index 0000000000..f65a2af519 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-unspecified/initial/main.go @@ -0,0 +1,19 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package main + +import ( + "fmt" + + "github.com/chriswhelix/deptestglide1" + "github.com/chriswhelix/deptestglide2" +) + +func main() { + var x deptestglide1.Foo + var y deptestglide2.Foo + fmt.Println(x) + fmt.Println(y) +} diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-unspecified/testcase.json b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-unspecified/testcase.json new file mode 100644 index 0000000000..65afcee079 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-unspecified/testcase.json @@ -0,0 +1,12 @@ +{ + "commands": [ + ["init", "-no-examples"] + ], + "error-expected": "", + "gopath-initial": {}, + "vendor-final": [ + "github.com/chriswhelix/deptestglide1", + "github.com/chriswhelix/deptestglide2", + "github.com/sdboyer/deptest" + ] +} diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans/README.md b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans/README.md new file mode 100644 index 0000000000..043d220e9d --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans/README.md @@ -0,0 +1 @@ +Two transitive references, with overlap/agreement. \ No newline at end of file diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans/final/Gopkg.lock b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans/final/Gopkg.lock new file mode 100644 index 0000000000..fe46620fa6 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans/final/Gopkg.lock @@ -0,0 +1,27 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + name = "github.com/chriswhelix/deptestglide1" + packages = ["."] + revision = "a537ced77a626dadc23dfb36140e815be819a037" + version = "gt080" + +[[projects]] + name = "github.com/chriswhelix/deptestglide2" + packages = ["."] + revision = "fff62a89d33d0ae0bfb23da76698212aadea45c9" + version = "eq081" + +[[projects]] + name = "github.com/sdboyer/deptest" + packages = ["."] + revision = "3f4c3bea144e112a69bbe5d8d01c1b09a544253f" + version = "v0.8.1" + +[solve-meta] + analyzer-name = "dep+import" + analyzer-version = 1 + inputs-digest = "f8eb7c9b8e225ef1e8ff6957f36d8ae979457fe09a21d9b470ff1a4f5cb63b46" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans/final/Gopkg.toml b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans/final/Gopkg.toml new file mode 100644 index 0000000000..4ecd0017f0 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans/final/Gopkg.toml @@ -0,0 +1,8 @@ + +[[constraint]] + name = "github.com/chriswhelix/deptestglide1" + version = "gt080" + +[[constraint]] + name = "github.com/chriswhelix/deptestglide2" + version = "eq081" diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans/initial/glide.lock b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans/initial/glide.lock new file mode 100644 index 0000000000..90db9114d6 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans/initial/glide.lock @@ -0,0 +1,10 @@ +hash: 7374967d9357e15b6e839802a1134641575ef592a24bb56a9955dde8ef498112 +updated: 2017-07-24T16:45:13.303446812-07:00 +imports: +- name: github.com/chriswhelix/deptestglide1 + version: a537ced77a626dadc23dfb36140e815be819a037 +- name: github.com/chriswhelix/deptestglide2 + version: fff62a89d33d0ae0bfb23da76698212aadea45c9 +- name: github.com/sdboyer/deptest + version: 3f4c3bea144e112a69bbe5d8d01c1b09a544253f +testImports: [] diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans/initial/glide.yaml b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans/initial/glide.yaml new file mode 100644 index 0000000000..11f5384933 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans/initial/glide.yaml @@ -0,0 +1,6 @@ +package: . +import: +- package: github.com/chriswhelix/deptestglide1 + version: gt080 +- package: github.com/chriswhelix/deptestglide2 + version: eq081 diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans/initial/main.go b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans/initial/main.go new file mode 100644 index 0000000000..f65a2af519 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans/initial/main.go @@ -0,0 +1,19 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package main + +import ( + "fmt" + + "github.com/chriswhelix/deptestglide1" + "github.com/chriswhelix/deptestglide2" +) + +func main() { + var x deptestglide1.Foo + var y deptestglide2.Foo + fmt.Println(x) + fmt.Println(y) +} diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans/testcase.json b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans/testcase.json new file mode 100644 index 0000000000..65afcee079 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans/testcase.json @@ -0,0 +1,12 @@ +{ + "commands": [ + ["init", "-no-examples"] + ], + "error-expected": "", + "gopath-initial": {}, + "vendor-final": [ + "github.com/chriswhelix/deptestglide1", + "github.com/chriswhelix/deptestglide2", + "github.com/sdboyer/deptest" + ] +} From 2c296b8ab4568bbe60552c73a2d1a0825cb8867b Mon Sep 17 00:00:00 2001 From: Chris Williams Date: Fri, 28 Jul 2017 13:25:44 -0700 Subject: [PATCH 4/6] Revert to original test case; doesn't work either way --- .../transitive/trans-trans-conflict/initial/glide.lock | 6 +++--- .../transitive/trans-trans-conflict/initial/glide.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-conflict/initial/glide.lock b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-conflict/initial/glide.lock index fe99369bab..fd1e2b6dfe 100644 --- a/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-conflict/initial/glide.lock +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-conflict/initial/glide.lock @@ -1,10 +1,10 @@ -hash: aaa381b9594dc45664ab6526eb629939e5d0e24b63448a3c6f6fb7be530f1436 -updated: 2017-07-24T17:01:13.600587367-07:00 +hash: a5c0d1db481a1b988a032ebc0dce467a9bc9a9ce75855f80f9629dd3ff0fc9c1 +updated: 2017-07-28T13:24:07.863574-07:00 imports: - name: github.com/chriswhelix/deptestglide1 version: d2925e73d1fc12ac1f61ba86bb1983452bfe5b49 - name: github.com/chriswhelix/deptestglide2 - version: 9e840be4d01f8a760b4ae8117a03815afdad3188 + version: fff62a89d33d0ae0bfb23da76698212aadea45c9 - name: github.com/sdboyer/deptest version: ff2948a2ac8f538c4ecd55962e919d1e13e74baf testImports: [] diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-conflict/initial/glide.yaml b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-conflict/initial/glide.yaml index 40f9fcfb1f..61655e43f5 100644 --- a/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-conflict/initial/glide.yaml +++ b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-conflict/initial/glide.yaml @@ -3,4 +3,4 @@ import: - package: github.com/chriswhelix/deptestglide1 version: gt100 - package: github.com/chriswhelix/deptestglide2 - version: exactly081 + version: eq081 From fa774718ab3108800bd98d4c3874054e177f773b Mon Sep 17 00:00:00 2001 From: Chris Williams Date: Wed, 30 Aug 2017 12:18:32 -0700 Subject: [PATCH 5/6] Disable broken test --- .../{testcase.json => testcase.json.disabled} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-conflict/{testcase.json => testcase.json.disabled} (100%) diff --git a/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-conflict/testcase.json b/cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-conflict/testcase.json.disabled similarity index 100% rename from cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-conflict/testcase.json rename to cmd/dep/testdata/harness_tests/init/glide/transitive/trans-trans-conflict/testcase.json.disabled From 25bc88bee7aa1933ff91c51282d51b638992ebf0 Mon Sep 17 00:00:00 2001 From: Chris Williams Date: Wed, 30 Aug 2017 12:39:52 -0700 Subject: [PATCH 6/6] Update golden files --- .../ensure/add/errs/double-diff-spec/final/Gopkg.lock | 4 ++-- .../testdata/harness_tests/init/glide/case1/final/Gopkg.lock | 2 +- .../testdata/harness_tests/init/govend/case1/final/Gopkg.lock | 4 ++-- .../testdata/harness_tests/init/vndr/case1/final/Gopkg.lock | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/dep/testdata/harness_tests/ensure/add/errs/double-diff-spec/final/Gopkg.lock b/cmd/dep/testdata/harness_tests/ensure/add/errs/double-diff-spec/final/Gopkg.lock index 66ef021c68..59347c12d7 100644 --- a/cmd/dep/testdata/harness_tests/ensure/add/errs/double-diff-spec/final/Gopkg.lock +++ b/cmd/dep/testdata/harness_tests/ensure/add/errs/double-diff-spec/final/Gopkg.lock @@ -8,8 +8,8 @@ revision = "54aaeb0023e1f3dcf5f98f31dd8c565457945a12" [solve-meta] - analyzer-name = "dep" + analyzer-name = "dep+import" analyzer-version = 1 - inputs-digest = "342afd8c8a616d084eb7b67bf3a891710eca3ce5abc3cf60af0dae4ccfdcd001" + inputs-digest = "d77bef4c52240f80ca0feae60aece200a4ed9c4e48456e2b05d64e555d659ed8" solver-name = "gps-cdcl" solver-version = 1 diff --git a/cmd/dep/testdata/harness_tests/init/glide/case1/final/Gopkg.lock b/cmd/dep/testdata/harness_tests/init/glide/case1/final/Gopkg.lock index bde003f211..affe3b9850 100644 --- a/cmd/dep/testdata/harness_tests/init/glide/case1/final/Gopkg.lock +++ b/cmd/dep/testdata/harness_tests/init/glide/case1/final/Gopkg.lock @@ -21,6 +21,6 @@ [solve-meta] analyzer-name = "dep+import" analyzer-version = 1 - inputs-digest = "7efcfca7f138c3579d22b4ef788294649c734ea630124fb8fbb47acf8770b086" + inputs-digest = "9900295042beb01699c792aaa98da92e27470c1036c5ba489bd27236d8e259ee" solver-name = "gps-cdcl" solver-version = 1 diff --git a/cmd/dep/testdata/harness_tests/init/govend/case1/final/Gopkg.lock b/cmd/dep/testdata/harness_tests/init/govend/case1/final/Gopkg.lock index ac445c05d2..b54f5f153c 100644 --- a/cmd/dep/testdata/harness_tests/init/govend/case1/final/Gopkg.lock +++ b/cmd/dep/testdata/harness_tests/init/govend/case1/final/Gopkg.lock @@ -14,8 +14,8 @@ version = "v2.0.0" [solve-meta] - analyzer-name = "dep" + analyzer-name = "dep+import" analyzer-version = 1 - inputs-digest = "1ed417a0bec57ffe988fae1cba8f3d49994fb893394d61844e0b3c96d69573fe" + inputs-digest = "4f789c5181842782eb895de762c28c87fde8bf448a8e4d0194d566e05c381438" solver-name = "gps-cdcl" solver-version = 1 diff --git a/cmd/dep/testdata/harness_tests/init/vndr/case1/final/Gopkg.lock b/cmd/dep/testdata/harness_tests/init/vndr/case1/final/Gopkg.lock index ac445c05d2..b54f5f153c 100644 --- a/cmd/dep/testdata/harness_tests/init/vndr/case1/final/Gopkg.lock +++ b/cmd/dep/testdata/harness_tests/init/vndr/case1/final/Gopkg.lock @@ -14,8 +14,8 @@ version = "v2.0.0" [solve-meta] - analyzer-name = "dep" + analyzer-name = "dep+import" analyzer-version = 1 - inputs-digest = "1ed417a0bec57ffe988fae1cba8f3d49994fb893394d61844e0b3c96d69573fe" + inputs-digest = "4f789c5181842782eb895de762c28c87fde8bf448a8e4d0194d566e05c381438" solver-name = "gps-cdcl" solver-version = 1