Description
Describe the bug
The document "Backwards Compatibility Requirements for Jakarta EE Specifications" is ambiguous wrt to deprecation and removal of features:
-
In Chapter 6 it allows deprecation and removal:
A specification project may decide to designate a method or interface as being “deprecated” when its use is no longer recommended or when the specification project considers that a different interface or method should be used instead. This can be stated in the specification and in the relevant javadoc.
-
In the FAQ it forbids deprecation and removal:
Q2. Is it permissible to remove an existing interface from an existing specification?
No, because this would violate rules 2 and 3 above. Note that it is also not permissible to mark it as deprecated.Q4. Is it permissible to remove an existing method from an existing interface?
No, because this would violates rules 2 and 3 above.
As a result, (at least) the Jakarta REST committers and the Jakarta JSON-B committers need urgently a decision if they MAY or MAY NOT deprecate and / or remove features in their next major release. Both teams currently plan / discuss deprecations / removals and are stuck without an official clarification of this question.
Expected behavior
The document shall unambiguously clarify in what cases / under what conditions deprecation and removal are allowed, or clearly say that it is never allowed to deprecate / remove features.
Proposal
What many people told me what they expect is to align our rules with SemVer.
This could be achieved by an agreement like this:
- Removal or incompatible change of features may ONLY happen in MAJOR releases, and only if the previous major or minor release deprecated that feature.
@deprecate(forRemoval = true) MUST be used for removal, as the application programmer MUST have a clear and unambiguous warning regarding the upcoming removal. - Compatible change of features, and addition of features, may ONLY happen in MINOR and MAJOR releases.
@deprecate(forRemoval = false) MAY be used (as there is no essential need to forbid it), but SHOULD NOT get used (as it is noisy). - As a result, PATCH releases MUST NOT add, change, deprecate or remove features.