Skip to content
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

Created koin-decompose module #2062

Open
wants to merge 5 commits into
base: 4.1.0
Choose a base branch
from

Conversation

idfinance-oss
Copy link

No description provided.

@arnaudgiuliani
Copy link
Member

Interesting. Do you have a minimal sample app you add in ./example?

@SergeiMikhailovskii
Copy link

@arnaudgiuliani hi! tried to add but it seems to be pretty hard since the module is not published. it's located in the other Gradle project (projects vs examples), so to add it I have to add a big amount of boilerplate code just to build the project. maybe there's a way to publish a snapshot of the module? it would make the work much easier I suppose

@arnaudgiuliani arnaudgiuliani changed the base branch from main to 4.1.0 January 9, 2025 17:40
@arnaudgiuliani
Copy link
Member

can you add documentation on your classes?

@SergeiMikhailovskii
Copy link

@arnaudgiuliani done

@arnaudgiuliani
Copy link
Member

We could tag @KoinExperimentalApi time to get some feedback from other users. Also to help come back on some API if needed

/**
* Decompose Component that can handle a Koin Scope
*/
interface DecomposeScopeComponent : KoinScopeComponent, ComponentContext {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tag it as experimental with @KoinExperimentalApi

/**
* Provide scope tied to Component
*/
fun DecomposeScopeComponent.componentScope() = lazy { createComponentScope() }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tag it as experimental with @KoinExperimentalApi

* Create Scope for Component.
* Doesn't link to parent component's Scope
*/
fun DecomposeScopeComponent.createComponentScope() =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tag it as experimental with @KoinExperimentalApi

@arnaudgiuliani
Copy link
Member

do you have a demo/sample application with such API somewhere?

@SergeiMikhailovskii
Copy link

is it ok if I'll create the sample with the copy of the module inside?

@arnaudgiuliani
Copy link
Member

can be something we put as getting-started example also. Depends how complex is it. But then if it's core repo, we will need to maintain it over versions

@SergeiMikhailovskii
Copy link

ok, I suggest the following plan - I'll create the separate repository with the example and module implementation inside. after the koin-decompose module will be published I'll create the PR inside the core repo and use the remote artefact. is this plan ok for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants