Drop invalid package providers when adding a permutation#1086
Conversation
Test Results 807 files ±0 807 suites ±0 1h 14m 49s ⏱️ -14s For more details on these failures, see this check. Results for commit 6869c27. ± Comparison against base commit 626f822. ♻️ This comment has been updated with latest results. |
428a351 to
34c0ef9
Compare
|
This now works and the test passes with one less iteration but I have some trouble starting an Eclipse SDK with this change, need to investigate whats going on. |
34c0ef9 to
05f0b4d
Compare
|
I have now found the issue. It is in This can lead to a state where it removes (incorrectly) valid choices from the current permutation that then results in a failure. If I make sure dependents are not reduced if there is only one provider left, everything works like intended and the IDE starts up again. Also it works to just resolve all individual bundles again one by one. I now need to extract some kind of testcase here to show the issue... @tjwatson I must confess I not yet fully understood the logic behind that method, but it feels it might better want to operate on a copy of the candidates here. Also it feels really strange here that permutations are computed (and modify the candidates) as a side-effect of the
So I always would expect two Candidates to be added as a possible permutation, where it removes the provider from the list anywhere while currently it is dropping all providers in front of it for it dependents. Also I would expect this to be the very first step when creating an inital permutation. So before I try to fix/rewrite the stuff maybe you can explain the background of the current approach. |
Currently a certain set of use-constraint violations occur when checking the classpath consistency that can be described in the following way: - There is a package A provided by X and Y - There is a package B provided by Y that uses A - Consumer C imports package A + B - There are now two eligible providers for A and if the resolver chooses for A = X and B = Y - This results in a use-violation because A is reachable through two chains (C->X->Ax, C->B->Y->Ay) This can be avoided by doing an initial scan of all providers that are singletons in the current permutation, have a use constraint on a package that is also provided by this provider, and has more than one candidate, then the only valid on is the provider of the singleton selection.
05f0b4d to
6869c27
Compare
|
This is now part of: |
Currently a certain set of use-constraint violations occur when checking the classpath consistency that can be described in the following way:
This can be avoided by doing an initial scan of all providers that are singletons in the current permutation, have a use constraint on a package that is also provided by this provider, and has more than one candidate, then the only valid on is the provider of the singleton selection.
This currently adds a test-case that shows the situation and currently requires 7 permutations, where it should in the best case only require 1 (the initial one) because there is only one valid choice when these kind of exceptions occurs:
Where the following choices exits:
but the first one is invalid because of
So
aQute.bnd.service.repositoryusesaQute.service.reporter, both packages are provided bybiz.aQute.bndlibso in the case of import only bndlib is a valid choice.