I am working on an application which works with an old version of a dependency. Due to a recent change request, there is a need to update to a newer version.

I have the option of not upgrading to the latest version and only upgrading to an intermediate version because the required functionality is available in the intermediate version(if I upgrade to the latest version, the change will be much bigger). What approach should I take in this scenario? Should I upgrade to the latest version or to the intermediate version? And if I upgrade to an intermediate version, should I upgrade to the maximum version that is compatible with the codebase or to the minimum version that has the functionality I need?

To add more context, the library is Apache POI. The application depends on 3.10.1, and the latest is 3.14. Although the version change is a minor version change, due to some refactoring (classes moved/renamed) the changes are not backward compatible.

closed as too broad by gnat, Daenyth, Robert Harvey, user22815, user40980 Mar 6 '16 at 14:25

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Whatever you do, test it. – user22815 Mar 5 '16 at 20:43

I would generally advise you to keep your dependencies up-to-date.

From my own experience there comes a point where you WILL need a new version of an external dependency. Sometimes you run into a bug, sometimes it's performance, and in some cases you need (or want) features from the newer version for your application. There are plenty of reasons why you will at some point have to migrate to a newer version.

If you have neglected to keep up with them up to that point, you face having to deal with a lot of (potentially) breaking changes. It is much easier to go through release notes or changelists going from the previous release to the newest release, instead of having to work your way through three or four previous releases worth of features and bugfixes and potentially breaking changes.

External dependencies should have some kind of automated testing performed on them by your application so you can be sure nothing in your application breaks. Having these tests reduces the pain with keeping up with your dependencies.

The only exception to this will probably be applications that are not actively being developed anymore. But as long as code is being written for an application, dependencies should be kept up-to-date.

Not the answer you're looking for? Browse other questions tagged or ask your own question.