News for hackers. Stuff that matters.
Re:A Proposal for Package Versioning in Go by pdeuchler on Monday March 26, 2018 @12:26PM (#16680063)
How many iterations of this do we have to go through? Go hasn't had mature dependency management since its inception and this constant thrash is really starting to make things difficult.

For all practical purposes dependency management for programming languages is a solved problem, with many open source examples. The only explanation for this constant re-invention that I can come up with (and that's shared among others I know) is that Google doesn't care/need a dependency tool because of their mono repo. Which is rather frustrating since we get features (cough aliases cough) forced down our throats when Google suddenly finds a need for them.

Re:A Proposal for Package Versioning in Go by _ph_ on Monday March 26, 2018 @01:11PM (#16680517)
Actually I think the process shows a strength of the Go community. The initial lack of a dependency management tool certainly had to do with the practises at Google - as Google employees, the processes of Google certainly shaped the needs of the Go creators.

But I am very happy, that they did not pick a random management system, just because they "had to have one". We can see enough bad examples in the wild. They left this aspect out of the language standard, to tackle the challenge later, with proper consideration.

As far as I understand all details, Russ Cox has presented a very thoroughly worked out spec, and it seems to solve a lot of problems, other dependency management tools have. It is also completely compatible with Go so far and also fully optional.

Re:A Proposal for Package Versioning in Go by pdeuchler on Monday March 26, 2018 @01:34PM (#16680754)
>> But I am very happy, that they did not pick a random management system, just because they "had to have one"

But they have, multiple times? First it was just giving people links to godep when people complained in github issues. Then it was a tacit "we like this" about gps and glide. Then it was a pretty-much-official-blessing of dep. Now it's a super-official-now-we-mean-it implementation of vgo. I recognize this as a pattern because I do it all the time, software engineers constantly re-write things from the ground up when they don't care about actually solving the problem and just want to play around with cool new ideas.

As far as the vgo spec, I'm not against it per se... I like most of the general conclusions, but none of it is new. We've had these ideas in the Go world for a while. Most of them have even been implemented! Why can't we just slowly transition an existing tool? Or maybe implement a common library that individual tools can use to solve the problem in their own way? Oh wait we already did that and it got abandoned. Until we see a tool with a stable API that solves the 80% use case and lasts for over a year I'm not going to get excited about the new flashy thing.

Re:A Proposal for Package Versioning in Go by ntnn on Monday March 26, 2018 @05:29PM (#16682801)
> But they have, multiple times? First it was just giving people links to godep when people complained in github issues. Then it was a tacit "we like this" about gps and glide. Then it was a pretty-much-official-blessing of dep. Now it's a super-official-now-we-mean-it implementation of vgo. I recognize this as a pattern because I do it all the time, software engineers constantly re-write things from the ground up when they don't care about actually solving the problem and just want to play around with cool new ideas.

No. Golang hasn't had an official/pretty-much-official dependency management system. The community recommends some tools over others, but that's about it.

With dep it is a bit different - the creators were google engineeers and they wanted it to become the official tool, with integration as a go subcommand etc.pp. - but that was never signed off by Pike or any other lead, only confirmed that it would be a possibility if the tools performs well.

With vgo its similar to dep - a proof of concept to see _if_ it works nicely.

Regarding a library multiple tools can use; Yes, that would be a nice thing - however when designing such a tool _and_ a library at the same time you will get into bigger problems. Generally you'll want a library designed by someone who already solved a given problem in at least one way. That brings enough experience to make the correct architectural decisions early on as well as a good, usable API.

I'm happy that we don't just get half-assed solutions just to have one. I have seen enough projects go to shit because a major step in the project was reconsidered a few times before management put a lock on it because it went through 'enough' revisions.

Re:A Proposal for Package Versioning in Go by voidlogic on Monday March 26, 2018 @06:29PM (#16683236)
>"With dep it is a bit different - the creators were google engineeers and they wanted it to become the official tool, with integration as a go subcommand etc.pp. - but that was never signed off by Pike or any other lead, only confirmed that it would be a possibility if the tools performs well."

I'm frustrated. I started using Go during version 0.8 and have been using it since with no dependency mgmt beside my own forks because I hated everything I tried. Then dep comes along, I give it a few months to mature, try it, and it worked great. It solves my common use cases near perfectly.

What this blog post and proposal lacks IMHO is a clear case for why dep isn't "good enough". All I see is handwaving:

"Early on, we talked about Dep simply becoming go dep, serving as the prototype of go command integration. However, the more I examined the details of the Bundler/Cargo/Dep approach and what they would mean for Go, especially built into the go command, a few of the details seemed less and less a good fit."

So "a few of the details seemed less and less a good fit" is a statement that is impossible to refute because it is too scare on any details.

Re:A Proposal for Package Versioning in Go by wokwokwok on Monday March 26, 2018 @07:52PM (#16683849)
This.

You want feedback now, on this new proposal?

Why bother?

It's patently obvious that our feedback on dep has been totally ignored.

What indication is there anyone will pay attention to any feedback now?

I can't be bothered any more.

I just want one solution to be picked, blessed, implemented and then not changed five minutes/months later.

Re:A Proposal for Package Versioning in Go by echlebek on Monday March 26, 2018 @09:20PM (#16684329)
There's many pages here that explain in detail the problem with the existing solutions. Read all of them. https://research.swtch.com/vgo

If you read the minimal version selection algorithm, it's clear that the proposed solution solves the problem in a novel way.

Re:A Proposal for Package Versioning in Go by oblio on Monday March 26, 2018 @05:15PM (#16682664)
Re:A Proposal for Package Versioning in Go by _ph_ on Monday March 26, 2018 @04:11PM (#16682083)
In my eyes, it would be a warning sign, if the new proposal contained too much completely new ideas. That would mean, that they are not tested in practise. That is why we needed all those project which implemented versioning so far. But getting to an officially blessed, many years supported proposal, starting with a clean sheet, but based on all the experienced lerned, is a good approach.
Re:A Proposal for Package Versioning in Go by ko82jeipp on Monday March 26, 2018 @02:13PM (#16681082)
Welcome to IT as a career.

Having started in the 90s, I have been through these same conversations regarding Adobe, Oracle (oh lawd Oracle) MS, Dell, Apple to a lesser extent.

“Vendor the industry currently relies on heavily is changing things or yanking the rug again?”

The free market works by big players yanking every one else around. Guh.

Re:A Proposal for Package Versioning in Go by derefr on Monday March 26, 2018 @03:48PM (#16681870)
The big players aren't yanking anyone around. They take responsibility by announcing things like alpha periods, beta periods, release candidates, Long Term Stability branches, etc. And enterprise developers take advantage of these, ensuring that they only code production applications against stable/LTS libraries and APIs.

It's SMB/"indie" developers who should be taking the responsibility here, I think, for relying on these officially-unstable packages in their own production systems, and especially for encouraging others to rely on such. Yes, sometimes, it's the only way to be competitive/have a https://en.wikipedia.org/wiki/Unique_selling_proposition. But that doesn't mean that it isn't their responsibility to cope with these changes. They're taking on that risk-of-change by using those unstable libraries or APIs.

Heck, this is half of the point of software Venture Capital: being able to underwrite the risk of relying on an unstable platform/ecosystem, so that you can have enough runway to recover and still finish your product if "the ground moves under you", and therefore can "safely" rely on these unstable technologies.

(And one not-oft-talked-about property of bootstrapped startups is that they have to underwrite that risk themselves. If a bootstrapped startup isn't just gambling with its founders' money, it has to behave more like an enterprise development shop, building on only stable foundations.)

Theoretically, you could move this underwriting role into the companies themselves, such that the companies themselves would monetarily cushion the blow of changes in their unstable APIs. But they'd need a pretty big interest in the involved consumers to do so. In such a world, you likely wouldn't have separate startup businesses using the BigCorps' unstable APIs; rather, you'd have a set of BigCorp incubators with large shares in most new startups. Maybe that hypothetical world would have higher https://en.wikipedia.org/wiki/Gross_world_product than our own! But I bet there'd be fewer startups, because starting a startup would be a lot more like a regular BigCorp job.

Re:A Proposal for Package Versioning in Go by geodel on Tuesday March 27, 2018 @10:20AM (#16688618)
My experience IBM products like websphere tell different story. The were slow and buggy and never slow and solid.
Re:A Proposal for Package Versioning in Go by staunch on Monday March 26, 2018 @08:00PM (#16683889)
There's no comparing proprietary products with open source projects. The Go project is a beautiful body of work and there's no call for comparing it to proprietary crapware.
Re:A Proposal for Package Versioning in Go by coldtea on Tuesday March 27, 2018 @10:56AM (#16689027)
>Actually I think the process shows a strength of the Go community. The initial lack of a dependency management tool certainly had to do with the practises at Google - as Google employees, the processes of Google certainly shaped the needs of the Go creators.

Do you think that's a community process? I always have the impression from Go developments that all major decisions are "my way or the highway" affairs of 2-3 of the initial designers. Possibly the same ones writing those vague "exploratory" posts and dismissals of common proposals, that voidlogic captures well in his comment below.

Re:A Proposal for Package Versioning in Go by bobbyi_settv on Monday March 26, 2018 @02:13PM (#16681090)
It's far from a solved problem.

Many ecosystems haven't gotten past the "single dependency file and lock file" system where an entire project has to use a single version of each dependency. There are people splitting their project into a thousand "microservices" and making them interoperate over HTTP instead of regular function calls so that each part of their project can have its own dependencies.

Re:A Proposal for Package Versioning in Go by JepZ on Monday March 26, 2018 @05:44PM (#16682912)
Yes, its kinda funny, I mean package managers are probably the ones with the most solid experience in dependency management and when I look at them I can see many different concepts at work there. Some like for example pacman are bold and are not afraid to break a system during upgrade (as it is very unlikely that the upgrade will fail) and others put an abnormal amount of effort to ensure an always functional system at any time (especially on source based distributions, e.g. paludis).

And while I have been using development snapshots for years with my system and didn't have more bugs to cope with compared to other systems, I can understand that developers in corporate contexts need to be able to specify dependencies with versions. So I appreciate that proposal very much and hope it will lead to a better solution for every body involved by providing a way to use versioned dependencies without introducing too much overhead for those who don't need versioned dependencies.

Re:A Proposal for Package Versioning in Go by flukus on Monday March 26, 2018 @09:03PM (#16684244)
Pacman, apt-get, et al also have something most language specific package managers don't, maintainers. Maintainers back port security fixes and are careful not to break binary compatibility. A random $lang specific package is unlikely to have either, if you expect a bug fix you have to upgrade to the latest version. Developers that don't want to provide this sort of stability typically hate distro package managers.

No package manager can fix a cultural problem.

Re:A Proposal for Package Versioning in Go by vk23 on Tuesday March 27, 2018 @05:40AM (#16686746)
If you rely on dependencies that are not maintained you are already in trouble. Being the author/maintainer of a package comes with a responsibility. NPM already showed us what happens if you just let people do their thing.
Re:A Proposal for Package Versioning in Go by XorNot on Tuesday March 27, 2018 @08:24AM (#16687579)
With package managers I worry more about how I distribute my dependencies then anything else. Golang's vendor/ directory concept support was a revelation for me - just ship you dependencies alongside your code.

Meanwhile, I've heard people spend ages complaining that this is totally wrong...while overseeing setting up local artifactory instances and wrangling proxying to do the exact same damn thing.

Re:A Proposal for Package Versioning in Go by coldtea on Tuesday March 27, 2018 @10:59AM (#16689073)
>Many ecosystems haven't gotten past the "single dependency file and lock file" system where an entire project has to use a single version of each dependency.

Perhaps they shouldn't go past that.

Re:A Proposal for Package Versioning in Go by rickycook on Monday March 26, 2018 @05:43PM (#16682902)
also so that a crash doesn’t stop everything like a BSOD, also so that you can use the language most appropriate for the task at hand because assuming a single language is good for everything is just wrong, also to be able to incrementally migrate things to new PAAS/build systems/etc in the future so you don’t do big bang... and plenty more

multiple library versions is one of the lowest priorities when doing micro services id say

this is not to say that people don’t significantly over use micro services, but there are plenty of hard problems they solve

Re:A Proposal for Package Versioning in Go by elliotlarson on Monday March 26, 2018 @12:57PM (#16680381)
No kidding. I'm so impressed with most of Go, but this is just silly. I feel like Rust started out with solid dependency management in place, at least it's been there from the early days. I work a bit with Node and Ruby too. Both have solid dependency management in place. I mean there are warts, but generally the problem is solved. Actually, now that I think about it, Yahuda Katz has had a hand in working out dependency management for all of those technologies, Rust, Ruby and Node. Maybe the Go guys should bring in Yahuda to help out. If nothing else, he could probably help them get out of the paralysis of analysis loop they seem to be in here.
Re:A Proposal for Package Versioning in Go by sitkack on Monday March 26, 2018 @02:11PM (#16681065)
Rust is good but not great. Being able to import two major versions of a lib into the same compilation unit (am I understanding this correctly?) is a huge win. Rust can have transitive deps that only differ by version number, but they can't come in contact with each other (don't cross the versions).

Reread the post, the authors make some great, mature realizations that I hope other languages will listen to. I don't use the language, but I use languages that Go has affected and this is a great thing.

Re:A Proposal for Package Versioning in Go by the_mitsuhiko on Monday March 26, 2018 @03:28PM (#16681692)
> Rust is good but not great. Being able to import two major versions of a lib into the same compilation unit (am I understanding this correctly?) is a huge win.

The one time I needed that I found a pretty good workaround: you make two crates `helper_old` and `helper_new` and have each depend on different versions of that crate. Then I just pub re-exported the crate it depends on.

That way your other crate can now depend on two different versions of that dependency.

Re:A Proposal for Package Versioning in Go by necubi on Monday March 26, 2018 @07:36PM (#16683744)
This is also the standard approach in the java world, where it's known as "shading."
Re:A Proposal for Package Versioning in Go by WatchDog on Wednesday March 28, 2018 @03:06AM (#16695992)
"Shading" obviosuly comes from the plugin of the same name. But I think of shading to refer more to the practice of repacking classes into a single jar, than the renaming of package name spaces. As far as the standard approach to supporting muliple library versions in one application, i think OSGI is probably the closest thing to a workable solution.
Re:A Proposal for Package Versioning in Go by sitkack on Monday March 26, 2018 @05:19PM (#16682700)
Genius! I trust you will be authoring a new book "RustOps in Practice".
Re:A Proposal for Package Versioning in Go by rickycook on Monday March 26, 2018 @05:47PM (#16682938)
seems like that’d be a decent compiler trick
Re:A Proposal for Package Versioning in Go by msie on Monday March 26, 2018 @02:27PM (#16681222)
> import two major versions of a lib into the same compilation unit

When does this situation come up? What is a compilation unit in this case?

Re:A Proposal for Package Versioning in Go by hinkley on Monday March 26, 2018 @03:58PM (#16681969)
It comes up with apis that deal with data storage or IPC concerns.

You might need a handler for both versions if you have customers that use the old api and ones that use the new one. Or different departments of the same customer.

Or if you dodge that bullet but have to write a custom migration tool to get data from the old version and cook it to go into the new one. Half of the code is read only and the other write mostly but they still have to coexist if you do anything more complex than a backup/restore script.

Re:A Proposal for Package Versioning in Go by eat_veggies on Monday March 26, 2018 @02:42PM (#16681338)
If the newer version of some library has some breaking changes, you can migrate bit by bit instead of doing it all in one go.
Re:A Proposal for Package Versioning in Go by smaddox on Monday March 26, 2018 @03:10PM (#16681572)
If this is the only motivation for multiple dependency versions in the same compilation unit (crate), I'm not convinced. You would be trading off the simplicity of each crate specifying a range of acceptable dependency versions for specifying `N` ranges of acceptable dependencies, and requiring one of each. Much better to enforce one version per compilation unit, and if you want to get complex with your dependencies, then break your project into multiple compilation units.
Re:A Proposal for Package Versioning in Go by justincormack on Monday March 26, 2018 @11:51PM (#16685078)
That needs language support too, some languages simply do not support it. I believe this includes Go due to how linking works. This could be fixed but it would be hard, maybe a 2.0 thing and it does make package management harder. And in a monorepo it doesnt happen so Google doesnt care.
Re:A Proposal for Package Versioning in Go by bjz_ on Tuesday March 27, 2018 @08:56AM (#16687812)
> I feel like Rust started out with solid dependency management in place, at least it's been there from the early days.

Rust had actually been through three failed package manager projects before they decided to bring in the domain experts at Tilde. Nice that at least that bit of churn has been forgotten - but yeah, it became obvious over that time just how non-trivial the problem is. Cargo makes it seem easy though ;)

Re:A Proposal for Package Versioning in Go by nvarsj on Monday March 26, 2018 @06:01PM (#16683045)
> How many iterations of this do we have to go through?

Many, I think, based on what the author of dep says (https://sdboyer.io/blog/vgo-and-dep/). I don't get why rsc would just throw away the code and work that was the culmination of years of community work. Isn't rsc largely responsible for creating this problem in the first place? I'm doubtful he's going to fix the dependency problem from scratch. There's a certain pigheadedness to a lot of golang decisions, and I'm afraid this is another one of them...

Re:A Proposal for Package Versioning in Go by shabbyrobe on Tuesday March 27, 2018 @12:23PM (#16690020)
I definitely see this with Go decisions too, but I think that same "pigheadedness" has also been a driving factor behind a lot of what makes Go so effective to work with. They've thrown out an awful lot of stuff, which sometimes makes me bristle but I usually have to admit they were right.

I think they threw out a bit too much, but that's only a problem if the gaps don't get filled or the compromises aren't adequately explained. What's left is a very pragmatic selection of extremely useful tools that can be used to cut a tonne of working code very, very quickly. I can't say I always like it, but I benefit tremendously from it.

Re:A Proposal for Package Versioning in Go by nvarsj on Tuesday March 27, 2018 @06:03PM (#16693169)
I really like Go overall, especially for systems work. But there's various quirks that hurt my day to day productivity, and I think they only exist due to stubbornness.

For example, why do unused variables and imports, a style issue, cause a compiler error? This is a constant pain if commenting out lines of code during debugging or prototyping. On the other hand, the compiler doesn't care if I ignore or forget to check error values - which is almost always incorrect behavior.

Re:A Proposal for Package Versioning in Go by agnivade on Wednesday March 28, 2018 @02:32PM (#16700423)
> For example, why do unused variables and imports, a style issue, cause a compiler error?

Here's why - https://golang.org/doc/faq#unused_variables_and_imports

Re:A Proposal for Package Versioning in Go by shabbyrobe on Tuesday March 27, 2018 @07:30PM (#16693773)
Yeah for sure, it's definitely got its warts. I suspect the import thing was far easier to code as an error than to compute whether they need to be pruned. Gotta love those go build times though! With vim-go and goimports, it's handled automatically for me on save so I don't find that an issue any more. Unused variables, on the other hand...
Re:A Proposal for Package Versioning in Go by GiorgioG on Monday March 26, 2018 @12:42PM (#16680208)
Sometimes thrashing is good. Consider the pile of crap that is NuGet in the .NET world. Sure there's Paket, but it has nowhere near the adoption/support of the Microsoft blessed NuGet package manager.

At least the Golang team can cherry pick the best ideas & lessons-learned from these community-driven package managers.

Re:A Proposal for Package Versioning in Go by pdeuchler on Monday March 26, 2018 @01:05PM (#16680465)
I've been hearing this argument for about 4 years now. Pointing out that .NET has terrible dependency management does nothing for me when Google's main languages (Python, Java, C++) all have solved dependency management for their own use cases. If the Golang team has had enough time to cherry pick the best ideas and lessons learned to build a language they've had enough time to do so for dependency management.

At the very least they could have continued their hard core hands off approach of allowing the community to solve it. But instead they half-assed it and started capriciously anointing chosen solutions and honestly we're probably in a worse spot than we were before dep came along.

Plus, lets be honest here, there's no excuse for constantly changing APIs and binaries. If this was truly about getting the best ideas and lessons learned we'd just see refactors of existing tools with slow migrations to new concepts, but instead we've seen multiple complete rewrites, despite multiple efforts to build common libraries that should prevent such events!

Re:A Proposal for Package Versioning in Go by nemothekid on Monday March 26, 2018 @01:31PM (#16680732)
>when Google's main languages (Python, Java, C++) all have solved dependency management for their own use cases.

Huh? Of those three, I would only consider Java "solved", and both Maven & Ant are far from the panacea of package management.

virtualenv is a community project (much like dep), is pretty new in the grand scheme of things, and isn't completely standardized (some projects use tox, some list out requirements.txt (rarely version pinned), and others vendor.

As for C++, almost everyone does something a bit different so I don't see how that is at all relatable.

Re:A Proposal for Package Versioning in Go by codetrotter on Monday March 26, 2018 @01:38PM (#16680799)
> virtualenv is a community project (much like dep)

virtualenv was a community project but based on that venv was created and has been part of the official Python distribution since Python 3.3, released in 2012.

https://docs.python.org/3/library/venv.html

Re:A Proposal for Package Versioning in Go by developer12 on Monday March 26, 2018 @03:54PM (#16681936)
>virtualenv is a community project (much like dep)

It doesn't stop there either I've seen python projects using nothing, virtualenv, venv, pip-tools, and pipenv.

I finally feel like pipenv is the true solution and it seems very new. All that said and Python is quite old relative to Go.

Re:A Proposal for Package Versioning in Go by Rotareti on Monday March 26, 2018 @09:14PM (#16684297)
Python is slowly catching up. For example in JS/Elm/Rust you have a clean approach with:

* a central package registry

* a file to describe dependencies

* a command line tool to install, build and publish packages

In Python things are more fragmented. You have:

* a central package registry

* a file to store some of your dependencies (Pipfile)

* a command line tool to install packages (Pipenv)

* a file called setup.py in which you need to specify your dependencies again (in another format). You can execute this file to build/publish packages.

It think it would allow for a much nicer user experience if pipenv/pipfile would handle packaging/building/publishing as well..

Re:A Proposal for Package Versioning in Go by saturn_vk on Tuesday March 27, 2018 @01:46AM (#16685619)
With all the bad press npm has had, I would not put it in the clean approach bag.
Re:A Proposal for Package Versioning in Go by bhaak on Monday March 26, 2018 @01:56PM (#16680958)
For java, I would look at gradle, not maven.

Of course, gradle hooks into the whole maven ecosystem but that is one of its advantages. Everybody in Java land understands Maven packages but how you generate doesn't matter.

Re:A Proposal for Package Versioning in Go by nvarsj on Monday March 26, 2018 @04:43PM (#16682400)
Gradle degraded the dependency experience significantly from maven. Maven had a deterministic, sensible (and selectable) way of dealing with conflicts - gradle just defaults to "largest version wins". Similarly, gradle chucked the whole idea of being able to manage common sets of dependencies across multiple projects easily (the maven super pom). I mean, it's all programmable in gradle, but it pretty much ignored the excellent work maven had done except to use its repos.
Re:A Proposal for Package Versioning in Go by pjmlp on Monday March 26, 2018 @03:44PM (#16681835)
Android builds have renewed by love for Maven.

If it wasn't for Android, I wouldn't bother 1 second to learn Gradle.

But I guess Groovy needs some project to keep it alive, now that no one remebers the days JSF beans would be written in Groovy or JUGs were holding Grails talks month after month.

Re:A Proposal for Package Versioning in Go by kuschku on Monday March 26, 2018 @04:49PM (#16682458)
Don’t worry, Gradle is moving to kotlin for build scripts already. Groovy will soon be a (failed) thing of the past.
Re:A Proposal for Package Versioning in Go by vorg on Monday March 26, 2018 @03:49PM (#16681882)
Seems like every other site is converting its Gradle builds into Bazel.
Re:A Proposal for Package Versioning in Go by yarrel on Monday March 26, 2018 @01:25PM (#16680675)
Python has several widely-used dependency management systems.

C++ has no widely-used dependency management systems.

Both languages are doing fine.

Re:A Proposal for Package Versioning in Go by imtringued on Monday March 26, 2018 @09:10PM (#16684278)
Because of the lack of dependency management C++ suffers from "mega dependencies" that include the entire kitchen sink and more.
Re:A Proposal for Package Versioning in Go by frankzinger on Tuesday March 27, 2018 @01:05AM (#16685413)
Which C++ projects have "mega dependencies"? There is no technical reason to have those (or any other kind of dependency management problems, for that matter). I'm not sure what it's like on Windows, but most other OSes support all of the major C++ dependencies in their default package managers (or things like MacPorts on Mac OS) and it's not difficult to install anything else manually.
Re:A Proposal for Package Versioning in Go by pjmlp on Tuesday March 27, 2018 @08:20AM (#16687560)
I think he/she means something like boost or Qt.

On Windows, Microsoft is investing on vcpkg as package manager.

https://github.com/Microsoft/vcpkg

Re:A Proposal for Package Versioning in Go by frankzinger on Tuesday March 27, 2018 @10:04AM (#16688449)
Interestingly, Debian/Ubuntu has standalone packages for most of the boost libs that need to be compiled.
Re:A Proposal for Package Versioning in Go by iandanforth on Monday March 26, 2018 @01:16PM (#16680569)
You don't think Python also has thrash? I'm a huge fan of pyenv as it brings in manifest+lockfile+segregated install paths. But those three things are relatively new to Python and very new to get unified.
Re:A Proposal for Package Versioning in Go by pdeuchler on Monday March 26, 2018 @01:35PM (#16680772)
environment namespacing != dependency management

Regardless of your setup at the end of the day you're using pip to solve your dependency graph, and have been for over a decade.

Re:A Proposal for Package Versioning in Go by iandanforth on Tuesday March 27, 2018 @02:26AM (#16685810)
I mistyped. I meant pipenv (https://docs.pipenv.org/) not pyenv. Pipenv does use pip but is a significant, recent upgrade to package management and is now the recommended tool.
Re:A Proposal for Package Versioning in Go by ngrilly on Tuesday March 27, 2018 @04:33AM (#16686444)
There is only 24 hours in a day, and the Go team has limited resources. They focused on other issues in the last few years. Dependency management is the current focus now.
Re:A Proposal for Package Versioning in Go by alien_at_work on Tuesday March 27, 2018 @10:20AM (#16688620)
> If the Golang team has had enough time to cherry pick the best ideas and lessons learned to build a language

Except where have they done that? They've had 40 years and their solution to the C binary function error code return problem was... to add a special way to return an error code. There have been superior solutions to this for 20 years at least.

How long have we known about the value of generics?

To me, the fact that they can't figure out how to solve this isn't remotely suprising.

Re:A Proposal for Package Versioning in Go by weberc2 on Monday March 26, 2018 @04:36PM (#16682340)
> If the Golang team has had enough time to cherry pick the best ideas and lessons learned to build a language they've had enough time to do so for dependency management.

Most of Go's features are those that proved their value over 40 years. There are no dependency management schemes that have that kind of reputation. Good ideas take time and misfeatures are expensive.

Re:A Proposal for Package Versioning in Go by kasey_junk on Monday March 26, 2018 @09:51PM (#16684472)
CSP the central premise of golangs concurrency model doesn’t meet that bar.

If they are willing to throw out that requirement for something as fundamental why should dependency management be held to so high a standard.

Re:A Proposal for Package Versioning in Go by weberc2 on Monday March 26, 2018 @11:08PM (#16684866)
Not sure what you're referring to. CSP turns 40 this year, and it's not the central premise of Go's concurrency. Whatever the original intent, very little Go is written in true CSP fashion. Of course, even if I were wrong about these points (and I'm not), it wouldn't invalidate my original point as you suggest: just because most of Go's features are very old doesn't mean Go is forbidden from making an innovative move or two--for example, its scheduler is unprecedented (at least as far as I'm aware).
Re:A Proposal for Package Versioning in Go by kasey_junk on Tuesday March 27, 2018 @12:34AM (#16685274)
Something being formulated exactly 40 years ago in academia doesn’t count as proving its value over 40 years especially given that broad support of the concept is new being supported by golang and at best the marginally popular clojure. The golang faq specifically says that csp is the basis of its concurrency.

Combine those 2 facts & I think it’s fair to say golang is willing to base things (central ones even) on untried ideas, which directly contradicts your stated position which was precisely that no dependency management scheme lives up to the precedent of the other accepted features of the language.

This is trivially proven incorrect via looking at other language dependency management schemes that have much more broadly proven their worth.

Re:A Proposal for Package Versioning in Go by mseepgood on Tuesday March 27, 2018 @04:32AM (#16686442)
> doesn’t count as proving its value over 40 years

The Go designers used CSP over the course of many decades via Newsqueak, Alef, Limbo and Plan 9 C's libthread.

Re:A Proposal for Package Versioning in Go by kasey_junk on Tuesday March 27, 2018 @07:01AM (#16687112)
As only a go user & not a contributer, that describes more the paradigm I’ve observed for how golang chooses the features to add.

Did the principles enjoy a feature while using it on Plan 9? Likely to be included. A feature having broad industry or academic backing, or a long history? Immaterial.

Re:A Proposal for Package Versioning in Go by pjmlp on Tuesday March 27, 2018 @08:26AM (#16687595)
Newsqueak, Alef, Limbo and Plan 9 C's failed spectacularly in the market, nothing to brag about as proven technologies.

In fact, as nice as Go might be, if it had the AT&T Research Labs stamp instead of Google's, it would been just as successful.

Re:A Proposal for Package Versioning in Go by weberc2 on Tuesday March 27, 2018 @08:48AM (#16687753)
> Combine those 2 facts & I think it’s fair to say golang is willing to base things (central ones even) on untried ideas, which directly contradicts your stated position

It absolutely doesn't contradict my stated position. I was clear about that in my previous post.

CSP inspired Go's features (in that sense alone it is "the basis for Go's concurrency" as alluded to by the Go FAQ) , but as I mentioned, it's not integral to Go in any way, and very few programs are modeled in CSP fashion.

Re:A Proposal for Package Versioning in Go by mattherman on Monday March 26, 2018 @12:55PM (#16680361)
What are some of your specific complaints about NuGet? I've never disliked it that much. For the most part it has "just worked" for me.
Re:A Proposal for Package Versioning in Go by GiorgioG on Monday March 26, 2018 @01:33PM (#16680749)
In large projects, NuGet takes FOREVER to resolve package dependencies - I mean 4+ minutes on a new i7 Thinkpad w/16gb RAM/1TB ssd.

Heaven-forbid you want to upgrade a package that exists in all 130 projects in the solution (not my call to have that many projects) - you may as well take a long lunch. I will try to make that the last task of the day so I can let it run for as long as it needs to.

The VS UI for NuGet is terribly buggy.

Re:A Proposal for Package Versioning in Go by pjmlp on Monday March 26, 2018 @01:48PM (#16680892)
Uauu! 4+ minutes.

Try to build a C++ or Android project and then go for lunch instead.

NuGET is great.

Re:A Proposal for Package Versioning in Go by GiorgioG on Monday March 26, 2018 @03:55PM (#16681949)
That's 4 minutes to resolve one NuGet package's dependencies - not 4 minutes for a build.
Re:A Proposal for Package Versioning in Go by pjmlp on Monday March 26, 2018 @04:36PM (#16682329)
Really? I never had it take that long.
Re:A Proposal for Package Versioning in Go by GiorgioG on Monday March 26, 2018 @04:47PM (#16682444)
Usually it doesn't take that long - but it is still generally, unacceptably slow IMO.) Last week I was working on fixing duplicate (version mismatches) package references in the our csproj files) in the branch/solution and I couldn't believe that took 4 minutes to resolve a single reference (after fixing the issue in this particular project!)
Re:A Proposal for Package Versioning in Go by pjmlp on Tuesday March 27, 2018 @05:38AM (#16686735)
I see, I guess I have been lucky then.
Re:A Proposal for Package Versioning in Go by GiorgioG on Monday March 26, 2018 @04:00PM (#16681986)
NuGet / VS has no qualms with having two references to the same package, but different versions in the project file (i.e. Newtonson.Json.dll 9.0 and 10.0) The build will likely fail though and you'll get no visual feedback that there are two refs in the VS NuGet UI. How did we we get in that state to begin with? I suspect through bad project file merges (or possibly NuGet UI bugs, can't say for sure.)
Re:A Proposal for Package Versioning in Go by flukus on Monday March 26, 2018 @08:53PM (#16684192)
> How did we we get in that state to begin with? I suspect through bad project file merges (or possibly NuGet UI bugs, can't say for sure.)

Most likely someone modified the packages for an individual project and not the solution as a whole. Always manage packages at the solution level and your much less likely to have these issues, unless you have multiple solutions...

Re:A Proposal for Package Versioning in Go by GiorgioG on Monday March 26, 2018 @10:59PM (#16684826)
That sounds great when you have a small team, with 30+ devs it's hard to police.
Re:A Proposal for Package Versioning in Go by wokwokwok on Monday March 26, 2018 @08:06PM (#16683920)
- no local dependencies^ - 'unable to resolve x, arbitrarily picked 1.4.3' - no lock file - nuspec file configuration hell - nuget v2 and v3 feeds arbitrarily going down - installing a specific nuget version on anything other than windows.

Basically, it 'just works' for simple senarios, its just not very good for anything else.

If you want a comprehensive guide to why its not awesome look at the 'packet' website, they cover the issues quite clearly.

^ you can actually use local dependencies, but its irritating and poorly supported (still uses the global system cache, forcing a cache flush to update).

Re:A Proposal for Package Versioning in Go by aljones on Monday March 26, 2018 @01:45PM (#16680859)
When you install a package, nuget will install old dependencies of that package.
Re:A Proposal for Package Versioning in Go by schmichael on Monday March 26, 2018 @12:33PM (#16680125)
> Go hasn't had mature dependency management since its inception and this constant thrash is really starting to make things difficult.

What constant thrash? In the 6 years since Go 1.0 the only dependency management related change I'm aware of is the addition of `vendor/`.

Update: sounds like "thrash" refers to the variety of community vendoring tools. I guess of the few I've used they all felt fairly similar/interchangeable, so it didn't feel like thrashing changes.

Re:A Proposal for Package Versioning in Go by benesch on Monday March 26, 2018 @12:39PM (#16680186)
The constant thrash caused by the lack of a standard package management tool—even a de facto standard. Just look at the various package managers that have come and gone over the years:

1. https://github.com/tools/godep

2. https://github.com/kardianos/govendor

3. https://github.com/robfig/glock

4. https://github.com/rogpeppe/govers

5. https://github.com/Masterminds/glide

6. https://github.com/golang/dep

I'm sure I'm forgetting a few. And just when it seemed the Go team might be ready to standardize around Dep (6), they threw this wrench in the works.

I'm of two minds about vgo. I think it has some interesting ideas, but Dep works today, is widely adopted, and has nearly all the features you'd expect from a modern package manager.

Re:A Proposal for Package Versioning in Go by randomdata on Monday March 26, 2018 @05:22PM (#16682736)
> The constant thrash caused by the lack of a standard package management tool

There is a standard, and has been one from the early days. The catch is that the standard is not loved by all, so others have created competing package management systems to fit their own needs.

Re:A Proposal for Package Versioning in Go by kasey_junk on Monday March 26, 2018 @09:53PM (#16684482)
What is it?
Re:A Proposal for Package Versioning in Go by lox on Monday March 26, 2018 @10:37PM (#16684705)
go get.
Re:A Proposal for Package Versioning in Go by kasey_junk on Monday March 26, 2018 @10:48PM (#16684778)
Does that finally work with private repos?
Re:A Proposal for Package Versioning in Go by sethammons on Tuesday March 27, 2018 @07:30AM (#16687277)
It always has. You have to edit your gitconfig. On mobile, so I can't paste mine. A Google search should get you there. It did for me like 5 years ago.
Re:A Proposal for Package Versioning in Go by kasey_junk on Tuesday March 27, 2018 @09:19AM (#16687995)
So having to reset my git config, either globally impacting everything I do, or manually for every project I use go get in...

Got it.

Re:A Proposal for Package Versioning in Go by lobster_johnson on Monday March 26, 2018 @12:48PM (#16680279)
Between "go get", Godep, Govendor, Glide, gb, Dep, and this — and I'm actually omitting a bunch of other, less popular utilities [1] — there's certainly been churn.

There's definitely a feeling among Go developers that this problem should have been solved much earlier, and that the Go team's years-long refusal to address it caused the proliferation of mediocre tools (looking at you, Glide) that in many ways made the whole situation worse.

When Dep came along, a lot of people breathed a sigh a of relief, because we finally have something okay, and we can go back to being productive instead of fighting dependency management problems all day.

[1] https://github.com/golang/go/wiki/PackageManagementTools

Re:A Proposal for Package Versioning in Go by majewsky on Monday March 26, 2018 @01:33PM (#16680750)
> In the 6 years since Go 1.0 the only dependency management related change I'm aware of is the addition of `vendor/`.

This. Sure, new tools have appeared, but there's literally nothing wrong if you decide to just stick with godep or whatever you happen to be using.

Re:A Proposal for Package Versioning in Go by notheguyouthink on Monday March 26, 2018 @12:35PM (#16680143)
There have been many packages for dependency management, which is not "official" thrash, but thrash nonetheless. Granted, mostly it's been thrash over the last few years. Especially bad since `go dep` was hailed as the king, and then recently abandoned entirely.
Re:A Proposal for Package Versioning in Go by TheDong on Monday March 26, 2018 @12:36PM (#16680158)
The blog post mentions some of this. It claims " For a long time, we believed that the problem of package versioning would be best solved by an add-on tool, and we encouraged people to create one. The Go community created many tools with different approaches"

These many tools were the thrash, including godep, gb, glide, dep, and more.

Each of these expressed versions with different manifests, many of them could import other format's, but not all. All-in-all it has been a mess.

Sure, the go team has not officially done much, but that's because their stance has been borderline negligent on the topic.

Re:A Proposal for Package Versioning in Go by weberc2 on Monday March 26, 2018 @12:58PM (#16680397)
I agree that the thrashing is a nuisance, but the 'reinvention' has nothing to do with Google except that Go didn't ship with a package manager by default because it wasn't useful to Google for the monorepo reason you cited. Regarding "features forced down our throats", I think that has only happened with aliases, and the community pushed back to the effect that the feature addition was halted until the community had time to properly review it. Mostly I think that was a one-off problem.

As for "it's a solved problem", is it? Until perhaps the last year, pip, npm, and most other package managers have been plagued with serious issues. I'm not fond of the situation in Go, but I think it's not unreasonable to try something different and less binding than a package manager until a solution emerges which solves the problems faced by other package managers.

Re:A Proposal for Package Versioning in Go by merb on Monday March 26, 2018 @12:34PM (#16680131)
+1

I actually also liked dep with the vendoring approach, it is just better to ci a repo with vendored dependencies (no more Broken Building because of Internet/Proxy or github Problems). And in Go it was/is Even simple to upgrade them. Sadly go is slowly moving away from that Part.

the new approach is Bad, because they still pull Sources from Github, this Makes their approach unsuitable.

E: damn iPhone autocorrect

Re:A Proposal for Package Versioning in Go by wink on Monday March 26, 2018 @05:59PM (#16683029)
> Dep was released in January 2017.

I know, Go is not a very old language, but all the Go projects I was involved in were started before that and I haven't written any Go in like 5 months, but still - this is too new for all the Go developers to have looked at it in depth (I certainly didn't come around to try it) and yet there's something new here.

We're all joking about a new JavaScript framework being released every week, but dependency management in Go feels a little alike.

I'm not a huge fan of Go anymore after my last experience (writing some web stuff, with CRUD) after having been a huge fan (writing monitoring checks and non-HTTP daemons), and I have no immediate plans - so I've no stake here, but I can really only hope this annoying part (which least-bad dependency management system will I use?) is finally over.

Re:A Proposal for Package Versioning in Go by lobster_johnson on Monday March 26, 2018 @09:22PM (#16684339)
We've been using Dep for about 6 months. It's definitely production ready. The interface may change a bit in the future, and of course now Dep may be scrapped altogether, but right now it's very usable. We haven't encountered any bugs.
Re:A Proposal for Package Versioning in Go by pdeuchler on Monday March 26, 2018 @01:08PM (#16680490)
Agreed. Dep had its warts (20 minutes for a very simple dep ensure...), but it solved the 80% use case in a way that was least objectionable for the majority. The fact that they can't (won't?) even refactor dep to suit their new ideas or try and revitalize the gps project just tells me that they don't really care about solving this for end users and just want to have fun writing a fancy dependency graph solver. Which is cool and all, but at least give me a stable API first.
Re:A Proposal for Package Versioning in Go by nicpottier on Monday March 26, 2018 @05:08PM (#16682602)
> just want to have fun writing a fancy dependency graph solver

There is no graph solver, that's the whole point.

Re:A Proposal for Package Versioning in Go by kibwen on Monday March 26, 2018 @08:20PM (#16684015)
Other package managers, including the ones mentioned in the OP, don't have SAT solvers either. This isn't a new feature of dependency resolution algorithms.
Re:A Proposal for Package Versioning in Go by benhoyt on Monday March 26, 2018 @01:35PM (#16680768)
The proposal explicitly allows for a "proxy" so you don't have to pull from GitHub et al:

> Define a URL schema for fetching Go modules from proxies, used both for installing modules using custom domain names and also when the $GOPROXY environment variable is set. The latter allows companies and individuals to send all module download requests through a proxy for security, availability, or other reasons.

Re:A Proposal for Package Versioning in Go by programd on Monday March 26, 2018 @05:54PM (#16682990)
The major problem I have with the proxy is that now I have yet another system to keep track of, update, secure, backup and maintain.

At least with vendoring I keep all of my code pinned in one portable repo and all I really need is dep and git. If I clone or backup the repo I don't have to think about cloning the state of the proxy also to get my code to compile.

I don't see that any serious business would be very enthusiastic about adding a code proxy as yet another cog in their development pipeline. One of the main appeals of Go is that it reduces many pain points of a development environment As a counterexample see e.g. the insane requirements of the Javascript web development ecosystem.

I also have some reservations about getting developers to adhere to a versioning repo layout standard - that /path/to/v2/ proposal and semantic versioning - absent any automated tools to enforce it (see cats, herding of). How many of the many Go github repos follow the recommended cmd/pkg code layout [0]? Not many. My cynical notion is that anything that's not automated out of the box is going to quickly run into the inevitable proclivity of humans to be messy.

Having said all this, I do think the discussion is worthwhile. My hope is that rather then completely switching dependency management systems the discussion identifies the things which are still painful with dep and fixes them. Let's face it, the vast majority of projects out there really don't need anything more complicated then dep, so I would hate to see it abandoned.

[0] https://github.com/golang-standards/project-layout

Re:A Proposal for Package Versioning in Go by ngrilly on Tuesday March 27, 2018 @04:41AM (#16686490)
You don't have to "pull sources from GitHub". You can host your code as a .zip file on any static web server. Look at under "Download Protocol" in this article: https://research.swtch.com/vgo-module

About vendoring, I think Russ Cox is aware of the issue. Look at this discussion on his website: https://research.swtch.com/vgo-module#comment-3771676619

Re:A Proposal for Package Versioning in Go by majewsky on Monday March 26, 2018 @01:32PM (#16680736)
I haven't read the spec, only the blogpost from last month, but afair nothing in vgo prohibits the use of a cache in front of GitHub that makes CI independent of GitHub.com availability (unless, of course, you're bumping your deps).
Re:A Proposal for Package Versioning in Go by ngrilly on Tuesday March 27, 2018 @04:47AM (#16686511)
You're right, nothing in the spec prohibits "vendoring" the .zip modules in a directory in your project. It's purely an implementation issue. vgo already provides GOPROXY, but a built-in "vendoring" mechanism would be easier for most people. Here is one I commented on Russ' blog: https://research.swtch.com/vgo-module#comment-3772245118
Re:A Proposal for Package Versioning in Go by notheguyouthink on Monday March 26, 2018 @12:36PM (#16680152)
I thought they were adding support for vendoring? Was it abandoned again?
Re:A Proposal for Package Versioning in Go by saghm on Monday March 26, 2018 @12:57PM (#16680379)
I think GP is referring to the fact that dep may not remain the blessed solution for long; recently, Russ Cox posted a number of articles suggesting looking into alternatives https://research.swtch.com/vgo
Re:A Proposal for Package Versioning in Go by sethammons on Monday March 26, 2018 @04:51PM (#16682467)
> For all practical purposes dependency management for programming languages is a solved problem

Hey Phil! It's been a long time. C'mon man, when we worked together, are you telling me you never ran into the never-resolving dependency map with berkshelf and chef? I know I did many times. Locks and a manifest did not solve that. It sounds like the proposed solution should prevent that.

Re:A Proposal for Package Versioning in Go by mseepgood on Monday March 26, 2018 @12:58PM (#16680388)
> For all practical purposes dependency management for programming languages is a solved problem

It's obviously not solved satisfactory.

Re:A Proposal for Package Versioning in Go by pcwalton on Monday March 26, 2018 @01:13PM (#16680547)
Yes, it is. Everything can be improved, but I see very few complaints with Cargo, and, most importantly, not complaints that would be solved with minimal version selection. (Most complaints I see are about the lack of package namespacing.)
Re:A Proposal for Package Versioning in Go by curun1r on Monday March 26, 2018 @05:19PM (#16682712)
One of the ways I'm hopeful that cargo can improve in this area is through the work being done on rust-semverver. If crates.io can either determine semver compliance or, perhaps, deny releases that are not properly semantically versioned, it would give cargo more license to select a single version to satisfy diamond dependency graphs. Those diamond dependency graphs are one of the ways that package management is famously very much unsolved.
Re:A Proposal for Package Versioning in Go by weberc2 on Monday March 26, 2018 @04:40PM (#16682379)
I agree that Cargo is awesome and I would be happy to see Go follow suit, but I interpret "package management is solved" to mean "the industry has standardized on a single scheme". There does seem to be convergence in this space, but it's a relatively new phenomenon.
Re:A Proposal for Package Versioning in Go by sagichmal on Monday March 26, 2018 @06:05PM (#16683073)
Yes, the industry has absolutely standardized on a single scheme: manifest plus lock as separate declarations, SAT solver, single dependency version per compilation unit.
Re:A Proposal for Package Versioning in Go by clhodapp on Monday March 26, 2018 @08:33PM (#16684092)
That may be what things are converging on but in my opinion, any system that imposes a "single dependency version per compilation unit" policy is not a "real" dependency management solution. That approach creates a tremendous amount of friction because it pretty much ensures dependency hell if there are transitive dependencies with separate release cycles (and there very much should be able to be).

Edit: I just realized that we may have a different definition of "compilation unit". If you mean "single program" then my point stands. However, if you just meant some sectioned-off part of the program, then I think the drawbacks of that are far less. Basically, I think that it is useful to be able to have access to multiple versions of a datatype (e.g. if you want to write a converter from old -> new) but that use case is far more fringe.

Re:A Proposal for Package Versioning in Go by XorNot on Tuesday March 27, 2018 @08:41AM (#16687695)
As a sysadmin I object to the notion that old to new conversions are a "fringe" use-case. Pretty much all my coding (I'm a "devops" sysadmin-type) is exclusively "I need to wrangle all versions of thing 1 into a type of thing 2 or between several versions of thing 1".

If backwards compatibility is important, then letting me use multiple versions side-by-side in the same modules easily is damn important.

Re:A Proposal for Package Versioning in Go by steveklabnik on Tuesday March 27, 2018 @03:17AM (#16686068)
To be clear, Cargo fits the latter definition; you can't depend directly on two different versions of a package, but you can transitively.
Re:A Proposal for Package Versioning in Go by weberc2 on Monday March 26, 2018 @07:22PM (#16683637)
If that's the case, it's a pretty recent development. Python and JS didn't have this until very recently. Yeah, Go is a bit late to the party, but hardly worth the dramatic criticism in this thread.
Re:A Proposal for Package Versioning in Go by ngrilly on Tuesday March 27, 2018 @04:51AM (#16686530)
No, it's hardly a standard. It's just a common approach. The article presents another approach which differs on the three points you mention: manifest plus lock as separate declarations, SAT solver, single dependency version per compilation unit. And I think what Russ proposes is a really interesting tradeoff in the design space.
Re:A Proposal for Package Versioning in Go by sagichmal on Tuesday March 27, 2018 @04:57PM (#16692662)
It is the _defacto_ standard and has been for many years. It is what's expected by the absolute and vast majority of software developers.
Re:A Proposal for Package Versioning in Go by crtc on Monday March 26, 2018 @01:57PM (#16680966)
> I see very few complaints

If you live in a filter bubble (survivorship bias).

Re:A Proposal for Package Versioning in Go by stouset on Monday March 26, 2018 @02:09PM (#16681054)
Only because the golang core team seem to insist on reinventing every wheel either without considering prior art, or at least without considering why prior art went with a particular approach.

I swear I should put together a list of these instances.

Re:A Proposal for Package Versioning in Go by weberc2 on Monday March 26, 2018 @04:42PM (#16682394)
> Only because the golang core team seem to insist on reinventing every wheel either without considering prior art, or at least without considering why prior art went with a particular approach.

The popular criticism is that Go isn't reinventing enough; that it's stuck in the 70's and it's not sufficiently innovative.

Re:A Proposal for Package Versioning in Go by stouset on Monday March 26, 2018 @06:07PM (#16683081)
I think it's two sides of the same coin.

I've heard go described as a language that doesn't try to solve any hard problems. Let's set aside for a moment whether or not that's a positive or a negative. The bigger problem is that they also seem to completely ignore everyone else's existing solutions to hard problems too, which leads to the criticism that it's stuck in the 70's.

Sure, a lot of the existing solutions to some of these problems aren't perfect or involve tradeoffs that don't work for everyone. In general though, more recent solutions have built upon the lessons of previous approaches and now we've got languages and tooling that get a hell of a lot right, straight out of the box (I'm looking at you Rust / Cargo).

But go isn't doing this. They appear to be trying to come up with de novo solutions to problems from the perspective of the 70's. Whereas everyone else is "standing on the shoulders of giants", they insist on discarding the lessons we've learned over the past fifty years and running one by one into all of the same problems that led us to the solutions we have today. As an observer from the sidelines it's painful to watch them relearn these same lessons the hard way.

Re:A Proposal for Package Versioning in Go by weberc2 on Monday March 26, 2018 @07:20PM (#16683628)
I largely agree, and still for everything that Rust and company get right and for everything that Go gets wrong and for how much optimism I approach Rust and company with, I'm still far more productive in Go than any other language (even the ones with which I have much more experience). The only way I can explain this is that programming language design is something of an art form, and the integration of features and tools is far more important than the set of features and tools.
Re:A Proposal for Package Versioning in Go by geodel on Tuesday March 27, 2018 @10:37AM (#16688816)
Rust current package manager is third attempt which worked. Async saga also is approaching 3rd attempt before we have it working. For module system there was big backlash on simplifying it for new users. so effect will be more likely that is understood by few developers who have spent significant time.
Re:A Proposal for Package Versioning in Go by weberc2 on Tuesday March 27, 2018 @11:20AM (#16689325)
That's a really good perspective. Thanks for sharing.
Re:A Proposal for Package Versioning in Go by dbaupp on Monday March 26, 2018 @06:11PM (#16683111)
I think that's an inaccurate/misleading framing: the typical criticism is that it has seemed to ignore innovations from elsewhere, there's no suggestion that it needs to reinvent them. For instance, people consider generics a solved problem as there's numerous schemes invented by other languages, and critics think one of them should be able to work for Go.
Re:A Proposal for Package Versioning in Go by ngrilly on Tuesday March 27, 2018 @05:05AM (#16686591)
Yes, but Go has specificities that make difficult to directly use the scheme used by other languages: Go is AOT compiled (we can't use C# generics), Go favors compilation speed (we can't use C++ template), Go lets the developer control memory layout with arrays and structs (we can't use OCaml generics), etc. Of course, Go should get inspiration from other languages, but adding generics is not easy as simply transposing another language implementation. There are multiple detailed proposals in the bug tracker that have failed for multiple reasons.
Re:A Proposal for Package Versioning in Go by pjmlp on Tuesday March 27, 2018 @08:46AM (#16687731)
There are also CLU, Ada, Modula-2, Modula-3, Eiffel, Sather, BETA as possible inspirations for implementing generics, all the way back to 1976 (CLU).

As for C#, people keep forgetting .NET always had a JIT/AOT compiler since version 1.0.

Just because not everyone bothers to sign their applications and call NGEN at installation time, it doesn't mean it isn't there.

Also Mono always supported AOT compilation, it is the way Xamarin works on iOS and the deployment story on Windows Store since it was introduced on Windows 8.

Re:A Proposal for Package Versioning in Go by ngrilly on Tuesday March 27, 2018 @11:16AM (#16689290)
I remember Mono with AOT compilation had some limitations regarding generics in the past, but maybe this has been solved since then.
Re:A Proposal for Package Versioning in Go by pjmlp on Tuesday March 27, 2018 @12:07PM (#16689839)
Yes Mono has some limitations, but it isn't 100% like the iOS Xamarin compiler.

http://www.mono-project.com/docs/advanced/aot/

In any case, a limited form of generics is better than not having any at all.

They don't need to provide a turing complete implementation of generics, even a basic one like CLU had would already be an improvement.

Using go generate feels like the old days, writing generic code in C and C++ with pre-processor tricks.

Re:A Proposal for Package Versioning in Go by ngrilly on Tuesday March 27, 2018 @12:27PM (#16690074)
I agree. I hope the Go team will tackle this issue, when they are done with dependency management.
Re:A Proposal for Package Versioning in Go by dbaupp on Tuesday March 27, 2018 @06:04AM (#16686852)
Swift has essentially all the same constraints, and fretting about compilation speed with the C++ approach are hard to stomach given one of the widely-used replacement is equivalent: manually copy-pasting code, instead of letting the compiler do it.

In any case, the truth of the complaint about generics isn't actually relevant here: the rebuttal is to "people complain about Go not reinventing enough", and they don't, as they (truthfully or otherwise) think it is ignoring already researched and widely-implemented solutions to the problem and complain about this (that is, the complaint is "uninventing", not "not enough reinventing").

Re:A Proposal for Package Versioning in Go by ngrilly on Tuesday March 27, 2018 @07:36AM (#16687307)
I didn't mention Swift and I should have. I agree it's close enough to Go to provide useful inspiration.

But even Swift implementation of generics has its issues and tradeoffs. Look for example at this thread about "Compile-time generic specialization" in Swift: https://lists.swift.org/pipermail/swift-evolution/Week-of-Mo...

Repeating that Go ignores "already researched and widely-implemented solutions" is getting old, really. Would you say that OCaml doesn't have shared memory multicore parallelism because it ignores already researched and widely-implemented solutions??? Would you say that Haskell garbage collector causes long runtime pauses because it ignores already researched and widely-implemented solutions??? The truth is that solving that kind of things is a lot more complex than just copy-paste the code from another language.

Re:A Proposal for Package Versioning in Go by dbaupp on Tuesday March 27, 2018 @07:16PM (#16693699)
I'm... intimately familiar with generics in Swift. :) Like all systems it has trade-offs, but the decision it makes line up with the decisions you said Go wanted to also make.

In any case, that specific concern doesn't apply to Go, since it doesn't have overloading.

> Repeating that Go ignores "already researched and widely-implemented solutions" is getting old, really

Sure, but that still isn't the point of this discussion: it's not what people should be doing, or the underlying truth, it's what people are doing in practice and they are complaining about the Go team seemingly ignoring the past 40 years of programming language development, not complaining that they're not inventive enough.

Re:A Proposal for Package Versioning in Go by ngrilly on Wednesday March 28, 2018 @05:13AM (#16696440)
You're right about the issue I mentioned which is irrelevant since there is no overloading in Go. Thanks for pointing it out.

I didn't know you worked on Rust and now on Swift :-)

What strategy does Swift use to compile a generic function or method? Does it generate only one polymorphic version of the code, or multiple specialized versions for each expected parameter types (often called code specialization or monomorphization)?

Re:A Proposal for Package Versioning in Go by dbaupp on Wednesday March 28, 2018 @05:57AM (#16696577)
One polymorphic version, like OCaml or Haskell, not specializing like C++ or Rust.

The compiler can and does specialize functions as an optimization, but that's not necessary nor part of the semantic model.

Re:A Proposal for Package Versioning in Go by ngrilly on Wednesday March 28, 2018 @07:30AM (#16696887)
I always thought that generating one polymorphic version would be a better fit for Go than generating multiple specialized versions.

It's interesting that Swift adopted this approach and confirms what you said earlier about Swift having essentially the same constraints as Go and being a good source of inspiration of Go.

What's the status of Swift on Linux, to write web services and connect to databases?

Re:A Proposal for Package Versioning in Go by dbaupp on Wednesday March 28, 2018 @08:25AM (#16697139)
There's lots of testing for Swift on Linux (e.g. every pull request runs tests on macOS and Linux), and Apple recently announced https://github.com/apple/swift-nio which seems to have been very well received, e.g. the Vapor framework is completely switching to it for Vapor 3.
Re:A Proposal for Package Versioning in Go by ngrilly on Wednesday March 28, 2018 @09:00AM (#16697331)
Thanks for the link. Does Swift provide something similar to goroutines?
Re:A Proposal for Package Versioning in Go by ernst_klim on Thursday March 29, 2018 @05:24PM (#16711163)
>OCaml doesn't have shared memory multicore parallelism because it ignores already researched and widely-implemented solutions?

OCaml people definitely not ignore them, they are carefully investigating existing code and elaborating modern and efficient solution [1](unlike Go, which is too opinionated).

[1] https://github.com/ocamllabs/ocaml-multicore/wiki/Memory-mod...

Re:A Proposal for Package Versioning in Go by ngrilly on Thursday March 29, 2018 @06:38PM (#16711799)
I'm aware of the ongoing work to enable multicore parallelism in OCaml. It's the reason why I mentioned OCaml in my comment. My comment was rhetoric. My apologies if it was not clear.

That said, I don't see the link between the work done on OCaml multicore parallelism and Go "being too opinionated"...

If I follow you, Go people, unlike OCaml people, are "too opinionated", and don't "carefully investigate existing code" and don't "elaborate modern and efficient code". Do you realize how arrogant (and a bit ridiculous) this sounds?

Re:A Proposal for Package Versioning in Go by geodel on Monday March 26, 2018 @08:02PM (#16683898)
Is Swift scheme same as Rust which is same as Java which is similar to C++? If not then it seems to me language developers decided to use an approach what suited their purpose.
Re:A Proposal for Package Versioning in Go by dbaupp on Monday March 26, 2018 @08:21PM (#16684023)
No, they're all different, which is my point: there's a variety of schemes that all have well-understood pluses and minus, meaning new languages don't have to do the exploration themselves.
Re:A Proposal for Package Versioning in Go by ngrilly on Tuesday March 27, 2018 @04:58AM (#16686566)
> The popular criticism is that Go isn't reinventing enough; that it's stuck in the 70's and it's not sufficiently innovative.

That's popular, but unfounded, in my opinion.

I find ironic that some HN commenters are criticizing the Go team for not being stuck in the past when they are precisely trying to innovate and questioning the status quo on package management.

Re:A Proposal for Package Versioning in Go by mseepgood on Monday March 26, 2018 @03:00PM (#16681497)
> Only because the golang core team seem to insist on reinventing every wheel either without considering prior art, or at least without considering why prior art went with a particular approach.

Actually it's pretty clear that they did their homework.

Re:A Proposal for Package Versioning in Go by stouset on Monday March 26, 2018 @03:17PM (#16681625)
If you count as “their homework” the dozens of iterations of this we’ve been through.

First, it was literally argued that just `go get` just grabbing `master` of all of your dependencies was good enough, because if you ever need to release something backwards-incompatible, you should create a new repo. I wish I were making this up.

Then we just vendored everything and never updated our dependencies, and that too was good enough.

Then GoPM, go dep, and a deluge of other tools that I don’t care to track down or sort into their appropriate order.

And now this, which decides to buck the trends that everyone else follows yet again and attempts to satisfy dependency trees by choosing the minimal compatible versions instead of the maximal ones, with the completely foreseeable consequences that:

  * security patches won’t be applied
  * issue trackers will be filled with bug reports that are closed with messages saying “this was fixed months ago, update”, and
  * updating dependencies will become *harder*, since this is a straightforward result of doing it less frequently
Re:A Proposal for Package Versioning in Go by mjevans on Monday March 26, 2018 @06:59PM (#16683471)
If you can't go get -u all on your project at least you have done something 'wrong' or your upstreams have done something wrong.

First, the upstream behavior; not supporting the published interface (as it was and should therefore work forever) means they need to deprecate that interface and release another with the incompatible changes. However the PROPER way of handling this is to add new versions of exposed public methods and interfaces / constants with new names and only if such a major change is required that you can't support the old interfaces, at THAT point, release at least under a new inclusion path if not new dependency name.

Things local a developer might have done wrong: A) include an 'immature' upstream repository that behaves like above. B) use non-public components or other unsafe practices to go beyond the interface contract that was exposed.

Re:A Proposal for Package Versioning in Go by TheDong on Monday March 26, 2018 @11:41PM (#16685028)
I guess using any dependency, directly or transitively, that declares itself pre-1.0 in the go or semver meaning of the word, is thus right out.

At that point, almost all of the go ecosystem can't be used.

Re:A Proposal for Package Versioning in Go by jjuel on Monday March 26, 2018 @02:29PM (#16681233)
Do you have proof that the Go team has not looked at any other dependency management approaches or considered ones from other languages?
Re:A Proposal for Package Versioning in Go by stouset on Monday March 26, 2018 @03:03PM (#16681526)
Obviously I don’t, but the available evidence — to me, anyway — points to this being a cultural reality in the golang ecosystem.

I left the language years ago, but the steady stream of articles of the form “Why go doesn’t need $x” followed by innumerable comments, articles, and blog posts by people struggling with the lack of $x, followed by the go core team (due to the completely foreseeable consequences of not having $x) begrudgingly adopting $y, which is supposed to (but doesn’t actually) obviate the need for $x… I’ve reached my own conclusions, and I’m finding more and more people who are leaving the ecosystem with those same conclusions.

I believe that Go excellently solves problems that Google has. I don’t believe it solves many problems that most other users have, even though it might seem like it at the outset.

Re:A Proposal for Package Versioning in Go by pjmlp on Monday March 26, 2018 @03:48PM (#16681879)
Wait until they finally cave in to generics being one of the top requests on Go surveys and bring something to Go following that same design process.
Re:A Proposal for Package Versioning in Go by mjevans on Monday March 26, 2018 @06:28PM (#16683221)
What are the "benefits" of this approach?

To re-iterate a different post of mine against this question (implicitly, what are the benefits of NOT having library versions):

    * The only version to test against is HEAD
    * No fossilization of security or stability issues
    * Public libraries must support all Uppercased (exposed) declarations; that is the library interface.
    * If the build breaks in an odd way: update go, then: go get -u all
    * Simplicity, there's only one supported version and only one version to go get and develop against.
    * Also, why would building against an old version _ever_ be necessary?
Re:A Proposal for Package Versioning in Go by ngrilly on Monday March 26, 2018 @05:40PM (#16682874)
Have you read the post? It provides answers to your claim that "dependency management is a solved problem".
Re:A Proposal for Package Versioning in Go by zeveb on Monday March 26, 2018 @02:04PM (#16681020)
> The only explanation for this constant re-invention that I can come up with (and that's shared among others I know) is that Google doesn't care/need a dependency tool because of their mono repo.

That's a pretty good argument for using a monorepo, don't you think? A single organisation's code should all be in a single repo, which means that a single version of a dependency is used within the organisation, and that updating to a new version of that dependency is a single, self-contained project.

Re:A Proposal for Package Versioning in Go by ilovecars2 on Monday March 26, 2018 @03:48PM (#16681878)
We use a monorepo at our place of work and it’s great, so far. We also use govendor to manage external dependencies in the monorepo. We are rigorous about keeping packages up to date so have never had to run v1 and v2 of a package at the same time.
Re:A Proposal for Package Versioning in Go by geodel on Monday March 26, 2018 @01:05PM (#16680463)
> forced down our throats when Google suddenly finds a need for them

You can say that about Go itself. And there are already other/better alternatives. So why use Go?

Re:A Proposal for Package Versioning in Go by dstroot on Monday March 26, 2018 @01:09PM (#16680493)
A language is valued by its programmer bench, tooling, available libraries, as well as the language itself. Honest question - what is better than go right now?
Re:A Proposal for Package Versioning in Go by jerf on Monday March 26, 2018 @01:13PM (#16680538)
You'd have to specify the use case of interest. I don't think there's anything that uniformly dominates Go, but that's terribly interesting since there are so many dimensions of interest for a programming language that there aren't any languages in use that uniformly dominate some other language in use. (You can get uniform domination if you include unused language or esolangs, but who cares.) But there are certainly many use cases for which Go is not the best choice, not in the top 3-5, or straight-up not a viable choice.
Re:A Proposal for Package Versioning in Go by baq on Monday March 26, 2018 @02:23PM (#16681180)
C, c++, c#, Java, Python, Lua, lisp, Ada...

Go has its good sides, but it's just a tool. It's not the best, because tools aren't supposed to be the best. Tools are supposed to be useful for what they're made for.

Re:A Proposal for Package Versioning in Go by ilovecars2 on Monday March 26, 2018 @03:41PM (#16681806)
I have a hard time with using Java to write micro-services. Even though lots of packages, such as Undertow, support non blocking I/O, a lot of the rest of the stack and the programmers that use it don’t know how to do NIO. What happens then is that the SRE/Ops team needs to configure large thread pools which consume lots of RAM just because multiplexing is I/O so difficult.

In comparison I can just start goroutines and Elixir processes for fast and simple I/O parallelism almost without thinking about it.

Re:A Proposal for Package Versioning in Go by saturn_vk on Tuesday March 27, 2018 @01:41AM (#16685590)
But it has had mature dependency management tools for a long time. They were similar to cargo and npm.
Re:A Proposal for Package Versioning in Go by Thaxll on Monday March 26, 2018 @01:21PM (#16680631)
"Go hasn't had mature dependency management since its inception"

go dep is perfectly fine for most use case.

Re:A Proposal for Package Versioning in Go by endymi0n on Monday March 26, 2018 @01:29PM (#16680713)
Agreed, but compared to Go itself, dep is incredibly recent, still in Alpha, not widely used yet and only the last in a series of incredibly many homegrown approaches that created lots of chaos and churn. And when everybody thought the rollercoaster was finally over, vgo came around the corner. It’s a great proposal, no doubt, but it‘s fair to say dependency management and generics were the two largest unsolved daily encountered problems with Go in real life. Let‘s just hope the community gets an Epiphany about the latter one as well soon...
Re:A Proposal for Package Versioning in Go by 0xdeadbeefbabe on Monday March 26, 2018 @01:03PM (#16680449)
I'm ok for now putting everything in one GOPATH as if I were google.

> How many iterations of this do we have to go through?

Fewer iterations than Mr. Cox has gone through. Isn't it great?