Remove recommendation to use @JvmOverloads to preserve binary compatibility
#46
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've updated the api-guidelines-backward-compatibility.md doc to clarify that manual overloads should be used to maintain binary compatibility and I replaced the recommendation about using
@JvmOverloadswith a caution statement.The current documentation's statements about using
@JvmOverloadsto maintain binary compatibility are incorrect. The example given was also flawed, binary compatibility will be preserved when going from no default parameters to adding the first default parameter to the end of the signature, but if a second default parameter is added then binary compatibility will break.I tried to clarify in my proposed changes why this breaks binary compatibility. There's a KEEP proposal for an
@IntroducedAtannotation that will address these problems, and the proposal itself provides some more explanation of the binary compatibility problem.