However, when you upgrade a dependency, it's still possible that you're using a particular combination of library versions that have never been tested before.
Some incompatibilities can be prevented by looking at version constraints. But you're not left with no error detection if the package system fails to detect an incompatibility; in the end, what matters is that the code compiles and the tests pass.