Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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.

share|improve this question
    
What else did you change? How does it affect the users (other devs/projects) of whatever you are doing there? –  JensG Nov 17 '13 at 9:25
2  
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. –  amon Nov 17 '13 at 11:12

1 Answer 1

up vote 5 down vote accepted

(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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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