-
Notifications
You must be signed in to change notification settings - Fork 1k
Add status feedback on memo mismatch #611
Add status feedback on memo mismatch #611
Conversation
|
It's not clear to me what is meant by "missing packages". I'm guessing you mean missing from vendor? It would help to put that in the message. For the second case, when there's a mismatch but no "missing packages", unless missing packages is the only way to cause a mismatch it seems odd to mention that at all. I'd lean towards saying "Lock memo mismatch. Run |
Yeah, being more specific in the message would be better. Right now, status doesn't checks what's in vendor/. Should it? It parses the project root, takes the manifest from file, computes a memo hash and compares it to the one found in lock file. So, I think adding an extra line about the addition of new import would be better.
Yeah, I think it's not required to mention "missing packages" here. But this can be made more informative like
Looks good? |
83681b5
to
e525dc4
Compare
Nope! 😄 We have another story for vendor validation.
I pulled down your PR, correct me if I'm wrong, but your error messages don't cover the bolded case, right? So it's just the first scenario that this PR addresses? Just making sure I tested the right stuff.
|
cmd/dep/status.go
Outdated
ctx.Loggers.Out.Print(buf.String()) | ||
if memoMismatch { | ||
if hasMissingPkgs { | ||
ctx.Loggers.Err.Println("Lock memo mismatch due to the following missing packages:\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's clarify where the packages are missing, like Lock memo mismatch due to the following packages missing from the lock:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the message and squashed into a single commit.
@carolynvs yes, just the first scenario, no missing packages, just extra packages. |
e525dc4
to
a5cbe76
Compare
@sdboyer I was going to click the merge button for great glory but thought you'd like to weigh in since this PR was based on your feedback. |
4cec5ac
to
b4e0ef0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just one tiny tiny little spelling nit 😄
cmd/dep/status.go
Outdated
@@ -400,7 +416,7 @@ func runStatusAll(loggers *dep.Loggers, out outputter, p *dep.Project, sm gps.So | |||
loggers.Err.Printf("\t%s: %s\n", fail.ex, fail.err.Error()) | |||
} | |||
|
|||
return errors.New("address issues with undeducable import paths to get more status information.") | |||
return memoMismatch, hasMissingPkgs, errors.New("address issues with undeducable import paths to get more status information.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: s/undeducable/undeducible/
- Adds feedback to status when there's a lock memo mismatch. For mismatch with missing packages, it lists the packages and provides instructions to fix the issue. For memo mismatch due to modified manifest, it instructs the user about how to generate a new lock.
b4e0ef0
to
6079300
Compare
Fixed the typo and squashed the commits. |
thanks! 🎉 |
mismatch with missing packages, it lists the packages and provides
instructions to fix the issue. For memo mismatch with no missing
packages, it instructs the user about how to generate a new lock.
Fixes #161 fixes #664