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

Feature/flag to disable help text #477

Merged

Conversation

EwanValentine
Copy link
Contributor

No description provided.

@sdboyer
Copy link
Member

sdboyer commented Apr 28, 2017

The flag needs to be on init, not ensure 😄

@sdboyer
Copy link
Member

sdboyer commented Apr 28, 2017

Oh wait, looking at these more...ugh, yeah, because we still have #454 to deal with, those other commands are still writing the manifest. Uggghhhhhh.

Let's put this on hold for a second until we can resolve that. Sorry 😦

@EwanValentine
Copy link
Contributor Author

@sdboyer Ensure and remove both use sw.Write so I had to pass a value in for those, unless I make it an optional argument?

@EwanValentine
Copy link
Contributor Author

Okay, not a problem :)

@carolynvs
Copy link
Collaborator

I just submitted a fix so that only dep init writes to the manifest (so ensure and remove won't modify it anymore) which I think will help out this PR.

@sdboyer
Copy link
Member

sdboyer commented Apr 28, 2017

yep, should be ready to move this ahead

@EwanValentine
Copy link
Contributor Author

Ace! Thanks! I'll make those changes shortly

@EwanValentine
Copy link
Contributor Author

All passing :)

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.

Just one little nit

txn_writer.go Outdated
@@ -320,9 +320,16 @@ func (sw *SafeWriter) Write(root string, sm gps.SourceManager) error {
return errors.Wrap(err, "failed to marshal manifest to TOML")
}

initOutput := ""
Copy link
Member

Choose a reason for hiding this comment

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

nit: more idiomatic to do this as var initOutput string

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call!

@sdboyer
Copy link
Member

sdboyer commented Apr 28, 2017

We do need to make sure this is covered by tests. Fortunately, there's an easy mechanism, there - for all the tests under cmd/dep/testdata, let's go through and add the -no-examples flag to dep init. That'll have the added benefit of making changes to this helptext (which will inevitably happen) cause a little less churn on the test files.

Once you make the change, you'll need to run go test -update; that'll rewrite the "golden" files. See [the README] on the test harness for more info about all that.

cool?

@EwanValentine
Copy link
Contributor Author

I was going to ask how the tests work actually, that's perfect, I'll go through those now

@sdboyer
Copy link
Member

sdboyer commented Apr 29, 2017

@EwanValentine Ah, so what you did covers the newly-added logic, which is great. But I was looking for a bit more; I was hoping you'd go through the existing tests and add -no-examples to their dep init calls, in order to minimize churn on the output files in the future (when this example output inevitably changes).

@EwanValentine
Copy link
Contributor Author

Apologies, yeah I see what you mean now, will update shortly

@EwanValentine
Copy link
Contributor Author

@sdboyer hopefully this is what you mean

@sdboyer
Copy link
Member

sdboyer commented Apr 30, 2017

@EwanValentine yep, that's exactly what i was going for. Thanks, in we go! 🎉

@sdboyer sdboyer merged commit 1bb83aa into golang:master Apr 30, 2017
ibrasho pushed a commit to ibrasho-forks/dep that referenced this pull request May 10, 2017
…ble-help-text

Feature/flag to disable help text
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.

None yet

4 participants