Cargo got some new tricks, but is it still correct!?

Relevant to the “general solver” discussion: Natalie Weizenbaum just posted an interesting write-up of PubGrub, a new version constraint solver used in the “pub” package manager for the Dart language. Notably it includes the ability to generate detailed error explanations, like:

Because dropdown >=2.0.0 depends on icons >=2.0.0 and root depends
  on icons <2.0.0, dropdown >=2.0.0 is forbidden.

And because menu >=1.1.0 depends on dropdown >=2.0.0, menu >=1.1.0
  is forbidden.

And because menu <1.1.0 depends on dropdown >=1.0.0 <2.0.0 which
  depends on intl <4.0.0, every version of menu requires intl
  <4.0.0.

So, because root depends on both menu >=1.0.0 and intl >=5.0.0,
  version solving failed.
4 Likes