Skip to content

Commit 64a81e7

Browse files
committed
Change title
Change title of the guide. Update FAQ. Light changes in the text.
1 parent 7d5f278 commit 64a81e7

File tree

1 file changed

+28
-86
lines changed

1 file changed

+28
-86
lines changed

libver.md

Lines changed: 28 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
Library Versioning 0
2-
====================
1+
3D Library Versioning 1
2+
=======================
33

44
Summary
55
-------
66

77
Given a version number MAJOR.MINOR.PATCH, increment the:
88

9-
1. MAJOR version when you make source incompatible API changes or
10-
start new generation of the library,
9+
1. MAJOR version when you make source incompatible API changes,
1110
1. MINOR version when you add functionality that preserves source
1211
compatibility (binary compatibility may be broken), and
1312
1. PATCH version when you make bug fixes guaranteed both binary and source
@@ -47,13 +46,13 @@ change that fixes incorrect behavior.
4746
If binary compatibility is broken by the patch then minor
4847
version MUST be incremeted (see the next item). The current version (before
4948
'fix') MUST remain the last in the x.y-branch. For example: there is
50-
version 1.2.43 and a bug fix does not break binary compatibility so
51-
new version is 1.2.44, i.e. 1.2.43 -> 1.2.44.
49+
the version 1.2.43 and a bug fix does not break binary compatibility so
50+
the new version is 1.2.44, i.e. 1.2.43 -> 1.2.44.
5251
If a bug fix breakes binary compatibility then the new version MUST be 1.3.0
53-
and after that 'fix' there MUST NOT exist 1.2.44.
52+
and after that 'fix' there MUST NOT exist 1.2.44, 1.2.45 and so on.
5453

55-
1. Minor version Y (x.Y.z) MUST be incremented if new, backwards
56-
compatible functionality is introduced to the public API. The changes MUST
54+
1. Minor version Y (x.Y.z) MUST be incremented if new
55+
functionality is introduced to the public API. The changes MUST
5756
NOT break source compatibility. The changes MAY break binary compatibility.
5857
It MUST be incremented if any public API
5958
functionality is marked as deprecated. It MAY be incremented if substantial
@@ -64,7 +63,7 @@ If source compatibility is broken by the minor changes then major
6463
version MUST be incremeted (see the next item). The current version (before
6564
the changes) MUST remain the last in the x-branch.
6665
For instance: 1.5.6 -> 1.6.0 --- source compatibility saved,
67-
1.5.6 -> 2.0.0 --- source compatibility broken (1.5.7, 1.5.8 and so
66+
1.5.6 -> 2.0.0 --- source compatibility broken (1.5.7, 1.5.8 and so on
6867
MUST NOT exist).
6968

7069
1. Major version X (X.y.z) MUST be incremented if any
@@ -74,92 +73,35 @@ be reset to 0 when major version is incremented. For instance:
7473
2.6.73 -> 3.0.0.
7574

7675
1. Version MUST NOT contain any other information (build, date,
77-
configurations, names, etc). Any such information MUST BE included
78-
directly to the library as specific functions/methods and
79-
duplicated in ChangeLogs/READMEs/etc.
76+
configurations, names, etc). Any such information MUST BE provided
77+
directly by the library as specific interface(s) and
78+
documented in ChangeLogs/READMEs/etc.
8079

8180
FAQ
8281
---
8382

84-
### How should I deal with revisions in the 0.y.z initial development phase?
83+
### What does '3D' in the name mean?
8584

86-
The simplest thing to do is start your initial development release at 0.1.0
87-
and then increment the minor version for each subsequent release.
85+
It means three digits or decimals. Actually title of
86+
the guide should be read as 'how to version a library
87+
with three digits/decimals?'.
8888

89-
### How do I know when to release 1.0.0?
89+
### Therefore may there exist '2D', '4D', ... patterns of versioning?
9090

91-
If your software is being used in production, it should probably already be
92-
1.0.0. If you have a stable API on which users have come to depend, you should
93-
be 1.0.0. If you're worrying a lot about backwards compatibility, you should
94-
probably already be 1.0.0.
91+
To tell the truth, yes.
9592

96-
### Doesn't this discourage rapid development and fast iteration?
93+
But at first let's consider versioning with one or two digits.
94+
For shared libraries of compiled languages there are at least
95+
two the most important issues: API (source compatibility) and
96+
ABI (binary compatibility). To reflect changes
97+
in API/ABI of a library two digits are required. Also
98+
a developer needs to version bugfixes of a library.
99+
Therefore, three decimals are the minimum possible count of
100+
decimals to version a library.
97101

98-
Major version zero is all about rapid development. If you're changing the API
99-
every day you should either still be in version 0.y.z or on a separate
100-
development branch working on the next major version.
102+
TODO about '4d' and so on.
101103

102-
### If even the tiniest backwards incompatible changes to the public API require a major version bump, won't I end up at version 42.0.0 very rapidly?
103-
104-
This is a question of responsible development and foresight. Incompatible
105-
changes should not be introduced lightly to software that has a lot of
106-
dependent code. The cost that must be incurred to upgrade can be significant.
107-
Having to bump major versions to release incompatible changes means you'll
108-
think through the impact of your changes, and evaluate the cost/benefit ratio
109-
involved.
110-
111-
### Documenting the entire public API is too much work!
112-
113-
It is your responsibility as a professional developer to properly document
114-
software that is intended for use by others. Managing software complexity is a
115-
hugely important part of keeping a project efficient, and that's hard to do if
116-
nobody knows how to use your software, or what methods are safe to call. In
117-
the long run, Semantic Versioning, and the insistence on a well defined public
118-
API can keep everyone and everything running smoothly.
119-
120-
### What do I do if I accidentally release a backwards incompatible change as a minor version?
121-
122-
As soon as you realize that you've broken the Semantic Versioning spec, fix
123-
the problem and release a new minor version that corrects the problem and
124-
restores backwards compatibility. Even under this circumstance, it is
125-
unacceptable to modify versioned releases. If it's appropriate,
126-
document the offending version and inform your users of the problem so that
127-
they are aware of the offending version.
128-
129-
### What should I do if I update my own dependencies without changing the public API?
130-
131-
That would be considered compatible since it does not affect the public API.
132-
Software that explicitly depends on the same dependencies as your package
133-
should have their own dependency specifications and the author will notice any
134-
conflicts. Determining whether the change is a patch level or minor level
135-
modification depends on whether you updated your dependencies in order to fix
136-
a bug or introduce new functionality. I would usually expect additional code
137-
for the latter instance, in which case it's obviously a minor level increment.
138-
139-
### What if I inadvertently alter the public API in a way that is not compliant with the version number change (i.e. the code incorrectly introduces a major breaking change in a patch release)
140-
141-
Use your best judgment. If you have a huge audience that will be drastically
142-
impacted by changing the behavior back to what the public API intended, then
143-
it may be best to perform a major version release, even though the fix could
144-
strictly be considered a patch release. Remember, Semantic Versioning is all
145-
about conveying meaning by how the version number changes. If these changes
146-
are important to your users, use the version number to inform them.
147-
148-
### How should I handle deprecating functionality?
149-
150-
Deprecating existing functionality is a normal part of software development and
151-
is often required to make forward progress. When you deprecate part of your
152-
public API, you should do two things: (1) update your documentation to let
153-
users know about the change, (2) issue a new minor release with the deprecation
154-
in place. Before you completely remove the functionality in a new major release
155-
there should be at least one minor release that contains the deprecation so
156-
that users can smoothly transition to the new API.
157-
158-
### Is there any size limit on the version string?
159-
160-
No, but use good judgment. A 255 character version string is probably overkill,
161-
for example. Also, specific systems may impose their own limits on the size of
162-
the string.
104+
See also original FAQ at http://semver.org
163105

164106
About
165107
-----

0 commit comments

Comments
 (0)