Skip to content

Conversation

@chrisrueger
Copy link
Contributor

Closes #6526

this fixes the problem that in a RunResultion which suggested the same bundle but in different versions only one bundle (the highest) was kept. Now both suggestions are kept.

The problem was that Parameters.toParameter() used parameters.put() instead of parameters.add(). .put() removes duplicate keys, .add() keeps duplicates by using the duplicate markers.

@chrisrueger chrisrueger marked this pull request as ready for review March 24, 2025 23:26
@chrisrueger chrisrueger force-pushed the 6526-fix-resolution-removes-duplicates branch from a892536 to 0f97170 Compare March 25, 2025 06:47
@chrisrueger
Copy link
Contributor Author

@kriegfrj @pkriens Please have a look at the fix. The problem was basically that HeaderClause.toParameters() removed duplicates, because it used .put() instead of .add().

I would like to get it into master / snapshot, to get some more real word testing.

@pkriens
Copy link
Member

pkriens commented Mar 25, 2025

i am ok with this

this fixes the problem that in a RunResultion which suggested the same bundle but in different versions only one bundle (the highest) was kept. Now both suggestions are kept.

The problem was that Parameters.toParameter() used parameters.put() instead of parameters.add(). .put() removes duplicate keys, .add() keeps duplicates by using the duplicate markers.

Signed-off-by: Christoph Rueger <[email protected]>
@chrisrueger chrisrueger force-pushed the 6526-fix-resolution-removes-duplicates branch from 0f97170 to 83a3854 Compare March 25, 2025 09:18
Copy link
Contributor

@kriegfrj kriegfrj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'm OK to give this a go. We're likely to find any potential bugs quicker "in the wild"

@chrisrueger chrisrueger merged commit 63fe3b0 into bndtools:master Mar 25, 2025
9 checks passed
chrisrueger added a commit to chrisrueger/bnd that referenced this pull request Mar 28, 2025
based on suggestion in bndtools#6537 (comment) etc

Signed-off-by: Christoph Rueger <[email protected]>
chrisrueger added a commit that referenced this pull request Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[resolver] Bundle version being removed from resolution saved to .bndrun

3 participants