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

Implement new spec for dep ensure #489

Merged
merged 39 commits into from
Aug 4, 2017
Merged

Conversation

sdboyer
Copy link
Member

@sdboyer sdboyer commented Apr 30, 2017

This PR is a WIP towards implementing the new spec for dep ensure, as given in the doc linked from #277.

Fixes #883

Copy link
Contributor

@ascandella ascandella left a comment

Choose a reason for hiding this comment

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

a bit over my head for now, just one small thing popped out

applyUpdateArgs(args, &params)
} else {
err := applyEnsureArgs(ctx.Loggers.Err, args, cmd.overrides, p, sm, &params)
var fail error
Copy link
Contributor

Choose a reason for hiding this comment

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

unused variable?

@sdboyer
Copy link
Member Author

sdboyer commented Jun 5, 2017

Pretty close to all tests passing, now - just three small harness ones left.

After that, docs, covering some more crucial failure cases, and writing up a ton of issues. Then this'll be ready to 🚢

@sdboyer sdboyer self-assigned this Jun 6, 2017
@sdboyer
Copy link
Member Author

sdboyer commented Jul 31, 2017

OK, we've got the basics in place! i also refactored to correctly validate and handle cases where multiple packages from a single project are specified.

now, i need to catch up and resolve conflicts, and then add a bunch more test cases. (and fix whatever bugs those tests reveal)

func (cmd *ensureCommand) Args() string { return "[spec...]" }
func (cmd *ensureCommand) Name() string { return "ensure" }
func (cmd *ensureCommand) Args() string {
return "[-update | -add] [-no-vendor | -vendor-only] [<spec>...]"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't we add -examples and -dry-run here?

Copy link
Member Author

Choose a reason for hiding this comment

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

oh yes, i missed -dry-run, tyty.

-examples...i'm not actually sure, it's a flavor of a help command. seems like those are often omitted in arg lists like these?

Also some comment cleanup, and relocate an errant test.
@sdboyer sdboyer requested a review from darkowlzz as a code owner August 1, 2017 04:25
@@ -261,7 +261,8 @@ func runStatusAll(ctx *dep.Ctx, out outputter, p *dep.Project, sm gps.SourceMana
var digestMismatch, hasMissingPkgs bool

if p.Lock == nil {
return digestMismatch, hasMissingPkgs, errors.Errorf("no Gopkg.lock found. Run `dep ensure` to generate lock file")
// TODO if we have no lock file, do...other stuff
return digestMismatch, hasMissingPkgs, nil
Copy link
Collaborator

@darkowlzz darkowlzz Aug 3, 2017

Choose a reason for hiding this comment

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

Do not forget to rebase this 🙂

Copy link
Member Author

Choose a reason for hiding this comment

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

ahh ty that must have happened in a git checkout --strategy=ours

Copy link
Member Author

Choose a reason for hiding this comment

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

this also indicates a detailed review of the changes to existing files is necessary - i may have unintentionally overwritten some other changes, too.

Copy link
Member Author

Choose a reason for hiding this comment

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

should be fixed, i redid the merge without --strategy=ours, that was dumb

@sdboyer
Copy link
Member Author

sdboyer commented Aug 4, 2017

here we go!

@sdboyer sdboyer changed the title [WIP] Implement new spec for dep ensure Implement new spec for dep ensure Aug 4, 2017
@sdboyer sdboyer merged commit 7a91b79 into golang:master Aug 4, 2017
sdboyer added a commit to sdboyer/dep that referenced this pull request Aug 11, 2017
carolynvs added a commit that referenced this pull request Aug 13, 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.

6 participants