-
Notifications
You must be signed in to change notification settings - Fork 16
/
versioning.theory.txt
89 lines (74 loc) · 5.36 KB
/
versioning.theory.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
┏━━━━━━━━━━━━━━━━┓
┃ VERSIONING ┃
┗━━━━━━━━━━━━━━━━┛
┌──────────────┐
│ PROBLEMS │
└──────────────┘
DEPENDENCY HELL ==> #Generic word for poor installability
MANUAL RESOLUTION ==> #When user must install each level of the dependency chain manually
#Solution: package manager
CONFLICTING DEPENDENCIES ==> #When two dependencies depend on two different versions of same dependency
#Also called "diamond dependency"
#Solutions:
# - looser versions requirement (e.g. using ^ or ~ with npm) (opposite is "version lock")
# - allowing dependencies to have different copies of same dependency (e.g. what npm does)
CIRCULAR DEPENDENCIES ==> #Two circular dependencies must be upgraded at same time, because each requires a newer version
#of the other.
#Solution: separating download step and run step
VERSION PROMISCUITY ==> #Upgrading a dependencies introduces breaking changes.
#Solution: versioning scheme
LOTS OF DEPENDENCIES ==> #Makes installation slow
#Also:
# - requires lots of memory
# - less portable
# - more prone to security vulnerability
# - more complex
#Solution: breaking down system into smaller modules
┌────────────┐
│ SCHEME │
└────────────┘
VERSIONING SCHEME ==> #Should be advertised
SEMVER ==> #Semantic versioning (2.0.0)
#A.B.C[-D][+E]:
# - A: major version, i.e. backward-incompatible changes
# - B: minor version, i.e. backward-compatible new features or deprecation
# - C: patch version, i.e. backward-compatible bugfixes
# - also called revision|bugfix number
# - D: pre-release tag
# - [[:alnum:]-]....
# - E: build information:
# - [[:alnum:]-]....
# - often [BUILD_NUMBER][.METADATA][.OPTIONS][PLATFORM]
#If A is 0:
# - considered unstable
# - breaking changes can be introduced by B
#Precedence (version ordering):
# - each dot-separated part, left-to-right
# - D:
# - A.B.C-D < A.B.C
# - broken down into dot-separated parts, compared left-to-right
# - numbers (compared numerically) < non-numbers (compared lexically, longer is higher)
# - E: ignored, i.e. A.B.C+E === A.B.C
#Also:
# - numbers are incremented from 0
# - but lowest version is 0.1.0
# - no leading zero
# - no releasing same version twice
# - including when a new release is done because previous one did not respect semver
#Alternative writing (non-semver): A:B.C...
TIMESTAMP ==> #E.g. 20120302, or Ubuntu 11.10
#Easier to create
#Good when releases are scheduled
WORDS ==> #Better for non-technical users. More marketing
┌────────────┐
│ STAGES │
└────────────┘
PRE-RELEASE ==> #Stages:
# - pre-alpha: before implementation (e.g. research)
# - alpha (a*): start testing
# - beta (b*): major bugs fixed
# - release candidates (rc): most bugs fixed
# - release to manufacturing (RTM): can be deployed
# - canary: deployed to small number of end-users
# - production / general availability (GA): deployed to all
# - end-of-life: will retire