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

Design doc for go package management #2643

Merged
merged 3 commits into from
Jun 30, 2017

Conversation

typhoonzero
Copy link
Contributor

@typhoonzero typhoonzero commented Jun 28, 2017

Design doc for adding go package management tool glide.

Related PR: #2627
#2583
Related Issue: #2605

which download a specific version or commit id of the dependency.
1. Some locations can not access external dependencies through the internet, as mentioned
in https://github.com/PaddlePaddle/Paddle/issues/2605. Using package management
tools can package the dependencies as a "vendor" package, which can be mirrored
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we planning to store the code in a different mirror site or just check in into our Github repo. Does glide offers a way to download dependency from mirror on a different site than Github?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vendor codes need to store in a different mirror site as it may be very large. I'll find some site can offer file mirrors then add documents to the implement PR.

glide doesn't offer mirror sites for store things.


### Using Package Manager For Go

Building go binaries and libraries need to satisfy their dependencies, generally
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go => Go

we can do `go get ./...` to download and compile all external dependencies. The
problems are:

1. `go get` will always get the latest code from master branch, so when an external
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

master branch => the default branch from the remote repo

problems are:

1. `go get` will always get the latest code from master branch, so when an external
project updated and deprecates something or made changes to their APIs, builds
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so when an external project updated and deprecates something or made changes to their APIs, builds may not pass.

==>

so changes of dependents might break the build.

at many cloud file hosting, so users what to compile paddle by themselves can
download this "vendor" package from a mirror site.

#### Godep vs. Glide
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here https://github.com/golang/go/wiki/PackageManagementTools list dozens of Go package managers. Can we justify why we choose Glide?

Copy link
Contributor Author

@typhoonzero typhoonzero Jun 30, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, forget to reply to update. Comments are done.

project updated and deprecates something or made changes to their APIs, builds
may not pass. This is very different with what we already have in `cmake/external`
which download a specific version or commit id of the dependency.
1. Some locations can not access external dependencies through the internet, as mentioned
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point!

Copy link
Collaborator

@wangkuiyi wangkuiyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM++

Thanks for the link to the comparisons of Go package managers! @typhoonzero

@typhoonzero typhoonzero merged commit ddc0c21 into PaddlePaddle:develop Jun 30, 2017
@typhoonzero typhoonzero deleted the go_pkgmng_design branch August 11, 2017 06:53
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