Repository navigation
Conversation
…metersHolder ParametersHolder only defined destructuring operators component1..component5, so generated code destructuring 6+ injected parameters (e.g. from the annotations compiler) fails to compile with: "Destructuring of type 'org.koin.core.parameter.ParametersHolder' requires operator function 'component6()'". Add component6..component10 inline operators mirroring the existing ones, plus destructuring tests. Purely additive, no behavior change for existing code. Signed-off-by: Inf1mum <vadim.lazuk@mail.ru>
Inf1mum
force-pushed
the
fix/2141-parameters-holder-component6
branch
from
November 17, 2026 10:50
1574785 to
b5b5c81
Compare
This branch has not been deployed
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.
Fixes #2141
Problem
ParametersHolderonly defines destructuring operatorscomponent1..component5. Generated code that destructures 6+ injected parameters — e.g. from the annotations compiler for a class with 6@InjectedParamconstructor arguments — fails to build with:ParametersHolderitself already holds any number of values (parametersOf(1, 2, 3, 4, 5, 6)works today); only the destructuring operators stop at 5.Fix
Add
component6..component10inline operators toParametersHolder, mirroring the existingcomponent1..component5(sameelementAt(i, T::class)semantics, sameNoParameterFoundExceptionon out-of-range). Purely additive — no behavior change for existing code.Tests
destructure 6 parameters— the exact reported scenario (6 params)destructure 6 parameters of mixed types— heterogeneous valuesdestructure 10 parameters— upper bound of the new operators:core:koin-core:jvmTest --tests org.koin.core.ParametersHolderTest: 23 tests, 0 failures, 0 errors (includes the 20 pre-existing tests).Signed-off-by: Inf1mum vadim.lazuk@mail.ru