News for hackers. Stuff that matters.
Re:The vgo proposal is accepted. Now what? by eberkund on Tuesday May 29, 2018 @07:48PM (#17183739)
I wish they had just copied Rust/Cargo. I remember reading a comment on GitHub somewhere from one of the Go maintainers who responded to someone expressing a similar sentiment and his reply was basically that Go is somehow different than every other language and they need to explore and find a unique custom solution for their particular use case. Has it ever been addressed anywhere why the tried and true "list of packages" + "lock file" paradigm is not good enough for Go?
Re:The vgo proposal is accepted. Now what? by amasad on Tuesday May 29, 2018 @10:50PM (#17184648)
There are a lot of suboptimal design decisions that's shared across the state of the art in package management (cargo, pipenv, npm, yarn, etc) that the Go team is not taking for granted.

One is reproducible builds. The standard answer is lock files which is extra bloat and leads to merge conflicts. vgo is trying to avoid it with the "minimal versions" strategy (https://research.swtch.com/vgo-repro).

Another is shared (or recursive) dependencies. The semver answer to this is that if the versions match then they should be shared if not then they should be duplicated. But what do you do if it's a singleton, listens on a port, or exposes a port. Right now, with npm for example, good luck with that, you're in for a world of pain. On the other hand with vgo's "semantic import versioning" they're trying to make version interop more explicit.

Just because 90% of the time mainstream package mangers work doesn't mean it's a solved problem. Kudos for the Go team for trying to advance the state of the art.

Re:The vgo proposal is accepted. Now what? by eridius on Wednesday May 30, 2018 @12:51AM (#17185156)
The "minimal versions" strategy basically just replaces the lockfile with your dependency list.

Two branches want to update the same dependency? With a lockfile, they both update the lockfile and will have a merge conflict (assuming the updates aren't identical). With "minimal versions", they both update the file that declares the dependency, and, you guessed it, have a merge conflict.

Re:The vgo proposal is accepted. Now what? by petre on Wednesday May 30, 2018 @06:48AM (#17186574)
Minimal versions put the burden of background compatibility on the maintainer of the dependency. If such is the case, library maintainers are constrained to refrain from breaking background compatibility at minor version changes, like Go itself does. In this case, you can merge, resolve the conflict by incrementing the dependency's version number, rebuild and retest and if all goes well commit. With lockfiles if branch X requires 1.4, branch Y requires 1.5 and 1.5 breaks 1.4, good luck with that. You'll need to update branch X to support 1.5.
Re:The vgo proposal is accepted. Now what? by eridius on Thursday May 31, 2018 @08:36PM (#17201557)
SemVer already solves that problem.
Re:The vgo proposal is accepted. Now what? by sseth on Wednesday May 30, 2018 @07:27AM (#17186775)
Most package managers ignore the lock files of the dependencies when picking up versions - they only use the lockfile of the topmost project for picking up versions.

The big difference with the MVS strategy in vgo is that the dependency list of a dependency is actually used to determine the version. If package A uses B, which was tested with v1.2 of package C, you will get v1.2 of C, even if there is a later version of C available.

In the typical package manager scenario, the dependency list of B may be pointing to an old version of C which does not even work with B - there is generally no way to ask : give me the latest version of C which was tested with B.

Re:The vgo proposal is accepted. Now what? by eridius on Wednesday May 30, 2018 @01:46PM (#17189840)
I think package managers should have an option to run a build of your package using the oldest versions instead of newest versions, just to validate that the build works, but that this shouldn't be the normal way to resolve dependencies.
Re:The vgo proposal is accepted. Now what? by kibwen on Tuesday May 29, 2018 @10:59PM (#17184701)
> The standard answer is lock files which is extra bloat and leads to merge conflicts.

Bloat how? A lockfile is a handful of bytes. A thousand lockfiles could fit in the space of a single Go hello world binary. And I've never heard of a merge conflict from a lockfile. What are the actual arguments against lockfiles?

Re:The vgo proposal is accepted. Now what? by jasonwatkinspdx on Tuesday May 29, 2018 @11:37PM (#17184867)
There are situations where lock files, as implemented in some languages, can generate conflicts. Honestly I consider this a benefit, because I'd like to know about different expectations as early and explicitly as possible.

The bloat argument seems frankly absurd to me.

Re:The vgo proposal is accepted. Now what? by blaisio on Tuesday May 29, 2018 @11:54PM (#17184927)
It's pretty easy to get a merge conflict from a lock file. If two developers add a dependency and then try to merge their changes together, it can happen easily.
Re:The vgo proposal is accepted. Now what? by kibwen on Wednesday May 30, 2018 @12:08AM (#17184998)
In that scenario, you're going to get a merge conflict anyway in your manifest (e.g. in go.mod).
Re:The vgo proposal is accepted. Now what? by grahamedgecombe on Wednesday May 30, 2018 @05:28AM (#17186300)
It's probably easier to manually merge the manifest (as they're much more human-readable) than a lock file though.
Re:The vgo proposal is accepted. Now what? by steveklabnik on Wednesday May 30, 2018 @05:55AM (#17186400)
Lock files are easy enough to resolve that npm, in newer versions, will do it for you automatically, if you ask it to.
Re:The vgo proposal is accepted. Now what? by Groxx on Wednesday May 30, 2018 @06:51PM (#17192585)
That's correct behavior though - you can't merge "upgrade A" and "upgrade B" in isolation with literally any confidence that it works.
Re:The vgo proposal is accepted. Now what? by amasad on Tuesday May 29, 2018 @11:16PM (#17184784)
More things, more state = bloat. Don't you agree that if you can do something without holding state it's invariably simpler? That's what MVS does.

There's also cases where your lock file and manifest are not in agreement. e.g. https://github.com/rust-lang/cargo/issues/4100

Re:The vgo proposal is accepted. Now what? by kibwen on Tuesday May 29, 2018 @11:48PM (#17184910)
> Don't you agree that if you can do something without holding state it's invariably simpler?

Only if the two solutions under consideration are really solving the same problems. Sam Boyer alludes to this very thing in his discussion of MVS:

"If there are two algorithms that satisfy the same requirements, and only one is NP-complete, you pick the other one. That’s axiomatic. Moreover, if you have only an NP-complete algorithm for a particular problem, finding a less complex alternative that does the same job is an electrifying discovery. When such an alternative algorithm is proposed, however, the inevitable question to be answered is whether it actually does meet the original requirements. [...] But, in avoiding SAT, MVS also cuts out some of the complexities that I believe are essential to the domain. Being essential, the problems don’t go away when MVS ignores them. Instead, they’re redistributed into other, often less obvious places. If reading the vgo blog posts gave you a general sense of unease that you couldn’t put your finger on, that might’ve been you intuitively sensing some of these redistributions." https://sdboyer.io/vgo/intro/

Re:The vgo proposal is accepted. Now what? by oceanswave on Wednesday May 30, 2018 @07:48AM (#17186899)
>One is reproducible builds. The standard answer is lock files which is extra bloat and leads to merge conflicts.

You can’t have your cake and eat it too

Re:The vgo proposal is accepted. Now what? by lobster_johnson on Tuesday May 29, 2018 @08:11PM (#17183835)
Rust/Cargo had the luxury of being a greenfield project that could adopt semver from the beginning, whereas Go made the mistake of starting out, and then going years, without any official package management solution. As a result, Go has a swathe of applications and libraries that use specific workflows as well as a mélange of community-developed package management tools such as godep, Glide and dep. The semver standard, in particular, has been inconsistently adopted by the Go community.

In other words, any new Go tool either has to support/import existing code, or to wipe the slate clean and say that for a package to be importable it has to follow a new spec. dep decided on the former, and my impression is that this has had unfortunate consequences, because that inherits a lot of historical baggage.

We've been using dep for a while (having escaped the bugfest that is Glide, which used a very similar approach), and it's pretty evident that the solver is buggy and slow and also complicated enough that fixing issues like [1] can only be done by a select few that already understand the codebase. I'm not in a position to judge what the causes of all of these issues are, though I'd wager they're not entirely unrelated to the inherent complexity of SAT solving. The current dep issue tracker is full [2] of reports mentioning the solver, not to mention that dep currently has problems with known libraries such as the Kubernetes client [3] and Protobuf. (Google-related projects have historically used godep.) Again, possibly related to this specific implementation and not necessarily something that would apply to a hypothetical "Cargo for Go", but I don't know.

Any idea how Cargo compares to dep overall?

[1] https://github.com/golang/dep/issues/1306 — this one is a nightmare if you work anything related to Kubernetes.

[2] https://github.com/golang/dep/issues?q=is%3Aissue+is%3Aopen+...

[3] https://github.com/golang/dep/issues/1207

Re:The vgo proposal is accepted. Now what? by pcwalton on Tuesday May 29, 2018 @10:16PM (#17184508)
Rust was actually around for a good while before Cargo was adopted. (In fact, there were two Cargos, the older of which bore very little resemblance to the Cargo of today.) Of course, Go was stable for longer.

I have to admit I'm a bit confused as to why the dependency resolution algorithm in dep is seen as slow. The speed of the solver is not a problem in any other package management system I've seen. If it is indeed the solver that is the problem (which, again, I'm skeptical of—I'd have to see profiling data to believe it), then it could just come down to optimization differences between rustc and Go 6g/8g.

Re:The vgo proposal is accepted. Now what? by pcx on Wednesday May 30, 2018 @12:21AM (#17185048)
> The speed of the solver is not a problem in any other package management system I've seen

This! I've never heard anyone complain about this aspect of a package manager, EVER. vgo seems to be optimizing for a problem no one has.

Re:The vgo proposal is accepted. Now what? by jcelerier on Wednesday May 30, 2018 @04:22AM (#17186012)
> The speed of the solver is not a problem in any other package management system I've seen

really ? It has been a large problem in Debian for instance and has enabled a lot of research (https://scholar.google.fr/scholar?q=debian+solver). One of the reason for Fedora's yum -> dnf change was also a change of solver. It's a hard problem that affects a lot of people.

Re:The vgo proposal is accepted. Now what? by pcx on Wednesday May 30, 2018 @05:20AM (#17186257)
To clarify, I(and the OP) was specifically talking about programming language specific package managers.
Re:The vgo proposal is accepted. Now what? by lathiat on Wednesday May 30, 2018 @06:28AM (#17186506)
puppet dependency managers have also been an issue it's certainly easy to solve poorly
Re:The vgo proposal is accepted. Now what? by sametmax on Thursday May 31, 2018 @06:20PM (#17200840)
You can't compare languages and os package manager. They are on a completely different scale.
Re:The vgo proposal is accepted. Now what? by trumpeta on Wednesday May 30, 2018 @07:01AM (#17186631)
Scala / SBT has a particularly slow dependency resolution
Re:The vgo proposal is accepted. Now what? by marcus_holmes on Wednesday May 30, 2018 @12:49AM (#17185145)
Go has always optimised for build speed. I guess they considered dependency resolution as part of the build process.

Which it technically is, I suppose, but when you're coding and iterating the code-build-run loop you generally don't need to add new dependencies each time. And that's when the build speed matters, of course.

Re:The vgo proposal is accepted. Now what? by pcx on Wednesday May 30, 2018 @01:57AM (#17185418)
And, most CIs cache build dependencies these days which is an easy work around.
Re:The vgo proposal is accepted. Now what? by amluto on Wednesday May 30, 2018 @11:25AM (#17188415)
I once waited for a long time for an older Haskell dependency solver to contemplate a situation before it gave up.
Re:The vgo proposal is accepted. Now what? by baq on Wednesday May 30, 2018 @01:27AM (#17185295)
i've seen aptitude get really confused about what to install and computing a solution for a few minutes.

once.

10 years ago or so, i don't even remember.

Re:The vgo proposal is accepted. Now what? by pcwalton on Wednesday May 30, 2018 @01:34AM (#17185324)
I should clarify that I'm referring to language package managers. Their problem domains are significantly different than those of system package managers.
Re:The vgo proposal is accepted. Now what? by asymmetric on Sunday June 03, 2018 @06:47AM (#17218953)
I'm curious, what makes the problem domains different?

I'm asking because I'm interested in "universal" package managers like nix.

Re:The vgo proposal is accepted. Now what? by lobster_johnson on Tuesday May 29, 2018 @10:53PM (#17184663)
Here [1] is the "dep ensure -v" output for a project of mine. It takes almost 12 seconds even when there are no changes to the actual file. I don't know why, or whether it's actually the solver (though the output seems to indicate it).

[1] https://gist.github.com/atombender/7c28f1d371fcb139e1e742a08...

Re:The vgo proposal is accepted. Now what? by TheDong on Wednesday May 30, 2018 @01:37AM (#17185335)
As you can see from the output, it is not the solver per-se, but the weird idiosyncrasies of go imports and gopath layout. 'satisfy' and 'select-atom' and such are the solver bit and take about 20ms all together. A SAT solver is 20ms, MVS might be 1ms, but who cares about that difference, right?

The top 3 items there are slow because they're:

1. 'source-exists' (~6s) which will do network traffic to find if a project exists to be downloaded or is in the cache; it's network io heavy in most cases.

2. list-packages (~3s) which parses the downloaded source code for import statements to find further dependencies; disk-io heavy + go loader has to do some work

3. gmal - GetManifestAndLock (~2s) which looks for lock files, including of other dependency solvers; disk io mostly I think

Any system designed with the constraint that it cannot use a centralized registry / list, must be compatible with things not using this system (and so must parse their code), etc will have these problems regardless of the algorithm.

Those steps are all doing network/disk-io/go-parsing, and none of that is SAT solving.

I don't think vgo has these problems because vgo is built by the go team and can dictate far more, such as the use of a centralized repo, that all dependencies must use vgo, etc.

Re:The vgo proposal is accepted. Now what? by lobster_johnson on Wednesday May 30, 2018 @01:51AM (#17185389)
Thanks for the explanation!

The fact that dep parses import statements (as does Glide) is something I've never liked. It means that if you run "dep ensure --add" on something not yet imported, it will complain, and the next "ensure" will remove it. This is never in line with how I actually work. I need the dependencies before I can import them! There's no editor/IDE in existence that lets you autocomplete libraries that haven't been installed yet.

It also means that "dep ensure" parses my code to discover things not yet added to Gopkg.toml. That's upside down to me. I want it to parse its lockfile and nothing else; the lockfile is what should inform its decisions about what to install so that my code works, my code shouldn't be driving the lockfile! If I try to compile my code and it imports stuff that isn't in the lockfile, it should fail, and dep shouldn't try to "repair" itself with stuff that I didn't list as an explicit dependency.

I'm sure there are edge cases where the current behaviour can be considered rational, but I don't know what they are. As you point out, dep has to do a lot of work -- but why? Running "dep ensure" when the vendor directory is in perfect sync with the lockfile should take no time at all, and certainly shouldn't need to access the network. Yet it takes the same amount of time with or without a lockfile.

Re:The vgo proposal is accepted. Now what? by steveklabnik on Wednesday May 30, 2018 @02:24AM (#17185511)
Small note, this isn’t something that you’ve said, but since we’re comparing the two in this sub thread overall, Cargo doesn’t require a central registry either. You can pull straight from version control, and the lock file will even keep track of what HEAD is at the time, maintaining reproducibility. Or from the file system. Etc.

Thanks for your comments here, there’s a lot of stuff I wasn’t aware of. Very illuminating.

Re:The vgo proposal is accepted. Now what? by kibwen on Tuesday May 29, 2018 @11:39PM (#17184877)
That's quite weird. When I run `rm Cargo.lock && cargo generate-lockfile` on the Servo repo (test performed on the cheapest VPS that money can buy) it exits near-instantly (after first spending three seconds trying to git-fetch new versions of the dozen custom dependencies that live on Github rather than crates.io). For reference, here's what Servo's dependency graph looked like two years ago (July 2016): https://dirkjan.ochtman.nl/files/servo-graph.svg ; the number of transitive dependencies is quite large and yet the runtime of version selection is negligible.
Re:The vgo proposal is accepted. Now what? by TheDong on Wednesday May 30, 2018 @01:24AM (#17185288)
It's not strange at all for go.

Because third party go packages may not have a dep file, and because go programmers expect vendor directories to be minimal and not include unused imports, dep parses all of the go code of the project, and all the project's transitive dependencies.

It has to parse every .go file to find all 'import' statements, and it also has to find remote versions by making multiple network requests per dependency (typically 1 http-get + 1 git pull operation).

This is obviously going to be much slower than cargo where it's assumed every dependency is also using cargo and all needed information is present in metadata files... and there's one single fast api to download data from and cache (crates.io).

If cargo had to do the equivalent of `cargo check`-style parsing to find all 'extern crate' and 'use' statements before it could spit out a valid lock, and it couldn't use only 1 request to update all crates.io data, it would probably be closer to the speed of dep.

I think the speed difference is thus largely a result of go's lack of a central repository and lack of a unified packaging solution.

Re:The vgo proposal is accepted. Now what? by pcwalton on Wednesday May 30, 2018 @01:35AM (#17185333)
Thanks for the insight, that's very helpful. That would confirm what I suspected: it's not the core solving algorithm that's slow. Rather what's slow is building the graph in the first place.
Re:The vgo proposal is accepted. Now what? by kibwen on Wednesday May 30, 2018 @02:03AM (#17185440)
Yes, I had overlooked that Go probably doesn't have anything like the crates.io index (https://github.com/rust-lang/crates.io-index) to allow instant discovery of versioning metadata. And, AFAICT, even MVS would have the same problem here and would take the same time to resolve, since it still needs to access the network to fetch remote repos to discover versioning metadata; rather than pointing the finger at SAT solvers, it looks like vgo should be tackling Go's lack of a central package host (the vgo manifesto mentions "proxies", but it seems that those are just intended for solving the problem of persistent availability).
Re:The vgo proposal is accepted. Now what? by sethammons on Wednesday May 30, 2018 @08:08AM (#17187004)
We use Chef (Ruby). Cookbook version solving has been a repeatedly painful experience, occasionally never finding a solution. When this happens, you get to manually dig around and find the culprit.
Re:The vgo proposal is accepted. Now what? by majewsky on Wednesday May 30, 2018 @07:55AM (#17186938)
> The speed of the solver is not a problem in any other package management system I've seen.

The package manager in YaST (Suse Linux's sysadmin tool) was notorious for its slow solver (and slow everything-else, for that matter) around 2006, when I started using Linux. It improved a lot in the openSUSE 11.x series around 2007/8 when they switched from a homegrown solver to a standard SAT solver package.

Re:The vgo proposal is accepted. Now what? by TheSwordsman on Tuesday May 29, 2018 @07:58PM (#17183779)
I wish it was as simple as that. Instead it's that that Russ Cox is fundamentally against SAT solvers, and has opted take this alternative approach instead. I think they would have been better off iterating on the things that have worked for other languages and tools, and arguably a SAT solver is one of them.
Re:The vgo proposal is accepted. Now what? by jchw on Tuesday May 29, 2018 @08:29PM (#17183903)
I think Cargo-like is the direction things are headed even with vgo. In a way, though, I don't think the answer is that Go is "special," just that they wanted to explore the problem space of package management, dependencies, etc. in more detail before locking things down. It may have ended in a slightly weakened ecosystem temporarily, but I hope it helps to ensure that the semantics and behavior of Go's package management is level headed and simple. Hopefully, by Go 2, a lot of the common concerns with the Go programming language will be answered...
Re:The vgo proposal is accepted. Now what? by lobster_johnson on Tuesday May 29, 2018 @09:13PM (#17184187)
The vgo proposal explicitly rejects the "Cargo way" [1]. There's no lock file, and the MVS algorithm requires, as far as I recall, that the go.mod file is modified whenever the developer wants to update to a new version.

[1] https://research.swtch.com/vgo-repro

Re:The vgo proposal is accepted. Now what? by jchw on Wednesday May 30, 2018 @01:01AM (#17185196)
Indeed, but it does seem like a central repository is possibly the direction it's headed, or at least away from source repositories. Personally, I won't be too upset by MVS if it's one of the only deviations, though I do agree with Sam Boyer on the matter, who I actually had the pleasure of speaking with a bit ago.
Re:The vgo proposal is accepted. Now what? by steveklabnik on Wednesday May 30, 2018 @02:29AM (#17185525)
Cargo doesn’t require a central repository at all, to be clear.
Re:The vgo proposal is accepted. Now what? by dikaiosune on Wednesday May 30, 2018 @03:14AM (#17185726)
I'd actually be interested to find out how Cargo's performance compares in a situation as TheDong describes where all of the dependencies are being fetched directly from git.

Part of me wants to say "well of course Rust's tool is faster" but it would be interesting to see just how much crates.io acts as a performance optimization for running builds, installing deps, etc.

Re:The vgo proposal is accepted. Now what? by greysteil on Wednesday May 30, 2018 @05:08AM (#17186209)
Cargo performs dependency resolution, so fetching from git would (and does) significantly slow it down - it wound need to perform git operations to get the tags for each dependency (quick) and then checkout each tag to look for the subdependencies of that package at that version (slow).

Having a central registry is a must for package managers that perform version resolution and want to do so quickly, as it can serve them all the metadata they need to do that resolution.

Re:The vgo proposal is accepted. Now what? by steveklabnik on Wednesday May 30, 2018 @05:55AM (#17186397)
My perception is that the initial clone is slow, but that’s it. A detailed comparison with actual numbers would be interesting!

When you depend on a git dep, you can say if you want a particular branch, tag, rev, whatever. So it’s only a clone + checkout. From there you read the Cargo.toml, same as anything else. That’s my understanding anyway, it’s been a while since I poked at the guts.

Re:The vgo proposal is accepted. Now what? by greysteil on Wednesday May 30, 2018 @07:12AM (#17186697)
You’re totally right - I was thinking of Composer, which does flat resolution for git sources so has to go through the above. Cargo sidesteps that issue completely by taking the head commit or whatever’s asked for :-)
Re:The vgo proposal is accepted. Now what? by lobster_johnson on Tuesday May 29, 2018 @09:13PM (#17184192)
Cox discusses Cargo here, and why he doesn't like it: https://research.swtch.com/vgo-repro
Re:The vgo proposal is accepted. Now what? by Lazare on Wednesday May 30, 2018 @04:08AM (#17185952)
> The lock file stops future upgrades; once it is written, your build stays on serde 1.0.27 even when 1.0.28 is released. In contrast, minimal version selection prefers the minimum allowed version, which is the exact version requested by some go.mod in the project. That answer does not change as new versions are added.

So with Cargo, you get the exact version you want, ie 1.0.27, and it won't automatically update when a new version is added. And with MVS you get the exact version you want, and it won't automatically update when a new version is added? ...either I'm an idiot, or Cox is using the word "contrast" here to mean "identically".

> Those choices are stable, without a lock file. This is what I mean when I say that vgo's builds are reproducible by default.

Yes, but Cargo uses a lock file by default, meaning that Cargo's builds are reproducible by default too?

I'm open to the idea that vgo/MVS is delivering something amazing here, but every writeup I've seen so far seems to have a miraculous ability to make it sound like a re-branding of the same features every decent package manager has had forever.

Re:The vgo proposal is accepted. Now what? by sseth on Wednesday May 30, 2018 @09:15AM (#17187387)
The key here is that Cargo ignores the lock files of the dependency, while vgo uses the go.mod files of the dependency.

So, if project A uses B, which uses 1.0.27 of C, then the lock file for A is locked to that version of C. Suppose B now releases a version that was tested with 1.0.28 of C, A will continue to be built with the older version because of the lock file, while vgo would (correctly) start using the new version because of MVS.

Re:The vgo proposal is accepted. Now what? by Lazare on Wednesday May 30, 2018 @11:16PM (#17193702)
Umm. But we started with this:

> Those choices are stable, without a lock file. This is what I mean when I say that vgo's builds are reproducible by default.

You say:

> A will continue to be built with the older version because of the lock file, while vgo would (correctly) start using the new version because of MVS.

That seems to contradict Cox's assertion? If I get a newer version of C automatically when B updates, because I'm automatically getting a newer version of B, then I no longer have reproducible builds; the answer to what version of B I'm using would have "change[d] as new versions were added.", which is the thing Cox is saying vgo prevents.

But my understanding of vgo is that this is actually wrong; I don't get the new build automatically at all; I get it when I update using `vgo get -u`. Which is...the same as using Cargo (Composer, Bundler, Yarn, etc.) right? I eventually run the appropriate update command, the solver runs, and I get the new version of B and C.

Ultimately it feels like a dependency management tool can either lock me in to my current versions until I manually trigger an update to get bug fixes, or it can transparently update things in the background as new compatible versions are released.

I take Cox to be asserting that vgo does the former and Cargo does the latter, you seem to be asserting that vgo does the latter and Cargo does the former, and my understanding is both do the former. It feels like this shouldn't be this confusing to explain what vgo is trying to do. :)

Re:The vgo proposal is accepted. Now what? by sseth on Thursday May 31, 2018 @12:44AM (#17194016)
I was not clear. If you say vgo get B@latest in A, you will get the correct version of C. If you do not pull in the latest version of B, you would not get that.

The thing I like about this is that for many transitive dependencies such as C, i do not want the absolute latest version - i would prefer the version of C that B was tested with at time of release. I can override this of course, but this is the default behavior i like.

Re:The vgo proposal is accepted. Now what? by amluto on Wednesday May 30, 2018 @11:34AM (#17188517)
> while vgo would (correctly) start using the new version because of MVS.

I disagree with the “correctly” part. MVS seems to pick up a newer version mostly by accident. If you’re relying on a transitive dependency to trigger a security update, you are doing it very wrong.

Re:The vgo proposal is accepted. Now what? by vhbit on Tuesday May 29, 2018 @10:06PM (#17184463)
> The lock file stops future upgrades; once it is written, your build stays on serde 1.0.27 even when 1.0.28 is released.

That means that the only difference is that `vgo` doesn't require lock file for reproducible builds, now the question is what's considered so terrible wrong/dangerous with having a lock file?

Re:The vgo proposal is accepted. Now what? by iambvk on Wednesday May 30, 2018 @01:05AM (#17185209)
If there was a security fix in a package, MVS allows build infra to automatically upgrade (assuming packages imported are well maintained by their owners) where as lock-files require manual intervention.

Imagine the packaging and development ecosystem in internet scale.

Re:The vgo proposal is accepted. Now what? by kibwen on Wednesday May 30, 2018 @02:19AM (#17185492)
I'm not sure what this is asserting. There's no association between MVS and build infra. If you have a security fix to apply, you'd run `vgo get -u` to upgrade all your modules; systems like Cargo that use lockfiles would run `cargo upgrade`. This is just as automatic. In fact, vgo is less automatic here because systems like Cargo allow users to decide when they want certain upgrades automatically, which means that new downstream users can get the security fix even without needing to explicitly upgrade. And vgo also requires more manual intervention to upgrade than traditional build systems, because if the upgrade requires a major version bump then you also have to edit the import statements in your source files as well. vgo is both less automatic and requires more manual labor; that appears to be an intentional choice on behalf of the vgo manifesto.
Re:The vgo proposal is accepted. Now what? by iambvk on Wednesday May 30, 2018 @01:02PM (#17189410)
> if the upgrade requires a major version bump then you also have to edit the import statements in your source files as well

As per vgo blog posts, this scenario is not an Upgrade, but replacing one package with another package. A package is uniquely identified by it's import path, so if major version is changed, import path changes, so it is not same package.

Re:The vgo proposal is accepted. Now what? by eberkund on Tuesday May 29, 2018 @09:27PM (#17184277)
Thanks for posting this. It's much more fleshed out than my hazy memory of a GitHub comment although I still don't agree that all this effort it is worth the "simplification" of not having a lock file.
Re:The vgo proposal is accepted. Now what? by kibwen on Tuesday May 29, 2018 @10:01PM (#17184439)
The aversion to lockfiles is especially head-scratching given that vgo has a concept of a go.modverify file (separate from the go.mod file) which is used to store version hashes, which is a function that lockfiles usually fulfill. I think the advantage is supposed to be that modverify files are optional, but in practice I don't see why anybody wouldn't want one given that it provides additional security for free.
Re:The vgo proposal is accepted. Now what? by kaeshiwaza on Wednesday May 30, 2018 @03:00AM (#17185678)
I believe this video of rsc explain some concerns about the Cargo's approach and lock file issues https://www.youtube.com/watch?v=F8nrpe0XWRg
Re:The vgo proposal is accepted. Now what? by aviau on Tuesday May 29, 2018 @08:59PM (#17184094)
Yes, it has!

Russ Cox talks about this, amongst other things, in this talk: https://www.youtube.com/watch?v=F8nrpe0XWRg

I am sure there are written versions of this somewhere...

Re:The vgo proposal is accepted. Now what? by mseepgood on Wednesday May 30, 2018 @12:51AM (#17185151)
> I wish they had just copied Rust/Cargo

Cargo is really a suboptimal design. With vgo Go advances the state of the art of dependency management.