Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: select highest constrained version #83

Merged
merged 4 commits into from
Apr 7, 2022
Merged

Conversation

micprog
Copy link
Member

@micprog micprog commented Apr 7, 2022

When resolving version dependencies, bender will pick the newest version among compatible version numbers instead of the highest acceptable version number. While normally a newer compatible commit will have a higher version number, this may not always be the case.

This fix makes use of sorted Sets to ensure the highest version is picked.

As an example to test, udma_i2c exhibits this behavior when checking out version 1, as it uses v1.0.1 instead of v1.0.3.

Previous behavior may choose the newest commit instead of the highest
version, which may not be intended behavior. This way the highest
compatible version tag is picked.
Copy link
Contributor

@andreaskurth andreaskurth left a comment

Choose a reason for hiding this comment

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

Thanks a lot for this fix! LGTM

@micprog micprog merged commit 03f5635 into master Apr 7, 2022
@micprog micprog deleted the fix_newest_version branch April 7, 2022 17:27
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.

2 participants