Skip to content

Commit

Permalink
Explain vendor vs proxy (gomods#1403)
Browse files Browse the repository at this point in the history
* adding a section for discussion on when to do vendor directories vs. when to use athens or another proxy server

* adding more detail and an outline

* Adding a bit more 😄

* adding to vendor vs athens faq

* removing reference material from FAQ when to use Athens

* Fixing awkward phrasing in faq docs.
  • Loading branch information
schafer14 authored and arschles committed Oct 16, 2019
1 parent 790c745 commit 81102aa
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/content/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,23 @@ Which currently includes:
- hg
- bzr
- fossil

### When should I use a vendor directory, and when should I use Athens?

The Go community has used vendor directories for a long time before module proxies like Athens came along, so naturally each group collaborating on code should decide for themselves whether they want to use a vendor directory, use Athens, or do both!

Using a vendor directory (without a proxy) is valuable when:

- CI/CD systems don't have access to an Athens (even if it's internal)
- When the vendor directory is so small that it is still faster to check it out from a repo than it is to pull zip files from the server
- If you're coming from glide/dep or another dependency management system that leveraged the vendor directory

Athens (without a vendor directory) is valuable when:

- You have a new project
- Your team requires that you use Athens (i.e. for isolation or dependency auditing)
- Your vendor directory is large and causing slow checkouts and downloading from Athens speeds the build up
- For developers slow checkouts will not be as much of a problem as for ci tools which frequently need to checkout fresh copies of the project
- You want to remove the vendor directory from your project to:
- Reduce noise in pull requests
- Reduce difficulty doing fuzzy file searching in your project

0 comments on commit 81102aa

Please sign in to comment.