Filter bundles with preference for the target state#2097
Filter bundles with preference for the target state#2097laeubi merged 1 commit intoeclipse-pde:masterfrom
Conversation
Test Results 771 files 771 suites 53m 13s ⏱️ For more details on these failures, see this check. Results for commit bf752a8. ♻️ This comment has been updated with latest results. |
a50ea59 to
4e22abc
Compare
|
I don'T see the problems with your provided example so "something" seems to be broken in your config, I would recommend to completely delete the runconfig and create one fresh, make sure to only select the testbundle itself |
|
Same result after deleting the launch config and created a new one via "Run As/JUnit Plug-in Test" |
|
The good news is that it let's the test run with a whole of log in the beginning about resolving state. |
Currently it can happen that one bundle (in this particular case org.eclipse.pde.junit.runtime) is not part of the target platform and therefore selected from the running host. This then pull in even more from the host through the DependencyManager collection leading to duplicates all over the place. As long as target and host are equal enough it does not cause any problem as id+version are the same and so are canceled out but if not this leads to multiple version unnecessary included and this is especially a problem for singletons. This now: - collects all items as before - put everything into a new state and performs a resolve operation - during the resolve make sure we filter out providers whenever there is an alternative from the target platform. Fix eclipse-pde#2082
4e22abc to
bf752a8
Compare
It might be that just the validation dialog is broken but with the example here (test.me.zip) and latest SDK I get no error, so I would need another example to see the problem you reported. |
|
Change to run with product e.g. If one imports test.zip PDE decides it should generate launch config this way. When I import your project it decides to use "No application" . It's beyond me what it bases this differente on. |
No problem... I'll merge these and then look what is the difference here... |
|
Since we actually try to reduce and eventually get rid of the ancient Due to the additional In general I would have appreciated, if more time would have been given to other reviewers to bring up for example this suggestion before this is submitted. |
I tried to use the new Resolver API but it does not worked out well so I fear even though the "old" is discouraged the new one is not really an alternative as it lacks some features we use in PDE.
This code actually do it, but without assuming what could possibly be "compatible", also we can't check the launch because it does effectively contains nothing at that point (except the test bundle itself)
We can always change it and I have already considers some alternatives, the original change was weeks in the pipeline and seems still flawed as reported by @akurtakov so we need to at least make some progress as we are approaching M3 in a few weeks. If one would aim for something "simpler" (while I think the problem in general is not simple to solve) we would need to modify the DependencyManager considerably what I like to avoid in this late stage and in the past was a guarantee for a PR to be stalled because of concerns because it is used elsewhere. So current solution is:
|


Currently it can happen that one bundle (in this particular case org.eclipse.pde.junit.runtime) is not part of the target platform and therefore selected from the running host. This then pull in even more from the host through the DependencyManager collection leading to duplicates all over the place.
As long as target and host are equal enough it does not cause any problem as id+version are the same and so are canceled out but if not this leads to multiple version unnecessary included and this is especially a problem for singletons.
This now:
Contributes to #2082
There is just one issue I'm currently investigate that the determination of the EE currently is faulty if one creates a new runconfiguration from scratch. If one edits the run config one more time (e.g. open it and then run) it works because then the right EE is set and found.Fixed that... the general problem remains and is reported here.