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

Massage the pkg spec found in Godep.json for vendor #120

Merged
merged 2 commits into from
Apr 21, 2016

Conversation

freeformz
Copy link
Contributor

Godep can save other packages other than what's local.

This is usually used to vendor one or more additional main packages like
github.com/mattes/migrate. With the old school godep workspace this just
worked because the workspace was added to the GOPATH by godep go install. But with the vendor experiment we need to prefix those paths
with the <the package>/vendor for them to be go installable.

So this patch checks to see if the directory for the packages that
aren't .* packages exists in <repo>/vendor and if they do, alters
the package name to <repo package name>/vendor/<package>.

Godep can save other packages other than what's local.

This is usually used to vendor one or more additional main packages like
github.com/mattes/migrate. With the old school godep workspace this just
worked because the workspace was added to the GOPATH by `godep go
install`. But with the vendor experiment we need to prefix those paths
with the `<the package>/vendor` for them to be `go install`able.

So this patch checks to see if the directory for the packages that
aren't `.*` packages exists in `<repo>/vendor` and if they do, alters
the package name to `<repo package name>/vendor/<package>`.
@freeformz
Copy link
Contributor Author

/cc @jingweno @bernerdschaefer

@gylaz
Copy link

gylaz commented Apr 21, 2016

This has solved the issue for us, which @bernerdschaefer was helping me out with.

@freeformz freeformz merged commit b8d6a06 into master Apr 21, 2016
@owenthereal
Copy link
Contributor

👍

@cyberdelia cyberdelia deleted the massagePkgSpecForVendor branch April 21, 2016 23:01
freeformz pushed a commit that referenced this pull request Apr 25, 2016
Includes:
- massage the installable package spec to include the name + vendor
  directory when vendor is used:
  #120
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants