eclipse-equinox / p2

Eclipse Public License 2.0
14 stars 40 forks source link

Correctly consider cardinality based on the directives #474

Closed laeubi closed 4 months ago

laeubi commented 6 months ago

Currently the BundlesAction uses either 0 or 1 as the cardinality but actually a requirement can be a multi-cardinality as well.

This adds new dedicated methods to not duplicate the computation and a testcase that ensures all combination are covered and correctly translated.

laeubi commented 6 months ago

cardinality:=multiple is not very common but we still should map this correctly, @tjwatson @merks should this go into RC1 or should we wait for the next release?

merks commented 6 months ago

Can you summarize the impact. I believe it just means that if there is a cardinality:=multiple the requirement will have max=MAX_INT. Otherwise nothing is changed, correct?

laeubi commented 6 months ago

Yes currently it is either 0..1 or 1..1, but it is also possible that it is 0...n and 1...n if you look at the manifest I used for the testcase it should be more clear.

github-actions[bot] commented 6 months ago

Test Results

    9 files  ±0      9 suites  ±0   29m 41s :stopwatch: -36s 2 197 tests +1  2 193 :white_check_mark: +1   4 :zzz: ±0  0 :x: ±0  6 681 runs  +3  6 670 :white_check_mark: +3  11 :zzz: ±0  0 :x: ±0 

Results for commit 2b2c9244. ± Comparison against base commit 4426f86e.

:recycle: This comment has been updated with latest results.

laeubi commented 4 months ago

As no one raised concerns I'll merge this as soon as build completes.