Skip to content

Fix issue where binds = [] has no effect#313

Closed
mori-atsushi wants to merge 1 commit intoInsertKoinIO:2.3.0from
mori-atsushi:fix/binds
Closed

Fix issue where binds = [] has no effect#313
mori-atsushi wants to merge 1 commit intoInsertKoinIO:2.3.0from
mori-atsushi:fix/binds

Conversation

@mori-atsushi
Copy link
Copy Markdown

@Single(binds = []) and @Factory(binds = []) are expected to clear all bindings,
but currently, all supertypes are still registered.

To resolve this, remove the isNotEmpty() check from the forceDeclaredBindings condition
so that an empty binds array works as intended.

Remove isNotEmpty() check from forceDeclaredBindings condition to allow
binds=[] to work as intended. Previously, empty binds array was treated
as default binding due to the isEmpty check, preventing users from
explicitly disabling bindings.
@mori-atsushi mori-atsushi changed the base branch from 2.2.0 to 2.3.0 October 24, 2025 00:48
@stale
Copy link
Copy Markdown

stale Bot commented Mar 23, 2026

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the status:wontfix This will not be worked on label Mar 23, 2026
@stale stale Bot closed this Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:wontfix This will not be worked on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant