Open
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.
udalov
reviewed
Jul 24, 2023
...r/verifier-core/src/main/java/com/jetbrains/pluginverifier/verifiers/method/KotlinMethods.kt
Outdated
Show resolved
Hide resolved
udalov
reviewed
Jul 24, 2023
...r/verifier-core/src/main/java/com/jetbrains/pluginverifier/verifiers/method/KotlinMethods.kt
Outdated
Show resolved
Hide resolved
Contributor
Author
|
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. |
Contributor
Author
|
@udalov I think I understand why there's verification failure about missing The But since Kotlin is part of the platform should this check be skipped (as I tried here 85f2ce7) ?
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

@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.