Skip to content

KON-655 Update parent references#1486

Merged
igorwojda merged 43 commits intodevelopfrom
KON-655-update-parent-references
Oct 31, 2024
Merged

KON-655 Update parent references#1486
igorwojda merged 43 commits intodevelopfrom
KON-655-update-parent-references

Conversation

@nataliapeterwas
Copy link
Contributor

@nataliapeterwas nataliapeterwas commented Oct 25, 2024

  1. Change parents structure - similar to type structure:
    1.1 parent returns use site, eg. with arguments, type arguments etc. We can check annotations, arguments, type arguments...
    1.2 sourceDeclaration is always reference to the declaration site

  2. Before we had only KoDelegateProvider with was implemented by KoPropertyDeclaration and KoVariableDeclaration.
    After we have more granular interfaces:

    • KoPropertyDelegateProvider for KoPropertyDeclaration and KoVariableDeclaration, eg. by lazy {}
    • KoInterfaceDelegateProvider for KoParentDeclaration, eg.
    interface SampleSuperInterface
    
    class SampleClass(sampleProperty: SampleSuperInterface) : SampleSuperInterface by sampleProperty

@nataliapeterwas nataliapeterwas added breaking-api-change Breaks existing API improvement nhancements to existing features or code labels Oct 25, 2024
@jira-ticket-bot
Copy link

…der-into-one-kodeclarationcastprovider' into KON-655-update-parent-references
…ent-references

# Conflicts:
#	lib/src/integrationTest/kotlin/com/lemonappdev/konsist/core/declaration/koparent/snippet/forgeneral/class-with-external-parent-class.kttest
#	lib/src/integrationTest/kotlin/com/lemonappdev/konsist/core/declaration/koparent/snippet/forgeneral/class-with-parent-interface-from-import.kttest
#	lib/src/integrationTest/kotlin/com/lemonappdev/konsist/core/declaration/koparent/snippet/forgeneral/object-with-external-parent-class.kttest
#	lib/src/integrationTest/kotlin/com/lemonappdev/konsist/core/declaration/koparent/snippet/forkoannotationprovider/class-with-external-parent-class-without-annotation.kttest
#	lib/src/integrationTest/kotlin/com/lemonappdev/konsist/core/declaration/kotypeargument/KoTypeArgumentDeclarationForKoDeclarationCastProviderTest.kt
#	lib/src/integrationTest/kotlin/com/lemonappdev/konsist/core/declaration/type/kotype/KoTypeDeclarationForKoDeclarationCastProviderTest.kt
#	lib/src/integrationTest/kotlin/com/lemonappdev/konsist/core/declaration/type/kotype/snippet/forkodeclarationcastprovider/not-nullable-generic-type.kttest
#	lib/src/integrationTest/kotlin/com/lemonappdev/konsist/core/declaration/type/kotype/snippet/forkodeclarationcastprovider/nullable-generic-type.kttest
@nataliapeterwas nataliapeterwas marked this pull request as ready for review October 30, 2024 20:24
@igorwojda igorwojda merged commit 4c933c7 into develop Oct 31, 2024
@igorwojda igorwojda deleted the KON-655-update-parent-references branch October 31, 2024 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-api-change Breaks existing API improvement nhancements to existing features or code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants