-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Design doc for go package management #2643
Conversation
doc/design/build_system/README.md
Outdated
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
doc/design/build_system/README.md
Outdated
|
||
### Using Package Manager For Go | ||
|
||
Building go binaries and libraries need to satisfy their dependencies, generally |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
go => Go
doc/design/build_system/README.md
Outdated
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 |
There was a problem hiding this comment.
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
doc/design/build_system/README.md
Outdated
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 |
There was a problem hiding this comment.
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.
doc/design/build_system/README.md
Outdated
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
doc/design/build_system/README.md
Outdated
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point!
There was a problem hiding this 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
Design doc for adding go package management tool glide.
Related PR: #2627
#2583
Related Issue: #2605