From e1f5c5f69d41d1a6d86732970cb415695f41654e Mon Sep 17 00:00:00 2001 From: Chinmay Raval Date: Fri, 10 Nov 2017 09:18:13 -0800 Subject: [PATCH] cmd/init: Enable importing external configuration from dependencies during init Enable importing other tools and add integration tests - Turned off skip tools flag by default - Added glide integration tests for the init case --- CHANGELOG.md | 5 +++- cmd/dep/init.go | 3 +-- .../harness_tests/init/glide/case3/README.md | 2 +- .../init/glide/case3/final/Gopkg.lock | 4 +-- .../{testcase.json.ignore => testcase.json} | 0 .../init/glide/corrupt-glide/README.md | 1 + .../glide/corrupt-glide/initial/glide.lock | 5 ++++ .../glide/corrupt-glide/initial/glide.yaml | 10 +++++++ .../init/glide/corrupt-glide/initial/main.go | 11 ++++++++ .../init/glide/corrupt-glide/testcase.json | 6 +++++ .../glide/direct-trans-conflict/README.md | 1 + .../direct-trans-conflict/initial/glide.lock | 7 +++++ .../direct-trans-conflict/initial/glide.yaml | 12 +++++++++ .../direct-trans-conflict/initial/main.go | 13 +++++++++ .../glide/direct-trans-conflict/testcase.json | 6 +++++ .../glide/direct-trans-no-conflict/README.md | 1 + .../direct-trans-no-conflict/final/Gopkg.lock | 21 +++++++++++++++ .../direct-trans-no-conflict/final/Gopkg.toml | 7 +++++ .../initial/glide.lock | 5 ++++ .../initial/glide.yaml | 12 +++++++++ .../direct-trans-no-conflict/initial/main.go | 13 +++++++++ .../direct-trans-no-conflict/testcase.json | 9 +++++++ .../init/glide/trans-trans-conflict/README.md | 1 + .../trans-trans-conflict/initial/glide.lock | 7 +++++ .../trans-trans-conflict/initial/glide.yaml | 12 +++++++++ .../trans-trans-conflict/initial/main.go | 13 +++++++++ .../trans-trans-conflict/testcase.json.ignore | 6 +++++ .../init/glide/trans-trans-trans/README.md | 1 + .../glide/trans-trans-trans/final/Gopkg.lock | 27 +++++++++++++++++++ .../glide/trans-trans-trans/final/Gopkg.toml | 4 +++ .../trans-trans-trans/initial/glide.lock | 5 ++++ .../trans-trans-trans/initial/glide.yaml | 10 +++++++ .../glide/trans-trans-trans/initial/main.go | 11 ++++++++ .../glide/trans-trans-trans/testcase.json | 10 +++++++ .../glide/trans-trans-unspecified/README.md | 2 ++ .../trans-trans-unspecified/final/Gopkg.lock | 27 +++++++++++++++++++ .../trans-trans-unspecified/final/Gopkg.toml | 8 ++++++ .../initial/glide.lock | 7 +++++ .../initial/glide.yaml | 12 +++++++++ .../trans-trans-unspecified/initial/main.go | 13 +++++++++ .../trans-trans-unspecified/testcase.json | 10 +++++++ .../init/glide/trans-trans/README.md | 2 ++ .../init/glide/trans-trans/final/Gopkg.lock | 27 +++++++++++++++++++ .../init/glide/trans-trans/final/Gopkg.toml | 8 ++++++ .../init/glide/trans-trans/initial/glide.lock | 7 +++++ .../init/glide/trans-trans/initial/glide.yaml | 12 +++++++++ .../init/glide/trans-trans/initial/main.go | 13 +++++++++ .../init/glide/trans-trans/testcase.json | 10 +++++++ 48 files changed, 413 insertions(+), 6 deletions(-) rename cmd/dep/testdata/harness_tests/init/glide/case3/{testcase.json.ignore => testcase.json} (100%) create mode 100644 cmd/dep/testdata/harness_tests/init/glide/corrupt-glide/README.md create mode 100644 cmd/dep/testdata/harness_tests/init/glide/corrupt-glide/initial/glide.lock create mode 100644 cmd/dep/testdata/harness_tests/init/glide/corrupt-glide/initial/glide.yaml create mode 100644 cmd/dep/testdata/harness_tests/init/glide/corrupt-glide/initial/main.go create mode 100644 cmd/dep/testdata/harness_tests/init/glide/corrupt-glide/testcase.json create mode 100644 cmd/dep/testdata/harness_tests/init/glide/direct-trans-conflict/README.md create mode 100644 cmd/dep/testdata/harness_tests/init/glide/direct-trans-conflict/initial/glide.lock create mode 100644 cmd/dep/testdata/harness_tests/init/glide/direct-trans-conflict/initial/glide.yaml create mode 100644 cmd/dep/testdata/harness_tests/init/glide/direct-trans-conflict/initial/main.go create mode 100644 cmd/dep/testdata/harness_tests/init/glide/direct-trans-conflict/testcase.json create mode 100644 cmd/dep/testdata/harness_tests/init/glide/direct-trans-no-conflict/README.md create mode 100644 cmd/dep/testdata/harness_tests/init/glide/direct-trans-no-conflict/final/Gopkg.lock create mode 100644 cmd/dep/testdata/harness_tests/init/glide/direct-trans-no-conflict/final/Gopkg.toml create mode 100644 cmd/dep/testdata/harness_tests/init/glide/direct-trans-no-conflict/initial/glide.lock create mode 100644 cmd/dep/testdata/harness_tests/init/glide/direct-trans-no-conflict/initial/glide.yaml create mode 100644 cmd/dep/testdata/harness_tests/init/glide/direct-trans-no-conflict/initial/main.go create mode 100644 cmd/dep/testdata/harness_tests/init/glide/direct-trans-no-conflict/testcase.json create mode 100644 cmd/dep/testdata/harness_tests/init/glide/trans-trans-conflict/README.md create mode 100644 cmd/dep/testdata/harness_tests/init/glide/trans-trans-conflict/initial/glide.lock create mode 100644 cmd/dep/testdata/harness_tests/init/glide/trans-trans-conflict/initial/glide.yaml create mode 100644 cmd/dep/testdata/harness_tests/init/glide/trans-trans-conflict/initial/main.go create mode 100644 cmd/dep/testdata/harness_tests/init/glide/trans-trans-conflict/testcase.json.ignore create mode 100644 cmd/dep/testdata/harness_tests/init/glide/trans-trans-trans/README.md create mode 100644 cmd/dep/testdata/harness_tests/init/glide/trans-trans-trans/final/Gopkg.lock create mode 100644 cmd/dep/testdata/harness_tests/init/glide/trans-trans-trans/final/Gopkg.toml create mode 100644 cmd/dep/testdata/harness_tests/init/glide/trans-trans-trans/initial/glide.lock create mode 100644 cmd/dep/testdata/harness_tests/init/glide/trans-trans-trans/initial/glide.yaml create mode 100644 cmd/dep/testdata/harness_tests/init/glide/trans-trans-trans/initial/main.go create mode 100644 cmd/dep/testdata/harness_tests/init/glide/trans-trans-trans/testcase.json create mode 100644 cmd/dep/testdata/harness_tests/init/glide/trans-trans-unspecified/README.md create mode 100644 cmd/dep/testdata/harness_tests/init/glide/trans-trans-unspecified/final/Gopkg.lock create mode 100644 cmd/dep/testdata/harness_tests/init/glide/trans-trans-unspecified/final/Gopkg.toml create mode 100644 cmd/dep/testdata/harness_tests/init/glide/trans-trans-unspecified/initial/glide.lock create mode 100644 cmd/dep/testdata/harness_tests/init/glide/trans-trans-unspecified/initial/glide.yaml create mode 100644 cmd/dep/testdata/harness_tests/init/glide/trans-trans-unspecified/initial/main.go create mode 100644 cmd/dep/testdata/harness_tests/init/glide/trans-trans-unspecified/testcase.json create mode 100644 cmd/dep/testdata/harness_tests/init/glide/trans-trans/README.md create mode 100644 cmd/dep/testdata/harness_tests/init/glide/trans-trans/final/Gopkg.lock create mode 100644 cmd/dep/testdata/harness_tests/init/glide/trans-trans/final/Gopkg.toml create mode 100644 cmd/dep/testdata/harness_tests/init/glide/trans-trans/initial/glide.lock create mode 100644 cmd/dep/testdata/harness_tests/init/glide/trans-trans/initial/glide.yaml create mode 100644 cmd/dep/testdata/harness_tests/init/glide/trans-trans/initial/main.go create mode 100644 cmd/dep/testdata/harness_tests/init/glide/trans-trans/testcase.json diff --git a/CHANGELOG.md b/CHANGELOG.md index d66dc79222..ab99a73e8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ BUG FIXES: * Releases targeting Windows now have a `.exe` suffix (#1291). * Adaptively recover from dirty and corrupted git repositories in cache (#1279). +WIP: + +* dep: Enable importing external configuration from dependencies during init (#1277) + IMPROVEMENTS: * Log as dependencies are pre-fetched during dep init ([#1176](https://github.com/golang/dep/pull/1176)). @@ -52,7 +56,6 @@ WIP: * gps: Process canonical import paths. (#1017) * gps: Persistent cache. (#1127, #1215) - # v0.3.1 * gps: Add satisfiability check for case variants (#1079) diff --git a/cmd/dep/init.go b/cmd/dep/init.go index 3071ca807e..dbed8e0bce 100644 --- a/cmd/dep/init.go +++ b/cmd/dep/init.go @@ -160,8 +160,7 @@ 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 + copyLock := *p.Lock // Copy lock before solving. Use this to separate new lock projects from solved lock params := gps.SolveParameters{ RootDir: root, 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-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.ignore b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-conflict/testcase.json.ignore new file mode 100644 index 0000000000..e90b380160 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/init/glide/trans-trans-conflict/testcase.json.ignore @@ -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" + ] +}