TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Go Packaging Proposal Process

171 点作者 zalmoxes将近 9 年前

13 条评论

aikah将近 9 年前
Go ecosystem is a complete mess. I understand what Go maintainers tried to do, but Go isn&#x27;t like Gnome lib,or Linux core lib where dependencies are stable. And the &quot;just vendor&quot; stuff pushed by some Go pundits is stupid. Clutter or Gtk don&#x27;t vendor Gdk or Glib. So Go right now is about everybody reinventing the wheel, because you can&#x27;t write reproducible build with 3rd party packages thus create an ecosystem with Go get. The solution ? deprecate Go get in favor of a new tool that supports at least fetching tags for packages. Project based build Tools (like Gb) work for apps, they don&#x27;t work for libraries. Glide and co have a big problem : everybody is using a different package manager that is incompatible with others.<p>The question isn&#x27;t being solved yet because to solve it seriously it would require to change how the language works at first place.
评论 #12188441 未加载
评论 #12188324 未加载
评论 #12187923 未加载
评论 #12188915 未加载
评论 #12189141 未加载
评论 #12188505 未加载
评论 #12190994 未加载
mfer将近 9 年前
Hi folks, My name is on that list and I work on one of the Go package managers (Glide - it&#x27;s like npm, crates, composer, bundler, etc... but for Go... <a href="https:&#x2F;&#x2F;glide.sh" rel="nofollow">https:&#x2F;&#x2F;glide.sh</a>).<p>If you have questions or input those who are working on this problem are listening.
评论 #12186393 未加载
评论 #12186466 未加载
评论 #12186612 未加载
评论 #12187802 未加载
评论 #12187229 未加载
twblalock将近 9 年前
I never understood why Go conflates <i>where</i> something is (its Github url) with <i>what</i> something is (a specific version of a specific bit of code, what Maven calls an &quot;artifact,&quot; and what lots of other solutions call a &quot;package,&quot; or &quot;module,&quot; or &quot;gem&quot;, which has a version and never changes).<p>This creates a lot of problems that simply don&#x27;t need to be there:<p>1. Versioning dependencies is pretty much impossible unless you make your own copy of them, and keep them updated. Good dependency management solutions do not require you to &quot;vendor&quot; your dependencies. They enable reproducible builds by keeping every version of an artifact around.<p>2. Github could change its URL schema, and most Go projects would stop compiling.<p>3. The maintainer could delete the Github repo.<p>4. Source control, specifically Github, is tightly coupled with dependency management, and that should not be necessary.<p>These are not unsolved problems. Maven solved every single one of these problems years ago. I don&#x27;t expect people to use Maven to build Go applications, but clearly there is an opportunity to use Maven&#x27;s good ideas and build a better dependency management system for Go.<p>I have to say, in defense of Maven, that it is very robust: artifacts are mirrored in many places, including in your own local repo; versioning works well, including availability of older versions; and nobody can screw you by deleting package or changing its Github url. My company uses Maven for Node.js as well as Java, because we&#x27;ve had so many problems with NPM.<p>I should also point out that the expectation that the core Go team should develop a dependency management system is a bit odd. The dependency management systems for Java, Ruby, Python, Node.js, and Perl were all developed by the community, not the core team. Some of them were later absorbed by the core team, but the point still stands.
评论 #12195453 未加载
the_duke将近 9 年前
Looong overdue...<p>With Go being a new language (1.0 in 2012), there is no excuse for not having had a solid pkg solution in 1.0.<p>It&#x27;s one of the things holding Go back, in my opinion, producing makeshift solutions like Glide and gopkg.in, which are only minimally adopted.<p>I hope they also specify some mandatory versioning scheme (like npm with semver), because there are so many Go packages out there which don&#x27;t even do any versioning!
评论 #12190271 未加载
评论 #12186643 未加载
niftich将近 9 年前
I&#x27;m new to Go and I read some documents [1][2][3] on what &#x27;vendoring&#x27; means but I still don&#x27;t understand.<p>What problem does it solve? Why is it needed?<p>Is there an &#x27;explain for a 5-year-old&#x27; version, or better yet, an &#x27;explain for someone who is used to other packaging systems that may not be entirely elegant but work pretty okay most of the time, like Java&#x27;s Maven or Node&#x27;s npm&#x27;<p>[1] <a href="https:&#x2F;&#x2F;engineeredweb.com&#x2F;blog&#x2F;2015&#x2F;go-1.5-vendor-handling&#x2F;" rel="nofollow">https:&#x2F;&#x2F;engineeredweb.com&#x2F;blog&#x2F;2015&#x2F;go-1.5-vendor-handling&#x2F;</a> [2] <a href="https:&#x2F;&#x2F;github.com&#x2F;golang&#x2F;go&#x2F;wiki&#x2F;PackageManagementTools" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;golang&#x2F;go&#x2F;wiki&#x2F;PackageManagementTools</a> [3] <a href="https:&#x2F;&#x2F;docs.google.com&#x2F;document&#x2F;d&#x2F;1rMoZ0rmpxw6dShalHnkuPtia6NkmB024MUa4T3SJeh8" rel="nofollow">https:&#x2F;&#x2F;docs.google.com&#x2F;document&#x2F;d&#x2F;1rMoZ0rmpxw6dShalHnkuPtia...</a>
评论 #12189292 未加载
评论 #12189525 未加载
评论 #12188961 未加载
howeyc将近 9 年前
I&#x27;m exited to see this progressing.<p>I&#x27;m grateful for anyone who serves on the committee, as it could be a thankless job (some people may not like the agreed upon tool&#x2F;process, but hopefully a small group that doesn&#x27;t feel entirely disenfranchised).<p>I really hope whatever they come up with is welcomed by the community and projects migrate to using it. Basically becoming the &quot;Standard Go Way&quot; to do things.
kaeshiwaza将近 9 年前
I hope you will find a &quot;Go solution&quot;. I mean stupid simple (for most of the time).
评论 #12187246 未加载
zellyn将近 9 年前
btw, I also wrote up a brief &quot;State of Go Packaging&quot; doc you might be interested in reading: <a href="https:&#x2F;&#x2F;docs.google.com&#x2F;document&#x2F;d&#x2F;1M4Ldgtxr9vC8wpyTldQe5oUyGN9eb1CeUcJT3N5XaPk" rel="nofollow">https:&#x2F;&#x2F;docs.google.com&#x2F;document&#x2F;d&#x2F;1M4Ldgtxr9vC8wpyTldQe5oUy...</a>
mmkx将近 9 年前
This is needed badly. I am a huge Golang advocate, but I refuse to use the &quot;github.com&quot; package naming&#x2F;folder setup mess. It&#x27;s just not elegant.
评论 #12186577 未加载
评论 #12186645 未加载
peterwwillis将近 9 年前
If you want to model a real package manager, don&#x27;t do a comparison of existing tools, all of which have flaws. Start with the feature set of RPM, and then ask a professional software packager + developer what is missing.<p>In order to have a feature-complete package manager (that is, it does everything you will concievably need) you need at least the following:<p><pre><code> - Unique file&#x2F;object tracking - Upgrade &amp; Rollback - Dynamic string interpolation (file paths, for example) - Identification of architecture and OS - ACL and extended permission support - Tracking of both source and binary dependencies &amp; versions - Before &amp; after script hooks for every single operation - Cryptographic signing &amp; verification - Support for multiple central &amp; distributed repositories </code></pre> This is, of course, completely different from a build system, but has a few features in common. You may not need a package manager at all; you may just need a feature-complete build system, which is how you end up with CPAN. (There is no Perl package manager, though PPM attempts one, and Carton is just a bundler)
randomsofr将近 9 年前
I hate using the url for the namespace.
评论 #12192239 未加载
0xdeadbeefbabe将近 9 年前
So what&#x27;s wrong with vendoring all the deps and version controlling everything?<p>Edit: Seriously, I&#x27;m not being a jerk.
评论 #12188029 未加载
leonardinius将近 9 年前
I wonder why I was able to edit document on first open. :o Seems to be solved quite quickly.
评论 #12186339 未加载