-
Notifications
You must be signed in to change notification settings - Fork 51
MP-5395 in between interface #976
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Suppose an interface in the plugin that extends an an IDE interface that has a default method using internal type. This interface, even if not implemented will have a generated `DefaultImpls`, that uses this internal type. With this change the plugin verifier will ignore such cases.
The previous implementation incorrectly assumed all arguments were references. This change handles arguments that are primitives. Also reduced allocation by initializing the opcode arrays once.
...r/verifier-core/src/main/java/com/jetbrains/pluginverifier/verifiers/method/KotlinMethods.kt
Outdated
Show resolved
Hide resolved
...r/verifier-core/src/main/java/com/jetbrains/pluginverifier/verifiers/method/KotlinMethods.kt
Outdated
Show resolved
Hide resolved
|
Test are failing locally also for a reason that escapes me at this time. But locally I have the same test failing with this output. |
|
@udalov I think I understand why there's verification failure about missing The intellij-plugin-verifier/intellij-plugin-verifier/verifier-test/mock-plugin/build.gradle.kts Lines 3 to 10 in 4f92570
But since Kotlin is part of the platform should this check be skipped (as I tried here 85f2ce7) ?
intellij-plugin-verifier/intellij-plugin-verifier/verifier-test/build.gradle.kts Lines 13 to 18 in 4f92570
|

@LChernigovskaya @udalov Here's the followup to #885
In particular for this #885 (comment)
Reference : MP-5395
Now when an interface in a plugin extends an interface of the platform that has a default method using an internal type. And that plugin interface is compiled, that interface will be generated with a
DefaultImplsthat will "forward" the call to theDefaultImplsof this parent interface.classDiagram PlatformInterface <|-- PluginInterface class PlatformInterface{ void defaultUsingInternalType(InternalType) } class PlatformInterfaceDefaultImpls{ void defaultUsingInternalType(InternalType) } class PluginInterface { } class PluginInterfaceDefaultImpls{ static void defaultUsingInternalType(InternalType) }Ignore the missing
$in the schema above as mermaid don't like them in the class names.An interesting bit is the
PluginInterface$DefaultImplsgenerated by Kotlin is an inner class of bothPlatformInterfacePluginInterfaceIn this case the method forwarder is different as it is a static method in this case.
Also the previous implementation only handled parameters that were references, this limitation is now lifted.