Say I have written a piece of software (in R, for didactic purposes) which is following the Semantic Versioning Specification. This is the content of version 1.0.0 of the software:
funk <- function(x) {
jitter(x)
}
Which works so that
set.seed(1)
print(funk(0))
yields
[1] -0.009379653
Now suppose I change my function to this:
funk <- function(x) {
unrelated_random_stuff <- sample(1:10)
jitter(x)
}
And now, set.seed(1); print(funk(0))
yields
[1] -0.01176102
According to SemVer, does this constitute a major change? I.e., if I publish the software with these changes, should it be 2.0.0? I'm inclined to think so, since this technically changes results from scripts based on version 1.0.0, but I am not sure this qualifies as "breaking backwards compatibility" since we're talking about randomly-generated numbers.
question from:
https://stackoverflow.com/questions/65932969/semver-do-different-results-for-the-same-seed-warrant-a-major-change 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…