I'm writing a C++ library, and
according to this site here: http://semver.org/,
I should increment the MAJOR version when I make incompatible API changes.
Is changing the name of a namespace considered an incompatible change in the API? I'm not quite sure. I don't know whether I should increment the MAJOR or MINOR version number.
1 Answer 1
(pasted from my comment)
When a dev updates to the new version of your library – can he compile his own code without any changes? If yes, you have a minor change.
But if he does have to update the code – e.g. using your_namespace;
or new your_namespace::foo()
– then this is a major, incompatible change, which should be denoted by incrementing the major version number.
An interesting way around such problems is to not only version your library but also the API itself. This way, a newer library version can also be used under an old interface – which does not offer the newer features.
Explore related questions
See similar questions with these tags.
using your_namespace;
ornew your_namespace::foo()
– then this is a major, incompatible change, which should be denoted by incrementing the major version number.