TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Code.google.com was shut down, Go packaging is broken

99 pointsby dz0nyover 9 years ago

17 comments

twblalockover 9 years ago
I think the only realistic solution to this is to vendor your go dependencies. If Github ever changes its URL schema, a whole bunch of stuff is going to break.<p>The Go maintainers have conflated <i>what</i> a library is and <i>where</i> a library is. That&#x27;s an important distinction that should not be glossed over like this.
评论 #10973341 未加载
评论 #10973227 未加载
评论 #10973122 未加载
评论 #10974348 未加载
jacobrover 9 years ago
It will be great fun when Github is shut down. Many npm packages, jspm, and more are using hard coded links to repositories or even paths in repositories.
评论 #10972900 未加载
评论 #10973361 未加载
评论 #10972820 未加载
评论 #10972786 未加载
评论 #10975007 未加载
vruizover 9 years ago
Please note that the linked URL is just a commit to remove support from code.google.com in go get, and add a warning to users trying to go get from it.<p>Also remember that while not very widely used, Go does provide support against this problems via custom URLs and canonical import paths [0].<p>And most importantly, whatever your programming language, remember to vendor your dependencies.<p>[0] <a href="https:&#x2F;&#x2F;texlution.com&#x2F;post&#x2F;golang-canonical-import-paths&#x2F;" rel="nofollow">https:&#x2F;&#x2F;texlution.com&#x2F;post&#x2F;golang-canonical-import-paths&#x2F;</a>
golergkaover 9 years ago
I just got into Go, and I&#x27;m a fan a lot of language design decisions. But a lot of configuration leaves me wondering: is it me who doesn&#x27;t understand something, or did the same folks who designed such a good language actually screwed up configuration stuff?<p>No way to specify a version of library or language I&#x27;m working with is already a little bit annoying, although I haven&#x27;t actually discovered problems because of it. But the $GOPATH just drives me nuts: why the hell would the language infrastructure work out of assumption that all my projects that are based on a single language are contained in a single folder? On the contrary, I often have projects that include several different languages and frameworks in them, and I&#x27;m usually keeping client and server in the same repo. Language is a part of a project, not the other way around. I ended up with this hackery in my server Makefile:<p><pre><code> build: GOPATH=$(shell pwd) go install main </code></pre> Overall, just as Go itself is transparent and simple, it&#x27;s `import` statement and build infrastructure is not. &quot;Convention over configuration&quot; may be a good approach for simple web apps, but when this convention just doesn&#x27;t fit your workflow, it brings more bad than good.
评论 #10973699 未加载
评论 #10973294 未加载
评论 #10975852 未加载
4adover 9 years ago
I&#x27;ve flagged this editorialized title (Code.google.com was shut down, Go packaging is broken). Apart from being against the rules, it&#x27;s intentionally misleading. It gives the false impression that Google Code shutting down somehow caused go get functionality to fail <i>in general</i>, which is false.<p>Go get works as always; of course you can&#x27;t go get go packages on Google Code, because Google Code doesn&#x27;t exist anymore! The link just points to a change that fixes some trivial Go <i>test</i> which didn&#x27;t impact anything else; something that people working <i>on</i> Go have to deal with, not something <i>users of</i> Go have to deal with.<p>As for the news about Google Code itself, that was announced almost an year ago. The Go project itself migrated to git well before that, and of course, every Go package that&#x27;s maintained also migrated off Google Code in the meantime. This is (misleading) non-news.
评论 #10973006 未加载
csenseover 9 years ago
The &quot;website going out of business destroyed my content&quot; problem is one that needs to be addressed. One promising idea is content-addressable storage, like IPFS-hosted repos -- anyone can self-host at a stable URL. (I don&#x27;t know if IPFS has a good solution yet to the problem branches solve in git, namely having a named, auto-advancing pointer to the content address of the latest version.)
评论 #10973958 未加载
评论 #10973934 未加载
petkeover 9 years ago
Google shuts down yet another service developers rely on. Its getting quite a bad track record. Trust is not so easily rebuilt. I think more developers will avoid depending on google services in the future if they have another choice.<p>Edit. What happens to the thousands of webpages that link to jquery or google fonts on google.code. This must break lots of things ...
评论 #10972845 未加载
评论 #10972790 未加载
评论 #10972802 未加载
评论 #10972777 未加载
lukaslalinskyover 9 years ago
I never really understood why would they map package names to the sites that host the sources. It was obvious something like this was going to happen and it&#x27;s happening on smaller scale all the time. Projects move.
评论 #10972741 未加载
评论 #10972683 未加载
评论 #10972677 未加载
donatjover 9 years ago
&#x27;go get&#x27; is a highly useful bag of cats. The fact that code.google.com needed to be hard coded rubs me in such the wrong way for what should be a generalized tool. I wish instead of magic self resolving paths, it just took git repo ssh&#x2F;http paths.
CSDudeover 9 years ago
I hate go packaging. I want to fork a package for my private purposes, maintain it in my hosted repo or somewhere private, but no, I have to change all the required import paths to my repo path. Or I have to provide it in vendor folder, or have custom gopath folders, but then go get does not work, I have to git clone and put it in some weird old repo&#x27;s path. You could use relative paths, or package names but no, you had to use site urls so you could make it harder for anyone that does not work open source or private. I have not found a better solution for forking a repo and working it on my own besides vendor folder solution.
评论 #10972756 未加载
评论 #10972819 未加载
评论 #10972743 未加载
lolcover 9 years ago
&quot;This change drops support for code.google.com and fixes test.&quot;<p>How was packaging broken?
评论 #10972662 未加载
评论 #10973982 未加载
评论 #10972658 未加载
Lethalmanover 9 years ago
How Nix solved the issue:<p>1. Each go package has an attribute name in nix, like anything else, that is not tied to its url.<p>2. Each go package has an url where to fetch the source from, which is not the import path to use the package.<p>3. Each go package has a number of old import url aliases (e.g. &quot;code.google.com&#x2F;...&quot;)<p>4. Whenever a package X depends on Y with an old import url, then X is rewritten to use the new url path of Y using govers.<p>So the problem is solved at our packaging level.<p>This is not to say it&#x27;s the best solution, but certainly a good alternative solution.
akerroover 9 years ago
Uff just in time I moved some projects I relay on from CG to Gitlab... developers didn&#x27;t bother.
msieover 9 years ago
Isn&#x27;t any packaging system reliant on a server and ultimately fragile if you don&#x27;t vendor? I don&#x27;t want to see an overengineered packaging system. Go is open source, has anyone looked at improving &quot;go get&quot;?
tmalyover 9 years ago
I cannot blame Google, they ditched the Reader and various other free services. the Code service may not have been a core thing for the company.<p>Github on the other hand does have a core focus on hosting code. I would expect them to be in this business as long as it is profitable for them.
eternalbanover 9 years ago
Someone needs to let the Gophers know about this little concept known as &#x27;indirection&#x27;.
0xFFCover 9 years ago
This is exactly why I am trying to avoid Google&#x27;s product as much as possible and suggest people avoid them as much as possible.<p>They want just shove the internet to your throat. With all of their product.