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

dep ensure --dry-run seems broken #971

Closed
tnozicka opened this issue Aug 8, 2017 · 5 comments
Closed

dep ensure --dry-run seems broken #971

tnozicka opened this issue Aug 8, 2017 · 5 comments

Comments

@tnozicka
Copy link

tnozicka commented Aug 8, 2017

What version of Go (go version) and dep (git describe --tags) are you using?

go version go1.8.3 linux/amd64
dep - v0.3.0-22-g11758a7

What dep command did you run?

$ dep ensure
$ dep ensure --dry-run
Would have populated vendor/ directory from Gopkg.lock

What did you expect to see?

Empty output

What did you see instead?

Would have populated vendor/ directory from Gopkg.lock

The reason to use --dry-run is to see if there would be any changes done to e.g. check if vendor/ corresponds to current state of Gopkg.toml and .lock. It shouldn't say it would populate vendor/ if there are no changes.

@sdboyer
Copy link
Member

sdboyer commented Aug 8, 2017

It shouldn't say it would populate vendor/ if there are no changes.

it certainly shouldn't! problem is, we can't actually check if vendor/ is what Gopkg.lock says it should be right now. that's the capability that #121 will get us (and i'm very, very happy that we're now making progress in that direction - #959).

in the meantime, we've had to opt for the safe approach - just regenerating vendor/ on every dep ensure run.

@tnozicka
Copy link
Author

tnozicka commented Aug 8, 2017

If you regenerate vendor/ now, the easiest thing would be to compare the new directory with the old one. With that said if that solution should change shortly it might not worth the effort...

@sdboyer
Copy link
Member

sdboyer commented Aug 8, 2017

to compare the new directory with the old one.

hmm, i suppose we could generate some sort of diff output for this. if there's a lib out there that produces readable output, given two trees of input, then we could integrate it, for now.

and that might be worth it, because while the verification work is progressing nicely right now, it's still complex work. my conservative estimate is that it probably won't be fully wrapped up and in place for another couple months.

@JelteF
Copy link
Contributor

JelteF commented Aug 9, 2017

It seems like you're looking for the functionality described here: #950

@sdboyer
Copy link
Member

sdboyer commented Nov 15, 2017

doing some queue-cleaning - the output here is now a fair bit clearer.

@sdboyer sdboyer closed this as completed Nov 15, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants