Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

[WIP] Import transitive constraints from glide #920

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion cmd/dep/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions cmd/dep/testdata/harness_tests/init/case4/final/Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Test that if we can only accept versions of a dependency that have a broken glide.yaml, we will fail.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package: .
import:
- package: github.com/chriswhelix/deptestglide1
version: ^2.1.0
Original file line number Diff line number Diff line change
@@ -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)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"commands": [
["init", "-no-examples"]
],
"error-expected": "2.1.0: Unable to parse",
"gopath-initial": {}
}
Original file line number Diff line number Diff line change
@@ -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.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

[[constraint]]
name = "github.com/chriswhelix/deptestglide1"

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package: .
import:
- package: github.com/chriswhelix/deptestglide1
Original file line number Diff line number Diff line change
@@ -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)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"commands": [
["init", "-no-examples"]
],
"error-expected": "",
"gopath-initial": {},
"vendor-final": [
"github.com/chriswhelix/deptestglide1",
"github.com/sdboyer/deptest"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Baseline case for single direct reference to deptest.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

[[constraint]]
name = "github.com/sdboyer/deptest"
version = ">0.8.0"

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package: .
import:
- package: github.com/sdboyer/deptest
version: ">0.8.0"
Original file line number Diff line number Diff line change
@@ -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)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"commands": [
["init", "-no-examples"]
],
"error-expected": "",
"gopath-initial": {},
"vendor-final": [
"github.com/sdboyer/deptest"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Both direct and transitive references, but conflicting.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package: .
import:
- package: github.com/sdboyer/deptest
version: "^1.0.0"
- package: github.com/chriswhelix/deptestglide1
version: gt080
Original file line number Diff line number Diff line change
@@ -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)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"commands": [
["init", "-no-examples"]
],
"error-expected": "No versions of github.com/chriswhelix/deptestglide1 met constraints",
"gopath-initial": {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Both direct and transitive references, with overlapping versions available.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

[[constraint]]
name = "github.com/chriswhelix/deptestglide1"
version = "gt080"

[[constraint]]
name = "github.com/sdboyer/deptest"
version = ">0.8.0"

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package: .
import:
- package: github.com/sdboyer/deptest
version: ">0.8.0"
- package: github.com/chriswhelix/deptestglide1
version: gt080
Original file line number Diff line number Diff line change
@@ -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)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"commands": [
["init", "-no-examples"]
],
"error-expected": "",
"gopath-initial": {},
"vendor-final": [
"github.com/chriswhelix/deptestglide1",
"github.com/sdboyer/deptest"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Baseline case for single transitive reference to deptest.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

[[constraint]]
name = "github.com/chriswhelix/deptestglide1"
version = "gt080"

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package: .
import:
- package: github.com/chriswhelix/deptestglide1
version: gt080
Loading