Pergunta

The project that I am currently working on is using a library (well, sort of a library, it self-describes as a toolkit, Geant4), that is several versions out of date.

As there are bugs in it, that have been fixed in newer versions, its likely that it will be updated. I may not be asked to do it, but if I am, what's the best strategy, should an update be done all in one leap, or is it better to move forward one version at a time?

A single leap might go quicker, but then again the patch notes only document a step at a time. Is one less likely to get into trouble with incremental updates?

(if you feel that 'library' is the wrong term, feel free to edit)

Foi útil?

Solução

Small steps are usually useless in this kind of situation. More often than not, the real trouble (if there is any) stems from one particular change that causes you a lot of trouble, not from the accumulation of insignificant changes.

Therefore, doing things step by step will just take you longer to get to the critical point, and leave you less time to deal with it. A middling-large version step at infrequent intervals is usually faster than either tracking everything, or waiting until you no longe runderstand the API.

Outras dicas

It depends if you have persistent state like a database or runtime configuration, and if you care about retaining that state. If you do, it's best to do the upgrade in steps, because this is how the developers test and support upgrades. Occasionally, developers will also support larger upgrades. Ubuntu's LTS versions are a good example.

If you don't have any state you care to retain, and you're already several versions behind, a "big leap" upgrade is usually cleanest, because the library developers have fixed bugs they introduced and improved interfaces they created in minor versions, but keep in mind that the longer you put it off, the more incompatibilities there will be in your client code. If you make the big upgrade and all of a sudden have a ton of bugs, you may want to back it out and do it incrementally.

Small steps will probably cost you more than one large jump.

Remember that for each upgrade of the library, you must perform regression testing (which is never cheap) in addition to relearning the API, and hunting down and fixing all the bugs that may pop up. Contrast this with doing one big jump. Regression testing, API familiarity and bug fixing are still there for the big jump but you do it once instead of twice or more.

Licenciado em: CC-BY-SA com atribuição
scroll top