JvmDefault: remove -Xjvm-default modes "enable" and "compatibility"

#KT-54746
This commit is contained in:
Alexander Udalov
2023-04-22 00:28:51 +02:00
committed by Space Team
parent e0b5ae7781
commit a0790047f7
4 changed files with 16 additions and 23 deletions
+2 -7
View File
@@ -56,7 +56,7 @@ where advanced options include:
* ignore
* strict (experimental; treat as other supported nullability annotations)
* warn (report a warning)
-Xjvm-default={all|all-compatibility|disable|enable|compatibility}
-Xjvm-default={all|all-compatibility|disable}
Emit JVM default methods for interface declarations with bodies. Default is 'disable'.
-Xjvm-default=all Generate JVM default methods for all interface declarations with bodies in the module.
Do not generate DefaultImpls stubs for interface declarations with bodies, which are generated by default
@@ -64,7 +64,6 @@ where advanced options include:
mode and doesn't override it, then a DefaultImpls stub will be generated for it.
BREAKS BINARY COMPATIBILITY if some client code relies on the presence of DefaultImpls classes.
Note that if interface delegation is used, all interface methods are delegated.
The only exception are methods annotated with the deprecated @JvmDefault annotation.
-Xjvm-default=all-compatibility In addition to the 'all' mode, generate compatibility stubs in the DefaultImpls classes.
Compatibility stubs could be useful for library and runtime authors to keep backward binary compatibility
for existing clients compiled against previous library versions.
@@ -77,11 +76,7 @@ where advanced options include:
additional implicit method with specialized signatures was generated in the 'disable' mode:
unlike in the 'disable' mode, the compiler will report an error if such method is not overridden explicitly
and the class is not annotated with @JvmDefaultWithoutCompatibility (see KT-39603 for more details).
-Xjvm-default=disable Default behavior. Do not generate JVM default methods and prohibit @JvmDefault annotation usage.
-Xjvm-default=enable Deprecated. Allow usages of @JvmDefault; only generate the default method for annotated method
in the interface (annotating an existing method can break binary compatibility).
-Xjvm-default=compatibility Deprecated. Allow usages of @JvmDefault; generate a compatibility accessor
in the DefaultImpls class in addition to the default interface method.
-Xjvm-default=disable Default behavior. Do not generate JVM default methods.
-Xklib=<path> Paths to cross-platform libraries in .klib format
-Xlambdas={class|indy} Select code generation scheme for lambdas.
-Xlambdas=indy Generate lambdas using `invokedynamic` with `LambdaMetafactory.metafactory`. Requires `-jvm-target 1.8` or greater.