Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/vgo: hardlink local per project vendor with src/v #24228

flibustenet opened this issue Mar 3, 2018 · 2 comments


Copy link

commented Mar 3, 2018

One little problem with vendoring in each projects is duplicating of the same files on each projects.
vgo vendor could have an option to hardlink the files from $GOPATH/src/v to project vendor.

edit: it can also help to prune src/v when a project is deleted.
We will also see a lot of duplicates files when each version of a package is kept.

@gopherbot gopherbot added this to the vgo milestone Mar 3, 2018

This comment has been minimized.

Copy link

commented Mar 5, 2018

@flibustenet There are a few issues with this suggestion:

  1. Hardlinks aren't supported on Windows, which is a first class target.
  2. Part of the point of vgo is that you don't need to keep a vendor directory around.
  3. For those who do want to keep the vendor directory around for dependencies, part of the point is to physically duplicate the data. If you want to save disk space, I'd recommend you use a content addressable file system that automatically de-duplicates files.

This comment has been minimized.

Copy link

commented Mar 27, 2018

What @kardianos said is exactly right.

@rsc rsc closed this Mar 27, 2018
@golang golang locked and limited conversation to collaborators Mar 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
4 participants
You can’t perform that action at this time.