diff --git a/CHANGELOG.md b/CHANGELOG.md index f461742cea..083c3969fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,7 +35,7 @@ WIP: * gps: Process canonical import paths. (#1017) * gps: Persistent cache. (#1127, #1215) - +* dep: Enable importing other tools and add integration tests # v0.3.1 diff --git a/cmd/dep/init.go b/cmd/dep/init.go index a4f6637d55..f172371542 100644 --- a/cmd/dep/init.go +++ b/cmd/dep/init.go @@ -159,7 +159,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/root_analyzer.go b/cmd/dep/root_analyzer.go index c300eadad8..20699cfa07 100644 --- a/cmd/dep/root_analyzer.go +++ b/cmd/dep/root_analyzer.go @@ -66,7 +66,6 @@ func (a *rootAnalyzer) importManifestAndLock(dir string, pr gps.ProjectRoot, sup if err != nil { return nil, nil, err } - a.removeTransitiveDependencies(m) return m, l, err } } @@ -112,6 +111,11 @@ func (a *rootAnalyzer) DeriveManifestAndLock(dir string, pr gps.ProjectRoot) (gp } func (a *rootAnalyzer) FinalizeRootManifestAndLock(m *dep.Manifest, l *dep.Lock, ol dep.Lock) { + // Transitive dependencies could sneak into the manifest when other importers are used + if !a.skipTools { + a.removeTransitiveDependencies(m) + } + // Iterate through the new projects in solved lock and add them to manifest // if they are direct deps and log feedback for all the new projects. for _, y := range l.Projects() { diff --git a/cmd/dep/testdata/harness_tests/init/glide/case3/README.md b/cmd/dep/testdata/harness_tests/init/glide/case3/README.md index f46ccd1949..1eb424fc15 100644 --- a/cmd/dep/testdata/harness_tests/init/glide/case3/README.md +++ b/cmd/dep/testdata/harness_tests/init/glide/case3/README.md @@ -1 +1 @@ -Import glide config in dependencies. \ No newline at end of file +Import glide config in direct dependencies. \ No newline at end of file diff --git a/cmd/dep/testdata/harness_tests/init/glide/case3/final/Gopkg.lock b/cmd/dep/testdata/harness_tests/init/glide/case3/final/Gopkg.lock index 440c282602..9c2e59f243 100644 --- a/cmd/dep/testdata/harness_tests/init/glide/case3/final/Gopkg.lock +++ b/cmd/dep/testdata/harness_tests/init/glide/case3/final/Gopkg.lock @@ -14,8 +14,8 @@ version = "v0.8.1" [solve-meta] - analyzer-name = "dep+import" + analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "07eddb7ff09071bde95b019911e1fb30d91bddabbb23f4c797c6ce61b58cd7be" + inputs-digest = "87996f836c70eac9c14221085412cbc96eb98cc6a0782c0724575a56511abe8d" 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 diff --git a/cmd/dep/testdata/harness_tests/init/glide/corrupt-glide/README.md b/cmd/dep/testdata/harness_tests/init/glide/corrupt-glide/README.md new file mode 100644 index 0000000000..db7959dc2a --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/corrupt-glide/README.md @@ -0,0 +1 @@ +Import deptestglideA tag v0.3.0 which has a corrupt glide manifest. \ No newline at end of file diff --git a/cmd/dep/testdata/harness_tests/init/glide/corrupt-glide/initial/glide.lock b/cmd/dep/testdata/harness_tests/init/glide/corrupt-glide/initial/glide.lock new file mode 100644 index 0000000000..fe644d404e --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/corrupt-glide/initial/glide.lock @@ -0,0 +1,5 @@ +hash: 16053c82a71f9bd509b05a4523df6bc418aed2083e4b8bd97a870bbc003256f8 +updated: 2017-03-07T17:02:32.214383898-06:00 +imports: +- name: github.com/ChinmayR/deptestglideA + version: cead75b1cde64ae1353ddbf73f6089303d6001b4 diff --git a/cmd/dep/testdata/harness_tests/init/glide/corrupt-glide/initial/glide.yaml b/cmd/dep/testdata/harness_tests/init/glide/corrupt-glide/initial/glide.yaml new file mode 100644 index 0000000000..65913ee3a2 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/corrupt-glide/initial/glide.yaml @@ -0,0 +1,10 @@ +package: github.com/golang/notexist +homepage: http://example.com +license: MIT +owners: +- name: Sam Boyer + email: sdboyer@example.com + homepage: http://sdboyer.io +import: +- package: github.com/ChinmayR/deptestglideA + version: v0.3.0 \ No newline at end of file diff --git a/cmd/dep/testdata/harness_tests/init/glide/corrupt-glide/initial/main.go b/cmd/dep/testdata/harness_tests/init/glide/corrupt-glide/initial/main.go new file mode 100644 index 0000000000..750a5f5a23 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/corrupt-glide/initial/main.go @@ -0,0 +1,11 @@ +// 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 ( + "github.com/ChinmayR/deptestglideA" +) + +type PointToDepTestGlideAv010 deptestglideA.Bversion2 diff --git a/cmd/dep/testdata/harness_tests/init/glide/corrupt-glide/testcase.json b/cmd/dep/testdata/harness_tests/init/glide/corrupt-glide/testcase.json new file mode 100644 index 0000000000..d9fca294f3 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/corrupt-glide/testcase.json @@ -0,0 +1,6 @@ +{ + "commands": [ + ["init", "-no-examples", "-v"] + ], + "error-expected": "v0.3.0: unable to parse" +} diff --git a/cmd/dep/testdata/harness_tests/init/glide/direct-dep/README.md b/cmd/dep/testdata/harness_tests/init/glide/direct-dep/README.md new file mode 100644 index 0000000000..ba0617e938 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/direct-dep/README.md @@ -0,0 +1 @@ +Take a direct dependency where the version is defined by glide. \ No newline at end of file diff --git a/cmd/dep/testdata/harness_tests/init/glide/direct-dep/final/Gopkg.lock b/cmd/dep/testdata/harness_tests/init/glide/direct-dep/final/Gopkg.lock new file mode 100644 index 0000000000..1af952b9d8 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/direct-dep/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/ChinmayR/deptestglideB" + packages = ["."] + revision = "e059a65e7ff331370645326c285ccc0987917a7f" + version = "v0.1.0" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + inputs-digest = "79d4bf1eabf2a716cf77f5de407836a93f25ab903469fd06c3ef06f20401c342" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/cmd/dep/testdata/harness_tests/init/glide/direct-dep/final/Gopkg.toml b/cmd/dep/testdata/harness_tests/init/glide/direct-dep/final/Gopkg.toml new file mode 100644 index 0000000000..33ee85bc3f --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/direct-dep/final/Gopkg.toml @@ -0,0 +1,4 @@ + +[[constraint]] + name = "github.com/ChinmayR/deptestglideB" + version = "0.1.0" diff --git a/cmd/dep/testdata/harness_tests/init/glide/direct-dep/initial/glide.lock b/cmd/dep/testdata/harness_tests/init/glide/direct-dep/initial/glide.lock new file mode 100644 index 0000000000..7d58d7300d --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/direct-dep/initial/glide.lock @@ -0,0 +1,5 @@ +hash: 16053c82a71f9bd509b05a4523df6bc418aed2083e4b8bd97a870bbc003256f8 +updated: 2017-03-07T17:02:32.214383898-06:00 +imports: +- name: github.com/ChinmayR/deptestglideB + version: e059a65e7ff331370645326c285ccc0987917a7f diff --git a/cmd/dep/testdata/harness_tests/init/glide/direct-dep/initial/glide.yaml b/cmd/dep/testdata/harness_tests/init/glide/direct-dep/initial/glide.yaml new file mode 100644 index 0000000000..0a8082ca48 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/direct-dep/initial/glide.yaml @@ -0,0 +1,10 @@ +package: github.com/golang/notexist +homepage: http://example.com +license: MIT +owners: +- name: Sam Boyer + email: sdboyer@example.com + homepage: http://sdboyer.io +import: +- package: github.com/ChinmayR/deptestglideB + version: v0.1.0 \ No newline at end of file diff --git a/cmd/dep/testdata/harness_tests/init/glide/direct-dep/initial/main.go b/cmd/dep/testdata/harness_tests/init/glide/direct-dep/initial/main.go new file mode 100644 index 0000000000..8effee348e --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/direct-dep/initial/main.go @@ -0,0 +1,11 @@ +// 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 ( + "github.com/ChinmayR/deptestglideB" +) + +type FooVersion1 deptestglideB.FooVersion1 diff --git a/cmd/dep/testdata/harness_tests/init/glide/direct-dep/testcase.json b/cmd/dep/testdata/harness_tests/init/glide/direct-dep/testcase.json new file mode 100644 index 0000000000..2bfbda6f0b --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/direct-dep/testcase.json @@ -0,0 +1,8 @@ +{ + "commands": [ + ["init", "-no-examples", "-v"] + ], + "vendor-final": [ + "github.com/ChinmayR/deptestglideB" + ] +} diff --git a/cmd/dep/testdata/harness_tests/init/glide/direct-trans-conflict/README.md b/cmd/dep/testdata/harness_tests/init/glide/direct-trans-conflict/README.md new file mode 100644 index 0000000000..3a2ed07d9a --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/direct-trans-conflict/README.md @@ -0,0 +1 @@ +Take a direct dependency on a transient dependency where the versions are conflicted. Resolving should fail. \ No newline at end of file diff --git a/cmd/dep/testdata/harness_tests/init/glide/direct-trans-conflict/initial/glide.lock b/cmd/dep/testdata/harness_tests/init/glide/direct-trans-conflict/initial/glide.lock new file mode 100644 index 0000000000..1d92821511 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/direct-trans-conflict/initial/glide.lock @@ -0,0 +1,7 @@ +hash: 16053c82a71f9bd509b05a4523df6bc418aed2083e4b8bd97a870bbc003256f8 +updated: 2017-03-07T17:02:32.214383898-06:00 +imports: +- name: github.com/ChinmayR/deptestglideA + version: 81d7d7ca66af42280af949bcae1347e228c8d346 +- name: github.com/ChinmayR/deptestglideB + version: 143bb0e8f4cc3a3227a2d250f99d08ee879c7909 diff --git a/cmd/dep/testdata/harness_tests/init/glide/direct-trans-conflict/initial/glide.yaml b/cmd/dep/testdata/harness_tests/init/glide/direct-trans-conflict/initial/glide.yaml new file mode 100644 index 0000000000..61ca053117 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/direct-trans-conflict/initial/glide.yaml @@ -0,0 +1,12 @@ +package: github.com/golang/notexist +homepage: http://example.com +license: MIT +owners: +- name: Sam Boyer + email: sdboyer@example.com + homepage: http://sdboyer.io +import: +- package: github.com/ChinmayR/deptestglideA + version: v0.1.0 +- package: github.com/ChinmayR/deptestglideB + version: v0.2.0 \ No newline at end of file diff --git a/cmd/dep/testdata/harness_tests/init/glide/direct-trans-conflict/initial/main.go b/cmd/dep/testdata/harness_tests/init/glide/direct-trans-conflict/initial/main.go new file mode 100644 index 0000000000..01ee227b70 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/direct-trans-conflict/initial/main.go @@ -0,0 +1,13 @@ +// 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 ( + "github.com/ChinmayR/deptestglideA" + "github.com/ChinmayR/deptestglideB" +) + +type PointToDepTestGlideAv010 deptestglideA.Bversion1 +type FooVersion2 deptestglideB.FooVersion2 diff --git a/cmd/dep/testdata/harness_tests/init/glide/direct-trans-conflict/testcase.json b/cmd/dep/testdata/harness_tests/init/glide/direct-trans-conflict/testcase.json new file mode 100644 index 0000000000..dd5d9eaf03 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/direct-trans-conflict/testcase.json @@ -0,0 +1,6 @@ +{ + "commands": [ + ["init", "-no-examples", "-v"] + ], + "error-expected": "master: Could not introduce github.com/ChinmayR/deptestglideA@master, as it is not allowed by constraint ^0.1.0 from project github.com/golang/notexist." +} diff --git a/cmd/dep/testdata/harness_tests/init/glide/direct-trans-no-conflict/README.md b/cmd/dep/testdata/harness_tests/init/glide/direct-trans-no-conflict/README.md new file mode 100644 index 0000000000..e1fe2976c1 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/direct-trans-no-conflict/README.md @@ -0,0 +1 @@ +Take a direct dependency on a transient dependency where the versions are not conflicted. Resolving should pass. \ No newline at end of file diff --git a/cmd/dep/testdata/harness_tests/init/glide/direct-trans-no-conflict/final/Gopkg.lock b/cmd/dep/testdata/harness_tests/init/glide/direct-trans-no-conflict/final/Gopkg.lock new file mode 100644 index 0000000000..0d0e688354 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/direct-trans-no-conflict/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/ChinmayR/deptestglideA" + packages = ["."] + revision = "26ab0f16d85723be5ff44e5b4bd2a8e0f3a34989" + version = "v0.2.0" + +[[projects]] + name = "github.com/ChinmayR/deptestglideB" + packages = ["."] + revision = "143bb0e8f4cc3a3227a2d250f99d08ee879c7909" + version = "v0.2.0" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + inputs-digest = "7e886bce911c4ca074e04f0f6bca0601c76aa06533aa7f812526e2b05298fe9f" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/cmd/dep/testdata/harness_tests/init/glide/direct-trans-no-conflict/final/Gopkg.toml b/cmd/dep/testdata/harness_tests/init/glide/direct-trans-no-conflict/final/Gopkg.toml new file mode 100644 index 0000000000..f808523cfc --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/direct-trans-no-conflict/final/Gopkg.toml @@ -0,0 +1,7 @@ + +[[constraint]] + name = "github.com/ChinmayR/deptestglideA" + version = "0.2.0" + +[[constraint]] + name = "github.com/ChinmayR/deptestglideB" diff --git a/cmd/dep/testdata/harness_tests/init/glide/direct-trans-no-conflict/initial/glide.lock b/cmd/dep/testdata/harness_tests/init/glide/direct-trans-no-conflict/initial/glide.lock new file mode 100644 index 0000000000..1636df3fa6 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/direct-trans-no-conflict/initial/glide.lock @@ -0,0 +1,5 @@ +hash: 16053c82a71f9bd509b05a4523df6bc418aed2083e4b8bd97a870bbc003256f8 +updated: 2017-03-07T17:02:32.214383898-06:00 +imports: +- name: github.com/ChinmayR/deptestglideA + version: 26ab0f16d85723be5ff44e5b4bd2a8e0f3a34989 diff --git a/cmd/dep/testdata/harness_tests/init/glide/direct-trans-no-conflict/initial/glide.yaml b/cmd/dep/testdata/harness_tests/init/glide/direct-trans-no-conflict/initial/glide.yaml new file mode 100644 index 0000000000..46e8e57133 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/direct-trans-no-conflict/initial/glide.yaml @@ -0,0 +1,12 @@ +package: github.com/golang/notexist +homepage: http://example.com +license: MIT +owners: +- name: Sam Boyer + email: sdboyer@example.com + homepage: http://sdboyer.io +import: +- package: github.com/ChinmayR/deptestglideA + version: v0.2.0 +- package: github.com/ChinmayR/deptestglideB + version: ~0.1.0 \ No newline at end of file diff --git a/cmd/dep/testdata/harness_tests/init/glide/direct-trans-no-conflict/initial/main.go b/cmd/dep/testdata/harness_tests/init/glide/direct-trans-no-conflict/initial/main.go new file mode 100644 index 0000000000..40112a71e2 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/direct-trans-no-conflict/initial/main.go @@ -0,0 +1,13 @@ +// 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 ( + "github.com/ChinmayR/deptestglideA" + "github.com/ChinmayR/deptestglideB" +) + +type PointToDepTestGlideAv010 deptestglideA.Bversion2 +type FooVersion2 deptestglideB.FooVersion2 diff --git a/cmd/dep/testdata/harness_tests/init/glide/direct-trans-no-conflict/testcase.json b/cmd/dep/testdata/harness_tests/init/glide/direct-trans-no-conflict/testcase.json new file mode 100644 index 0000000000..c56ab0a1d4 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/direct-trans-no-conflict/testcase.json @@ -0,0 +1,9 @@ +{ + "commands": [ + ["init", "-no-examples", "-v"] + ], + "vendor-final": [ + "github.com/ChinmayR/deptestglideA", + "github.com/ChinmayR/deptestglideB" + ] +} diff --git a/cmd/dep/testdata/harness_tests/init/glide/trans-trans-conflict/README.md b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-conflict/README.md new file mode 100644 index 0000000000..bf2e4f1f71 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-conflict/README.md @@ -0,0 +1 @@ +Have two transient dependencies have different versions of the same repo. Resolving should fail. \ No newline at end of file diff --git a/cmd/dep/testdata/harness_tests/init/glide/trans-trans-conflict/initial/glide.lock b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-conflict/initial/glide.lock new file mode 100644 index 0000000000..9b10f2a798 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-conflict/initial/glide.lock @@ -0,0 +1,7 @@ +hash: 16053c82a71f9bd509b05a4523df6bc418aed2083e4b8bd97a870bbc003256f8 +updated: 2017-03-07T17:02:32.214383898-06:00 +imports: +- name: github.com/ChinmayR/deptestglideA + version: 703f28fdee407d70dcc4cb774a0fbb82fa70daa9 +- name: github.com/ChinmayR/deptestglideB + version: 7f8abdec9e29a008d40cfcbb0848b82cc4000d25 \ No newline at end of file diff --git a/cmd/dep/testdata/harness_tests/init/glide/trans-trans-conflict/initial/glide.yaml b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-conflict/initial/glide.yaml new file mode 100644 index 0000000000..bb2d3711d5 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-conflict/initial/glide.yaml @@ -0,0 +1,12 @@ +package: github.com/golang/notexist +homepage: http://example.com +license: MIT +owners: +- name: Sam Boyer + email: sdboyer@example.com + homepage: http://sdboyer.io +import: +- package: github.com/ChinmayR/deptestglideA + version: v0.4.0 +- package: github.com/ChinmayR/deptestglideB + version: v0.3.0 \ No newline at end of file diff --git a/cmd/dep/testdata/harness_tests/init/glide/trans-trans-conflict/initial/main.go b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-conflict/initial/main.go new file mode 100644 index 0000000000..b5edee16bf --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-conflict/initial/main.go @@ -0,0 +1,13 @@ +// 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 ( + "github.com/ChinmayR/deptestglideA" + "github.com/ChinmayR/deptestglideB" +) + +type PointToDepTestGlideCv010 deptestglideA.Cversion1 +type PointToDepTestGlideCv020 deptestglideB.Cversion2 diff --git a/cmd/dep/testdata/harness_tests/init/glide/trans-trans-conflict/testcase.json b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-conflict/testcase.json new file mode 100644 index 0000000000..e90b380160 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-conflict/testcase.json @@ -0,0 +1,6 @@ +{ + "commands": [ + ["init", "-no-examples", "-v"] + ], + "error-expected": "No versions of github.com/ChinmayR/deptestglideB met constraints" +} diff --git a/cmd/dep/testdata/harness_tests/init/glide/trans-trans-trans/README.md b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-trans/README.md new file mode 100644 index 0000000000..5e45b7529d --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-trans/README.md @@ -0,0 +1 @@ +Test if a transitive glide manifest is read. \ No newline at end of file diff --git a/cmd/dep/testdata/harness_tests/init/glide/trans-trans-trans/final/Gopkg.lock b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-trans/final/Gopkg.lock new file mode 100644 index 0000000000..2021608a97 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/trans-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/ChinmayR/deptestglideA" + packages = ["."] + revision = "120a353fc5706d8b5c0cca93b01606ed37a2247a" + version = "v0.6.0" + +[[projects]] + name = "github.com/ChinmayR/deptestglideB" + packages = ["."] + revision = "571b81795d767461736e6d0ca69e5f9840bdbf0e" + version = "v0.5.0" + +[[projects]] + name = "github.com/ChinmayR/deptestglideC" + packages = ["."] + revision = "4d3546304e8a1ceb6bb01e7e6201e852abb8ae4d" + version = "v0.1.0" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + inputs-digest = "d53f4d52c7fbb52058a9c21ee1e3c94dae43f1af5366ab8ded5b14880c44b94b" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/cmd/dep/testdata/harness_tests/init/glide/trans-trans-trans/final/Gopkg.toml b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-trans/final/Gopkg.toml new file mode 100644 index 0000000000..27e9929438 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-trans/final/Gopkg.toml @@ -0,0 +1,4 @@ + +[[constraint]] + name = "github.com/ChinmayR/deptestglideA" + version = "0.6.0" diff --git a/cmd/dep/testdata/harness_tests/init/glide/trans-trans-trans/initial/glide.lock b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-trans/initial/glide.lock new file mode 100644 index 0000000000..98eb814a75 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-trans/initial/glide.lock @@ -0,0 +1,5 @@ +hash: 16053c82a71f9bd509b05a4523df6bc418aed2083e4b8bd97a870bbc003256f8 +updated: 2017-03-07T17:02:32.214383898-06:00 +imports: +- name: github.com/ChinmayR/deptestglideA + version: 120a353fc5706d8b5c0cca93b01606ed37a2247a diff --git a/cmd/dep/testdata/harness_tests/init/glide/trans-trans-trans/initial/glide.yaml b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-trans/initial/glide.yaml new file mode 100644 index 0000000000..22cf4f2c17 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-trans/initial/glide.yaml @@ -0,0 +1,10 @@ +package: github.com/golang/notexist +homepage: http://example.com +license: MIT +owners: +- name: Sam Boyer + email: sdboyer@example.com + homepage: http://sdboyer.io +import: +- package: github.com/ChinmayR/deptestglideA + version: v0.6.0 \ No newline at end of file diff --git a/cmd/dep/testdata/harness_tests/init/glide/trans-trans-trans/initial/main.go b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-trans/initial/main.go new file mode 100644 index 0000000000..b137911b15 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-trans/initial/main.go @@ -0,0 +1,11 @@ +// 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 ( + "github.com/ChinmayR/deptestglideA" +) + +type PointToDepTestGlideAv010 deptestglideA.PointToDepTestGlideBv050 diff --git a/cmd/dep/testdata/harness_tests/init/glide/trans-trans-trans/testcase.json b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-trans/testcase.json new file mode 100644 index 0000000000..2031798dd9 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-trans/testcase.json @@ -0,0 +1,10 @@ +{ + "commands": [ + ["init", "-no-examples", "-v"] + ], + "vendor-final": [ + "github.com/ChinmayR/deptestglideA", + "github.com/ChinmayR/deptestglideB", + "github.com/ChinmayR/deptestglideC" + ] +} diff --git a/cmd/dep/testdata/harness_tests/init/glide/trans-trans-unspecified/README.md b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-unspecified/README.md new file mode 100644 index 0000000000..eea3ceeb03 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-unspecified/README.md @@ -0,0 +1,2 @@ +Have two direct dependencies where one specifies a direct transient version, +and the other can take any transient but overlapping version. Resolving should pass. \ No newline at end of file diff --git a/cmd/dep/testdata/harness_tests/init/glide/trans-trans-unspecified/final/Gopkg.lock b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-unspecified/final/Gopkg.lock new file mode 100644 index 0000000000..2cea226574 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/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/ChinmayR/deptestglideA" + packages = ["."] + revision = "703f28fdee407d70dcc4cb774a0fbb82fa70daa9" + version = "v0.4.0" + +[[projects]] + name = "github.com/ChinmayR/deptestglideB" + packages = ["."] + revision = "55b6737d9d84461196123a51baa02b156abc4543" + version = "v0.4.0" + +[[projects]] + name = "github.com/ChinmayR/deptestglideC" + packages = ["."] + revision = "4d3546304e8a1ceb6bb01e7e6201e852abb8ae4d" + version = "v0.1.0" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + inputs-digest = "178a09819c33edcef8eb9c4ed26cc9053aed45e4f04645085feaef7921c8688c" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/cmd/dep/testdata/harness_tests/init/glide/trans-trans-unspecified/final/Gopkg.toml b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-unspecified/final/Gopkg.toml new file mode 100644 index 0000000000..89cdc7c8b7 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-unspecified/final/Gopkg.toml @@ -0,0 +1,8 @@ + +[[constraint]] + name = "github.com/ChinmayR/deptestglideA" + version = "0.4.0" + +[[constraint]] + name = "github.com/ChinmayR/deptestglideB" + version = "0.4.0" diff --git a/cmd/dep/testdata/harness_tests/init/glide/trans-trans-unspecified/initial/glide.lock b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-unspecified/initial/glide.lock new file mode 100644 index 0000000000..d85dd78318 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-unspecified/initial/glide.lock @@ -0,0 +1,7 @@ +hash: 16053c82a71f9bd509b05a4523df6bc418aed2083e4b8bd97a870bbc003256f8 +updated: 2017-03-07T17:02:32.214383898-06:00 +imports: +- name: github.com/ChinmayR/deptestglideA + version: 703f28fdee407d70dcc4cb774a0fbb82fa70daa9 +- name: github.com/ChinmayR/deptestglideB + version: 55b6737d9d84461196123a51baa02b156abc4543 \ No newline at end of file diff --git a/cmd/dep/testdata/harness_tests/init/glide/trans-trans-unspecified/initial/glide.yaml b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-unspecified/initial/glide.yaml new file mode 100644 index 0000000000..3b423f92b5 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-unspecified/initial/glide.yaml @@ -0,0 +1,12 @@ +package: github.com/golang/notexist +homepage: http://example.com +license: MIT +owners: +- name: Sam Boyer + email: sdboyer@example.com + homepage: http://sdboyer.io +import: +- package: github.com/ChinmayR/deptestglideA + version: v0.4.0 +- package: github.com/ChinmayR/deptestglideB + version: v0.4.0 \ No newline at end of file diff --git a/cmd/dep/testdata/harness_tests/init/glide/trans-trans-unspecified/initial/main.go b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-unspecified/initial/main.go new file mode 100644 index 0000000000..562747c7fc --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-unspecified/initial/main.go @@ -0,0 +1,13 @@ +// 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 ( + "github.com/ChinmayR/deptestglideA" + "github.com/ChinmayR/deptestglideB" +) + +type PointToDepTestGlideCv010 deptestglideA.Cversion1 +type PointToDepTestGlideCv020 deptestglideB.CversionAny diff --git a/cmd/dep/testdata/harness_tests/init/glide/trans-trans-unspecified/testcase.json b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-unspecified/testcase.json new file mode 100644 index 0000000000..2031798dd9 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-unspecified/testcase.json @@ -0,0 +1,10 @@ +{ + "commands": [ + ["init", "-no-examples", "-v"] + ], + "vendor-final": [ + "github.com/ChinmayR/deptestglideA", + "github.com/ChinmayR/deptestglideB", + "github.com/ChinmayR/deptestglideC" + ] +} diff --git a/cmd/dep/testdata/harness_tests/init/glide/trans-trans/README.md b/cmd/dep/testdata/harness_tests/init/glide/trans-trans/README.md new file mode 100644 index 0000000000..ab0d0a15a1 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/trans-trans/README.md @@ -0,0 +1,2 @@ +Have two direct dependencies where one specifies a direct transient version, +and the other specified a greater than version. Both versions overlap so resolving should pass. \ No newline at end of file diff --git a/cmd/dep/testdata/harness_tests/init/glide/trans-trans/final/Gopkg.lock b/cmd/dep/testdata/harness_tests/init/glide/trans-trans/final/Gopkg.lock new file mode 100644 index 0000000000..1184b2c41b --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/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/ChinmayR/deptestglideA" + packages = ["."] + revision = "2f77d68963bb3dff94b88330d930cb59714cd2fc" + version = "v0.5.0" + +[[projects]] + name = "github.com/ChinmayR/deptestglideB" + packages = ["."] + revision = "7f8abdec9e29a008d40cfcbb0848b82cc4000d25" + version = "v0.3.0" + +[[projects]] + name = "github.com/ChinmayR/deptestglideC" + packages = ["."] + revision = "73ba3c1897d21e64bec0b89a026a1acb6604e846" + version = "v0.2.0" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + inputs-digest = "e4ba06c77ad87955efd40ad92c8ddc0cd6dba1137fecdc958f02cc79b1f64202" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/cmd/dep/testdata/harness_tests/init/glide/trans-trans/final/Gopkg.toml b/cmd/dep/testdata/harness_tests/init/glide/trans-trans/final/Gopkg.toml new file mode 100644 index 0000000000..c89b13eb2c --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/trans-trans/final/Gopkg.toml @@ -0,0 +1,8 @@ + +[[constraint]] + name = "github.com/ChinmayR/deptestglideA" + version = "0.5.0" + +[[constraint]] + name = "github.com/ChinmayR/deptestglideB" + version = "0.3.0" diff --git a/cmd/dep/testdata/harness_tests/init/glide/trans-trans/initial/glide.lock b/cmd/dep/testdata/harness_tests/init/glide/trans-trans/initial/glide.lock new file mode 100644 index 0000000000..23436f60e3 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/trans-trans/initial/glide.lock @@ -0,0 +1,7 @@ +hash: 16053c82a71f9bd509b05a4523df6bc418aed2083e4b8bd97a870bbc003256f8 +updated: 2017-03-07T17:02:32.214383898-06:00 +imports: +- name: github.com/ChinmayR/deptestglideA + version: 2f77d68963bb3dff94b88330d930cb59714cd2fc +- name: github.com/ChinmayR/deptestglideB + version: 7f8abdec9e29a008d40cfcbb0848b82cc4000d25 \ No newline at end of file diff --git a/cmd/dep/testdata/harness_tests/init/glide/trans-trans/initial/glide.yaml b/cmd/dep/testdata/harness_tests/init/glide/trans-trans/initial/glide.yaml new file mode 100644 index 0000000000..6b0dd70db3 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/trans-trans/initial/glide.yaml @@ -0,0 +1,12 @@ +package: github.com/golang/notexist +homepage: http://example.com +license: MIT +owners: +- name: Sam Boyer + email: sdboyer@example.com + homepage: http://sdboyer.io +import: +- package: github.com/ChinmayR/deptestglideA + version: v0.5.0 +- package: github.com/ChinmayR/deptestglideB + version: v0.3.0 \ No newline at end of file diff --git a/cmd/dep/testdata/harness_tests/init/glide/trans-trans/initial/main.go b/cmd/dep/testdata/harness_tests/init/glide/trans-trans/initial/main.go new file mode 100644 index 0000000000..01b3023c3d --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/trans-trans/initial/main.go @@ -0,0 +1,13 @@ +// 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 ( + "github.com/ChinmayR/deptestglideA" + "github.com/ChinmayR/deptestglideB" +) + +type PointToDepTestGlideCv010 deptestglideA.CversionAny +type PointToDepTestGlideCv020 deptestglideB.Cversion2 diff --git a/cmd/dep/testdata/harness_tests/init/glide/trans-trans/testcase.json b/cmd/dep/testdata/harness_tests/init/glide/trans-trans/testcase.json new file mode 100644 index 0000000000..2031798dd9 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/trans-trans/testcase.json @@ -0,0 +1,10 @@ +{ + "commands": [ + ["init", "-no-examples", "-v"] + ], + "vendor-final": [ + "github.com/ChinmayR/deptestglideA", + "github.com/ChinmayR/deptestglideB", + "github.com/ChinmayR/deptestglideC" + ] +}