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

Closed
flibustenet opened this issue Mar 3, 2018 · 2 comments
Closed

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

flibustenet opened this issue Mar 3, 2018 · 2 comments
Milestone

Comments

@flibustenet
Copy link

flibustenet 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
@kardianos
Copy link
Contributor

@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.

@rsc
Copy link
Contributor

rsc commented Mar 27, 2018

What @kardianos said is exactly right.

@rsc rsc closed this as completed 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.
Projects
None yet
Development

No branches or pull requests

4 participants