I'm trying to adopt a version control system for a python package I'm working on (I'm very new to these systems), and I have been reading up on semantic versioning. I like the system a lot, but there are situations in which I have some second thoughts, particularly for something like this:
Suppose (silly example) our v0.1.0 package has a class Bob
with several methods:
class Bob:
def __init__(self, age, coolness):
self.age = age
self.coolness = coolness
def says_hi(self):
return "Hi!"
def says_bye(self):
return "Bye!"
Say we add the following extremely simple method:
def says_good_day(self):
return "Good day!"
... and now an extremely complex method:
def explains_the_meaning_of_life(self):
... # bob explains it here
By the semantic versioning rules, any backwards compatible addition should increment the minor version by 1. As such, if we implemented these two methods separately, we'd have incremented to v0.3.0 by now. But I find it unusual that we would assign the same "weight" to these two backwards compatible additions, despite the fact that one is extremely simple and one extremely complex. Could you justify assigning the first addition as a patch update and the second as a minor update? Am I misunderstanding the point of semantic versioning by even considering "complicated" versus "simple" additions, i.e. an addition is just an addition?
question from:
https://stackoverflow.com/questions/65893311/could-a-patch-include-an-addition-in-semver 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…