Skip to content

Commit c73221b

Browse files
committed
clarify semver on definition change
1 parent 6d0d064 commit c73221b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

text/0000-safety-tags.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,13 @@ Note that discharing a tag that is not defined will raise a hard error.
268268
Tags constitute a public API; therefore, any alteration to their definition must be evaluated
269269
against [Semantic Versioning][semver].
270270
* Adding a tag definition is a **major** change, because new tag is missing.
271-
* Removing a tag definition is a **major** change, because the tag doesn't exist.
271+
* Removing a tag definition is a **minor** change. The tag doesn't exist anymore, and discharing
272+
an undefined tag just emits a warning-by-default diagnostic.
273+
* Changing the definition of a tag in a way that *requires more*, is a **major** change, because
274+
callsites only checked the weaker requirement for this tag. However, it's strongly discouraged to
275+
change the tag in such way, as newly added requirements may blindly discharged by callsites.
276+
* Changing the definition of a tag in an *equivalent* or in a way that *requires less* (the old tag
277+
implies the new tag), is a **minor** change.
272278
* Renaming a tag definition is a **major** change, because it's the result of removal and addition.
273279

274280
[semver]: https://doc.rust-lang.org/cargo/reference/semver.html

0 commit comments

Comments
 (0)