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
[bug] _/_ doesn't work the same as usual user/channel #7846
Comments
Hi @alex-700 Thanks for reporting this. Just to clarify, the The correct code is Does the same unit-test fails if you change that? This could be a regression, lets have a look, if such, it should be fixed asap in 1.30.1 |
Thanks for the quick response. Yeah, I know about No, the same unit-test doesn't fail. This test shows the situation when we need to resolve dependency from CCI, but conan-server get the query |
This is weird. I am doing a variation of your test, removing the diff --git a/conans/test/unittests/client/graph/version_ranges_graph_test.py b/conans/test/unittests/client/graph/version_ranges_graph_test.py
index 210a5d8c0..653c86c2d 100644
--- a/conans/test/unittests/client/graph/version_ranges_graph_test.py
+++ b/conans/test/unittests/client/graph/version_ranges_graph_test.py
@@ -45,6 +45,8 @@ class VersionRangesTest(GraphTest):
say_content = GenConanfile().with_name("Say").with_version(v)
say_ref = ConanFileReference.loads("Say/%s@myuser/testing" % v)
self.retriever.save_recipe(say_ref, say_content)
+ say_ref = ConanFileReference.loads("Say/%s" % v)
+ self.retriever.save_recipe(say_ref, say_content)
def build_graph(self, content, update=False):
self.loader._cached_conanfile_classes = {}
@@ -118,6 +120,40 @@ class VersionRangesTest(GraphTest):
say_ref = ConanFileReference.loads("Say/%s@myuser/testing" % solution)
self.assertEqual(_clear_revs(conanfile.requires), Requirements(str(say_ref)))
+ def test_remote_basic_without_userchannel(self):
+ self.resolver._local_search = None
+ remote_packages = []
+ for v in ["0.1", "0.2", "0.3", "1.1", "1.1.2", "1.2.1", "2.1", "2.2.1"]:
+ say_ref = ConanFileReference.loads("Say/[%s]" % v)
+ remote_packages.append(say_ref)
+ self.remotes.add("myremote", "myurl")
+ self.remote_manager.packages = remote_packages
+ for expr, solution in [(">0.0", "2.2.1"),
+ (">0.1,<1", "0.3"),
+ (">0.1,<1||2.1", "2.1"),
+ ("", "2.2.1"),
+ ("~0", "0.3"),
+ ("~=1", "1.2.1"),
+ ("~1.1", "1.1.2"),
+ ("~=2", "2.2.1"),
+ ("~=2.1", "2.1"),
+ ]:
+ req = ConanFileReference.loads("Say/[%s]" % expr)
+ deps_graph = self.build_graph(GenConanfile("Hello", "1.2").with_require(req),
+ update=True)
+ self.assertEqual(self.remote_manager.count, {'Say/*': 1})
+ self.assertEqual(2, len(deps_graph.nodes))
+ hello = _get_nodes(deps_graph, "Hello")[0]
+ say = _get_nodes(deps_graph, "Say")[0]
+ self.assertEqual(_get_edges(deps_graph), {Edge(hello, say)})
+
+ self.assertEqual(hello.ref, None)
+ conanfile = hello.conanfile
+ self.assertEqual(conanfile.version, "1.2")
+ self.assertEqual(conanfile.name, "Hello")
+ say_ref = ConanFileReference.loads("Say/%s@" % solution)
+ self.assertEqual(_clear_revs(conanfile.requires), Requirements(str(say_ref)))
+
def test_remote_optimized(self):
self.resolver._local_search = None
remote_packages = [] I am going to try an integration test instead. |
Reproduced, trying to come up with a fix |
Fixing regression in #7847, to be released asap in Conan 1.30.1 |
#7847 merged. |
packagename/version@_/_
is not the same aspackagename/version
, because the latter can return alsopackagename/version@someuser/somechannel
and client side filtration was deleted in the PR mentioned above.The text was updated successfully, but these errors were encountered: