-
Notifications
You must be signed in to change notification settings - Fork 17.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
cmd/go: vgo and the OpenBSD packager's dilemma #26852
Comments
I don't think vendor is going away anytime soon. Its usage might drop in popularity over time, though.
There is the https://github.com/gomods/athens effort. I will defer to @bcmills @rsc on actual answers to your questions, though. |
You'll soon be able to fetch zip files of sources using the Are those features sufficient for your requirements? |
If the versioned zip's can be fetched outside of the Once we have the zips, we could then use the |
Put the zips in a tarball on an FTP server? (Specifically, run |
If the zips are just compressed versions of a given dependencies source tree, we would just need to extract them into the proper location in We do something similar for Rust applications that use Cargo. During the fetch phase dep source is downloaded from crates.io (using the ftp(1) command) and extracted into the ports build env. Then the offline build phase happens. |
Also, just to clarify - |
I don't think you even need to unzip them. Just put the raw zips (and metadata files) in the |
Why is "a tarball of binary zip files" mentioned as an alternative to vendoring, which already works well, has a very simple semantic, and it's easy to handle? I'm a little worried about Go's team stance on vendoring. Vendoring is a very important tool for many workflows that might not exist within Google but are very common in the world outside. It's easy to explain, easy to use, easy to version. I'm not sure how side-loading a tarball of binary files into a different directory and then pointing a variable called |
I think this was mentioned as a OpenBSD specific solution to the packaging problem.
Again, this is something that is specific to 3rd party packagers building packages for their respective systems (in this case, OpenBSD). Not a solution for general consumption - or a proposal for how vendoring should be. @bcmills I am going to start playing around with athens to see if I can get a working build env inside the OpenBSD ports tree. Assuming that all works fine (it seems like it will based off the features you have mentioned), the only remaining question will be: will there be a publicly available "proxy instance" to pull down the zip files. |
OpenBSD problem can be solved using If the vendor directory is not going away, this is by far the easiest solution: it doesn't require external scripts, directories, environment variables, binary files. The fact that @bcmills is suggesting a far more complicated solution that allows to avoid using vendoring is what worries me. |
So from my point of view, having something that allows us to download distfiles (versioned sources packaged as a zip or tarball) for each component (dep) of a given package is ideal. Then there is no need to hand roll a new tarball that contains the vendor directory. I agree |
The vendor directory is not going away in the foreseeable future.
We are planning to have public module mirrors available circa Go 1.13 (see https://blog.golang.org/modules2019). |
@qbit I am curious what your latest thinking here is, and whether you are using or considering the |
See outline of a solution for a related set of problems in #29410 (comment) |
OpenBSD's constraints
Packaging on OpenBSD follows a fairly strict workflow:
-current
is where ports and the base system are worked on. At any point ABI breakage can occur, rendering binaries built pre-ABI-change potentially broken.The current state
Currently packaging Go applications is a trivial task given any of the following (listed in order of ease from the packager's perspective)
vendor
directory in their source tree.vendor
directory even though they don't track it in their repository.dep
which allow packagers to re-roll distribution files that include thevendor
directory.The dilemma
Though it hasn't been explicitly stated, one can infer[1] that the
vendor
directory is on its way out. If this is the case, it will dramatically complicate the build process for packages distributed using frameworks like the OpenBSD ports tree (likely all BSDs and probably a few Linux distributions will be impacted as well).At first glance, the
Proxy Server
mentioned in the module doc seems like it might be a decent workaround, however, sticking to the OpenBSD workflow would necessitate rebuilding large portions of the "fetch" mechanism (remember the requirement for fetching with base tooling). It would also require adding infrastructure (and administration overhead) to store the source files.[1]: https://research.swtch.com/vgo-module - The End of Vendoring
The questions
vendor
directory be going away entirely?The text was updated successfully, but these errors were encountered: