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

version ranges --update test #5336

Merged

Conversation

@memsharded
Copy link
Member

@memsharded memsharded commented Jun 11, 2019

Changelog: Fix: Improve the output to show the remote (or cache) that a version range is resolved to.
Docs: Omit

It also cached the local search result, which might make version ranges a bit faster, and fixed some weird implementation details in the caching of the remote searches.

Close: #5333

@memsharded memsharded added this to the 1.17 milestone Jun 11, 2019
@@ -134,36 +135,42 @@ def resolve(self, require, base_conanref, update, remotes):
"could not be resolved" % (version_range, require, base_conanref))

def _resolve_local(self, search_ref, version_range):
local_found = search_recipes(self._cache, search_ref)
local_found = self._cached_local_found.get(search_ref)
Copy link
Contributor

@lasote lasote Jun 24, 2019

Choose a reason for hiding this comment

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

Is _cached_local_found ever assigned?

Loading

@jgsogo
Copy link
Member

@jgsogo jgsogo commented Jun 24, 2019

From my point of view, the output when having several version ranges can get a bit confusing:

Version ranges solved
    boost/*@lasote/stable resolved in 'default' remote
    Version range '>=1.68.0' required by 'conanfile.txt' resolved to 'boost/1.70.0@lasote/stable'
    zlib/*@lasote/stable resolved in 'default' remote
    Version range '>=1.2.0' required by 'conanfile.txt' resolved to 'zlib/1.2.11@lasote/stable'

I would prefer the "resolved in..." to be added to the existing message:

Version ranges solved
    Version range '>=1.68.0' required by 'conanfile.txt' resolved to 'boost/1.70.0@lasote/stable' in 'default' remote
    Version range '>=1.2.0' required by 'conanfile.txt' resolved to 'zlib/1.2.11@lasote/stable' in 'default' remote

Loading

jgsogo
jgsogo approved these changes Jun 29, 2019
@memsharded
Copy link
Member Author

@memsharded memsharded commented Jun 29, 2019

I have improved the output message, but leaving the "pattern versions found in remote", because that is different to resolution, and the OP question. You can find versions in one remote that later do not satisfy the range.

@lasote, I have also removed the cache for local versions completely, as it turns out it doesn't work, as the installed packages change during the evaluation, and the logic changed, with some broken tests.

Loading

@lasote lasote merged commit 5ad0672 into conan-io:develop Jul 1, 2019
2 checks passed
Loading
@memsharded memsharded deleted the feature/test_update_version_ranges branch Jul 2, 2019
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.

3 participants