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

Update out-of-sync error message in ensure #1109

Merged
merged 1 commit into from
Sep 3, 2017
Merged
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
4 changes: 2 additions & 2 deletions cmd/dep/ensure.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ func (cmd *ensureCommand) runUpdate(ctx *dep.Ctx, args []string, p *dep.Project,
// "pending" changes, or the -update that caused the problem?).
// TODO(sdboyer) reduce this to a warning?
if !bytes.Equal(p.Lock.InputHash(), solver.HashInputs()) {
return errors.Errorf("%s and %s are out of sync. Run a plain dep ensure to resync them before attempting to -update", dep.ManifestName, dep.LockName)
return errors.Errorf("%s is out of sync with %s or the project's imports. Run \"dep ensure\" to resync them first before running \"dep ensure -update\"", dep.LockName, dep.ManifestName)
}

// When -update is specified without args, allow every dependency to change
Expand Down Expand Up @@ -428,7 +428,7 @@ func (cmd *ensureCommand) runAdd(ctx *dep.Ctx, args []string, p *dep.Project, sm
// "pending" changes, or the -add that caused the problem?).
// TODO(sdboyer) reduce this to a warning?
if p.Lock != nil && !bytes.Equal(p.Lock.InputHash(), solver.HashInputs()) {
return errors.Errorf("%s and %s are out of sync. Run a plain dep ensure to resync them before attempting to -add", dep.ManifestName, dep.LockName)
return errors.Errorf("%s is out of sync with %s or the project's imports. Run \"dep ensure\" to resync them first before running \"dep ensure -add\"", dep.LockName, dep.ManifestName)
}

rm, _ := params.RootPackageTree.ToReachMap(true, true, false, p.Manifest.IgnoredPackages())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"commands": [
["ensure", "-add", "foobar.com/baz"]
],
"error-expected": "Gopkg.toml and Gopkg.lock are out of sync. Run a plain dep ensure to resync them before attempting to -add"
"error-expected": "Gopkg.lock is out of sync with Gopkg.toml or the project's imports. Run \"dep ensure\" to resync them first before running \"dep ensure -add\""
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"commands": [
["ensure", "-update"]
],
"error-expected": "Gopkg.toml and Gopkg.lock are out of sync. Run a plain dep ensure to resync them before attempting to -update"
"error-expected": "Gopkg.lock is out of sync with Gopkg.toml or the project's imports. Run \"dep ensure\" to resync them first before running \"dep ensure -update\""
}