зеркало из https://github.com/golang/dep.git
dep: Use the returned solution for the lock
Instead of trying to be fancy about things, just use the returned solution data for the lock
This commit is contained in:
Родитель
ae092cdbb5
Коммит
5b3352dc16
17
ensure.go
17
ensure.go
|
@ -140,23 +140,12 @@ func runEnsure(args []string) error {
|
|||
}
|
||||
solution, err := solver.Solve()
|
||||
if err != nil {
|
||||
handleAllTheFailuresOfTheWorld(err)
|
||||
return errors.Wrap(err, "ensure Solve()")
|
||||
}
|
||||
|
||||
ours := p.l.Projects()
|
||||
for _, lp := range solution.Projects() {
|
||||
i := lp.Ident()
|
||||
var have bool
|
||||
for _, op := range ours {
|
||||
if op.Ident() == i {
|
||||
have = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !have {
|
||||
p.l.P = append(p.l.P, lp)
|
||||
}
|
||||
}
|
||||
p.l.P = solution.Projects()
|
||||
p.l.Memo = solution.InputHash()
|
||||
|
||||
tv, err := ioutil.TempDir("", "vendor")
|
||||
if err != nil {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"memo": "",
|
||||
"memo": "7c9a217ce2f61a2f2fdaa6db60e4e0f9b495aadaf3db51e19a475bbb19cb126c",
|
||||
"projects": [
|
||||
{
|
||||
"name": "github.com/Masterminds/semver",
|
||||
|
|
Загрузка…
Ссылка в новой задаче