Dep: always prune unused packages

Created on 27 Dec 2016  路  5Comments  路  Source: golang/dep

This is a question from my first run with the tool. I imported package A, which lives in repo R. Repo R also contains package B, which I don't use. Should/could dep prune B?

bug help wanted

Most helpful comment

yes my opinion is it should

All 5 comments

yes my opinion is it should

this is how gvt currently works

definitely, yes.

pruning gets all mixed up with checksumming in my mind, but i think pruning we can tackle first, which can then guide our approach to checksumming.

the big questions with pruning are, basically, "what's safe to prune." i'd really, really rather not provide any configuration controls around pruning - at most, there'd be an option to -skip-prune. but that means our pruning approach has to be pretty safe. it's easy to know which Go packages we don't need, but it's much harder to know whether pruning non-Go files, or directories without any Go files at all, is safe. maybe, in order to be safe, we just skip those entirely.

this expanded on in #120

Closing this in favor of #120

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lwc picture lwc  路  3Comments

carolynvs picture carolynvs  路  3Comments

mohanraj-r picture mohanraj-r  路  3Comments

cemremengu picture cemremengu  路  3Comments

deejross picture deejross  路  3Comments