News for hackers. Stuff that matters.
Re:Version SAT by munificent on Tuesday December 13, 2016 @01:57PM (#13169580)
> Dart’s pub includes a simple backtracking solver that often takes a long time.

I'll note two things:

1. The backtracking solver isn't that simple. It's got a handful of pretty smart heuristics that we've added over time to help it get stuck.

2. It doesn't get stuck very often. It does happen. In particular, our ecosystem has one package that is very heavily depended on and also frequently ships breaking changes, which is always a recipe for version solver pain.

But pub works fine for probably >99% of invocations of it. Installing dependencies is a gating issue for getting any work done, so if pub was getting stuck often, users would be screaming at us.

Also, Natalie, the other half of the pub team, put together a comparable proof of version solving being equivalent to 3-SAT a year or two ago, but I can't seem to find it now.

Personally, I think the idea of treating breaking versions of packages as distinct and allowing them to co-exist is interesting but I worry about the usability impact of it. It will be very confusing for users if objects flow between those two packages and you get type errors like "Expected type Foo but got Foo." Good error messages can help a lot, though.

Re:Version SAT by rsc on Friday December 16, 2016 @04:05PM (#13196839)
Hi Bob, Agree about "simple" being a bad choice of name. What I meant is that it's not one of the crazy souped up SAT solving algorithms directly. I'll drop "simple".

FWIW we've seen those kinds of type errors in Go already with vendoring, which lets you have multiple copies of the same package. Good errors are essential (and we only get them half right).

Thanks.

Re:Version SAT by wfunction on Tuesday December 13, 2016 @04:16PM (#13171114)
> It's got a handful of pretty smart heuristics that we've added over time to help it get stuck.

I assume you mean NOT get stuck? Or do you mean something else like settling on a solution?

Re:Version SAT by munificent on Tuesday December 13, 2016 @04:42PM (#13171358)
Heh, oops, yes. Help it find a solution. :)

Leaving my mistake to bear my shame publicly.