Best way to avoid this problem in my experience is to use something that'll cache dependencies so that you're building as few new packages as possible when checking something out. Historically people have used their user package-dbs or sandboxes (just package-dbs you put in a place), but there's nothing done to ensure versions won't start conflicting as the arrow of time plunges forward.
To that end, I think Stack[1] is pretty useful as you can pick a default (global to you) user snapshot and everything the snapshot covers will have a set of versions that work with everything else. This doesn't cover absolutely everything on Hackage but it should save a lot of build time if you're going on a library perambulation.
There's no reason, in principle, that you couldn't accomplish the same with careful tending of a package-db yourself, but in practice nobody knows or cares to know how anything works so its best to just give them something they can outsource their executive functions to WRT package versioning.