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

fix(status): tableOutput show override constraints #918

Merged
merged 2 commits into from
Aug 12, 2017

Conversation

darkowlzz
Copy link
Collaborator

What does this do / why do we need it?

Adds hasOverride attribute to BasicStatus struct and use it to append
"(override)" to projects with overridden constraints.

$ dep status
PROJECT                        CONSTRAINT     VERSION        REVISION  LATEST   PKGS USED
github.com/darkowlzz/openurl   branch master  branch master  673a04d   673a04d  1
github.com/sdboyer/deptest     *(override)    v0.8.1         3f4c3be   ff2948a  1
github.com/sdboyer/deptestdos  ^2.0.0         v2.0.0         5c60720   5c60720  1

What should your reviewer look out for in this PR?

The way overridden constraints are tracked in BasicStatus.

Do you need help or clarification on anything?

Would this be a good way to show overridden constraints?

Which issue(s) does this PR fix?

Fixes #892

@darkowlzz
Copy link
Collaborator Author

Haven't added tests yet. Will add them once we decide how to correctly implement and show the results.

Copy link
Member

@sdboyer sdboyer left a comment

Choose a reason for hiding this comment

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

i'm not sure the BEST way to show them, but this seems like a step forward, which is good enough.

@@ -95,6 +95,9 @@ func (out *tableOutput) BasicLine(bs *BasicStatus) {
} else {
constraint = bs.Constraint.String()
}
if bs.hasOverride {
constraint += "(override)"
Copy link
Member

Choose a reason for hiding this comment

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

let's add a leading space

Add `hasOverride` attribute to `BasicStatus` struct and use it to append
"(override)" to projects with overridden constraints.

Closes golang#892
Add integration test for tableOutput show override constraints.
@sdboyer
Copy link
Member

sdboyer commented Aug 11, 2017

@darkowlzz merge away!

@darkowlzz darkowlzz merged commit 5d885c9 into golang:master Aug 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dep status output should represent overridden rules differently
3 participants