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 range resolver with different user/channel #5657

Merged
merged 3 commits into from Aug 26, 2019

Conversation

@lasote
Copy link
Contributor

@lasote lasote commented Aug 22, 2019

Changelog: Bugfix: Using the version ranges mechanism Conan wasn't able to resolve the correct reference if a library with the same name but different user/channel was found in an earlier remote.
Docs: omit

Closes #5649

@lasote lasote added this to the 1.18.2 milestone Aug 22, 2019
@lasote lasote requested review from jgsogo and memsharded Aug 22, 2019
jgsogo
jgsogo approved these changes Aug 22, 2019
Copy link
Member

@jgsogo jgsogo left a comment

You may consider filtering by user/channel before returning from _search_remotes function (for both if-branches) and remove that same filter from _resolve_remote one. But it is ok if you leave it as it is, without that little refactor.

Loading

conans/client/graph/range_resolver.py Outdated Show resolved Hide resolved
Loading
conans/client/graph/range_resolver.py Outdated Show resolved Hide resolved
Loading
search_result = self._remote_manager.search_recipes(remote, pattern, ignorecase=False)
if search_result:
return search_result, remote.name
if not remotes.selected or remote == remotes.selected:
Copy link
Member

@memsharded memsharded Aug 22, 2019

Choose a reason for hiding this comment

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

This might change behavior. If a remote is specified explictly, but the reference is not found there, it will iterate to other remotes?

Loading

Copy link
Member

@jgsogo jgsogo Aug 23, 2019

Choose a reason for hiding this comment

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

Good catch!, No, it will enter on all of them (not remotes.selected), OR only in the selected one (remote == remotes.selected)

Loading

@lasote lasote merged commit c744a40 into conan-io:release/1.18.2 Aug 26, 2019
2 checks passed
Loading
@lasote lasote deleted the fix/user_channel_ranges branch Aug 26, 2019
AKhranovskiy pushed a commit to AKhranovskiy/conan that referenced this issue Sep 2, 2019
* fix ranges with different user and channel

* Refactor

* Remove not needed lines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants