Skip to content
This repository has been 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

Conversation

ibrasho
Copy link
Collaborator

@ibrasho ibrasho commented Sep 1, 2017

What does this do / why do we need it?

Update out of sync error message from:

Gopkg.toml and Gopkg.lock are out of sync. Run a plain dep ensure to resync them before attempting to -add

to:

Gopkg.lock is out of sync with either Gopkg.toml or the project code. Run a plain dep ensure to resync them before attempting to -add

for both add and update.

Do you need help or clarification on anything?

Any better suggestions?

Which issue(s) does this PR fix?

fixes #1104

Copy link
Collaborator

@carolynvs carolynvs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"plain ensure" is a bite vague, especially to anyone who isn't a native English speaker. Perhaps we could just tell them exactly which command to run?

Gopkg.lock is out of sync with either Gopkg.toml or the project code. First run "dep ensure" to resync them first, and then run "dep ensure -add ..."

@sdboyer
Copy link
Member

sdboyer commented Sep 1, 2017

agreed with @carolynvs. also, s/the project code/your project's imports/ - equally succinct, but more specific.

@sdboyer
Copy link
Member

sdboyer commented Sep 1, 2017

oh, also, drop the "either" - it's one or the other, or both.

@ibrasho
Copy link
Collaborator Author

ibrasho commented Sep 2, 2017

Does this work?

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"

@ibrasho ibrasho force-pushed the fix-out-of-sync-error branch from 51d77e8 to 8a8d73c Compare September 2, 2017 06:59
@carolynvs
Copy link
Collaborator

I like it! 👍

@carolynvs carolynvs merged commit 238d8af into golang:master Sep 3, 2017
@akutz
Copy link
Contributor

akutz commented Sep 4, 2017

Hi @carolynvs and @ibrasho,

I personally would like the ability to run dep ensure -update even if things are out of sync. It would apply in cases when I update the toml file directly to update a specific dependency version and simply want to do dep ensure update -that/dep/. Maybe I want the toml constraint to reflect the actual version and not just the allowed version vis a vi the constraint.

@sdboyer
Copy link
Member

sdboyer commented Sep 5, 2017

I personally would like the ability to run dep ensure -update even if things are out of sync. It would apply in cases when I update the toml file directly to update a specific dependency version and simply want to do dep ensure update -that/dep/. Maybe I want the toml constraint to reflect the actual version and not just the allowed version vis a vi the constraint.

jumping in to note that i discussed this with @akutz the other day on the phone, and decided that i was probably being a bit too strict about not allowing users to do this. so i'm cool with relaxing that requirement - though it's still probably worth having a warning.

@ibrasho ibrasho deleted the fix-out-of-sync-error branch September 5, 2017 13:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dep ensure -update indicates out-of-sync when files in sync; proj isn't
5 participants