Repository: conan-io/conan
Pull request #18152 (2025-04-21 10:08:10)

Remove bogus Apple OS sdks
Changelog: Omit
Docs: Omit

From https://developer.apple.com/documentation/visionos-release-notes/visionos-2_3-release-notes and similar

Closes https://github.com/conan-io/conan/issues/18147

Note that there might be a few other `sdk_versions` that do not actually exist, but removing released settings feels a bit more scary - @memsharded let me know if you think removing those is worth the minimal risk


Patch:
diff --git a/conan/internal/default_settings.py b/conan/internal/default_settings.py
index 0be97dce2..a03c8bc09 100644
--- a/conan/internal/default_settings.py
+++ b/conan/internal/default_settings.py
@@ -26,10 +26,10 @@ os:
                     "18.0", "18.1", "18.2", "18.3", "18.4"]
         sdk: ["iphoneos", "iphonesimulator"]
         sdk_version: [null, "11.3", "11.4", "12.0", "12.1", "12.2", "12.4",
-                        "13.0", "13.1", "13.2", "13.4", "13.5", "13.6", "13.7",
+                        "13.0", "13.1", "13.2", "13.3", "13.4", "13.5", "13.6", "13.7",
                         "14.0", "14.1", "14.2", "14.3", "14.4", "14.5", "15.0", "15.2", "15.4",
                         "15.5", "16.0", "16.1", "16.2", "16.4", "17.0", "17.1", "17.2", "17.4", "17.5",
-                        "18.0", "18.1", "18.2", "18.3", "18.4"]
+                        "18.0", "18.1", "18.2", "18.4"]
     watchOS:
         version: ["4.0", "4.1", "4.2", "4.3", "5.0", "5.1", "5.2", "5.3", "6.0", "6.1", "6.2", "6.3",
                     "7.0", "7.1", "7.2", "7.3", "7.4", "7.5", "7.6",
@@ -39,9 +39,9 @@ os:
                     "11.0", "11.1", "11.2", "11.3", "11.4"]
         sdk: ["watchos", "watchsimulator"]
         sdk_version: [null, "4.3", "5.0", "5.1", "5.2", "5.3", "6.0", "6.1", "6.2",
-                        "7.0", "7.1", "7.2", "7.4", "8.0", "8.0.1", "8.3", "8.5", "9.0", "9.1",
+                        "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.0.1", "8.3", "8.5", "9.0", "9.1",
                         "9.4", "10.0", "10.1", "10.2", "10.4", "10.5",
-                        "11.0", "11.1", "11.2", "11.3", "11.4"]
+                        "11.0", "11.1", "11.2", "11.4"]
     tvOS:
         version: ["11.0", "11.1", "11.2", "11.3", "11.4",
                     "12.0", "12.1", "12.2", "12.3", "12.4",
@@ -53,13 +53,13 @@ os:
                     "18.0", "18.1", "18.2", "18.3", "18.4"]
         sdk: ["appletvos", "appletvsimulator"]
         sdk_version: [null, "11.3", "11.4", "12.0", "12.1", "12.2", "12.4",
-                        "13.0", "13.1", "13.2", "13.4", "14.0", "14.2", "14.3", "14.5", "15.0",
-                        "15.2", "15.4", "16.0", "16.1", "16.4", "17.0", "17.1", "17.2", "17.4", "17.5",
-                        "18.0", "18.1", "18.2", "18.3", "18.4"]
+                        "13.0", "13.2", "13.3", "13.4", "14.0", "14.2", "14.3", "14.4", "14.5", "15.0",
+                        "15.2", "15.4", "15.5", "16.0", "16.1", "16.4", "17.0", "17.1", "17.2", "17.4", "17.5",
+                        "18.0", "18.1", "18.2", "18.4"]
     visionOS:
-        version: ["1.0", "1.1", "1.2", "2.0", "2.1", "2.2", "2.3", "2.4"]
+        version: ["1.0", "1.1", "1.2", "1.3", "2.0", "2.1", "2.2", "2.3", "2.4"]
         sdk: ["xros", "xrsimulator"]
-        sdk_version: [null, "1.0", "1.1", "1.2", "2.0", "2.1", "2.2", "2.3", "2.4"]
+        sdk_version: [null, "1.0", "1.1", "1.2", "1.3", "2.0", "2.1", "2.2", "2.4"]
     Macos:
         version: [null, "10.6", "10.7", "10.8", "10.9", "10.10", "10.11", "10.12", "10.13", "10.14", "10.15",
                     "11.0", "11.1", "11.2", "11.3", "11.4", "11.5", "11.6", "11.7",
@@ -67,9 +67,9 @@ os:
                     "13.0", "13.1", "13.2", "13.3", "13.4", "13.5", "13.6", "13.7",
                     "14.0", "14.1", "14.2", "14.3", "14.4", "14.5", "14.6", "14.7",
                     "15.0", "15.1", "15.2", "15.3", "15.4"]
-        sdk_version: [null, "10.13", "10.14", "10.15", "11.0", "11.1", "11.3", "12.0", "12.1",
-                        "12.3", "13.0", "13.1", "13.3", "14.0", "14.2", "14.4", "14.5",
-                        "15.0", "15.1", "15.2", "15.3", "15.4"]
+        sdk_version: [null, "10.13", "10.14", "10.15", "11.0", "11.1", "11.2", "11.3", "12.0", "12.1",
+                        "12.3", "12.4", "13.0", "13.1", "13.3", "14.0", "14.2", "14.4", "14.5",
+                        "15.0", "15.1", "15.2", "15.4"]
         subsystem:
             null:
             catalyst:
diff --git a/conan/tools/apple/apple.py b/conan/tools/apple/apple.py
index 535464990..e7f76a7b1 100644
--- a/conan/tools/apple/apple.py
+++ b/conan/tools/apple/apple.py
@@ -80,8 +80,8 @@ def apple_min_version_flag(conanfile):
         "watchsimulator": f"-mwatchos-simulator-version-min={os_version}",
         "appletvos": f"-mtvos-version-min={os_version}",
         "appletvsimulator": f"-mtvos-simulator-version-min={os_version}",
-        "xros": f"-target arm64-apple-xros{os_version}",
-        "xrsimulator": f"-target arm64-apple-xros{os_version}-simulator",
+        "xros": f"--target=arm64-apple-xros{os_version}",
+        "xrsimulator": f"--target=arm64-apple-xros{os_version}-simulator",
     }.get(os_sdk, "")
 
 
diff --git a/conans/client/rest_client_local_recipe_index.py b/conans/client/rest_client_local_recipe_index.py
index 3a4e65d1d..a5f896def 100644
--- a/conans/client/rest_client_local_recipe_index.py
+++ b/conans/client/rest_client_local_recipe_index.py
@@ -134,11 +134,6 @@ class RestApiClientLocalRecipesIndex:
 
     def get_recipe_revision_reference(self, ref):
         new_ref = self._export_recipe(ref)
-        if new_ref != ref:
-            ConanOutput().warning(f"A specific revision '{ref.repr_notime()}' was requested, but it "
-                                  "doesn't match the current available revision in source. The "
-                                  "local-recipes-index can't provide a specific revision")
-            raise RecipeNotFoundException(ref)
         return new_ref
 
     def get_package_revision_reference(self, pref):
@@ -162,6 +157,13 @@ class RestApiClientLocalRecipesIndex:
             sys.stderr = original_stderr
             ConanOutput(scope="local-recipes-index").debug(f"Internal export for {ref}:\n"
                                                            f"{textwrap.indent(export_err, '    ')}")
+        if new_ref.user != ref.user or new_ref.channel != ref.channel:
+            raise RecipeNotFoundException(ref)
+        if ref.revision is not None and new_ref.revision != ref.revision:
+            ConanOutput().warning(f"A specific revision '{ref.repr_notime()}' was requested, but it "
+                                  "doesn't match the current available revision in source. The "
+                                  "local-recipes-index can't provide a specific revision")
+            raise RecipeNotFoundException(ref)
         return new_ref
 
     @staticmethod


Test patch:
diff --git a/.github/workflows/win-tests.yml b/.github/workflows/win-tests.yml
index ee3d55f0c..bfc3bcff2 100644
--- a/.github/workflows/win-tests.yml
+++ b/.github/workflows/win-tests.yml
@@ -151,6 +151,7 @@ jobs:
                 gcc
                 autoconf-wrapper
                 automake
+                libtool
 
       - name: Cache CMake and Bazel installations
         id: cache-tools
diff --git a/test/functional/toolchains/gnu/test_v2_autotools_template.py b/test/functional/toolchains/gnu/test_v2_autotools_template.py
index f56d77ce5..0f6c30924 100644
--- a/test/functional/toolchains/gnu/test_v2_autotools_template.py
+++ b/test/functional/toolchains/gnu/test_v2_autotools_template.py
@@ -347,7 +347,7 @@ def test_autotools_fix_shared_libs():
     assert "Bye, bye!" in client.out
 
 
-@pytest.mark.skip(reason="Test too slow, and needs fix to AutotoolsDeps")
+@pytest.mark.skipif(platform.system() != "Windows", reason="Using msys2")
 @pytest.mark.tool("msys2")
 class TestAutotoolsTemplateWindows:
     def test_msys2_autotools_windows(self):
diff --git a/test/functional/toolchains/meson/test_cross_compilation.py b/test/functional/toolchains/meson/test_cross_compilation.py
index 207d5536e..b652af732 100644
--- a/test/functional/toolchains/meson/test_cross_compilation.py
+++ b/test/functional/toolchains/meson/test_cross_compilation.py
@@ -64,6 +64,8 @@ option('STRING_DEFINITION', type : 'string', description : 'a string option')
     ('x86_64', 'iOS', '10.0', 'iphonesimulator'),
     ('armv8' if platform.machine() == "x86_64" else "x86_64", 'Macos', None, None),
     ('armv8' if platform.machine() == "x86_64" else "x86_64", 'Macos', '10.11', None),
+    ('armv8', 'visionOS', '1.0', 'xros'),
+    ('armv8', 'visionOS', '1.0', 'xrsimulator')
 ])
 def test_apple_meson_toolchain_cross_compiling(arch, os_, os_version, os_sdk):
     profile = textwrap.dedent("""
diff --git a/test/integration/remote/test_local_recipes_index.py b/test/integration/remote/test_local_recipes_index.py
index bbff7cebe..eee9bf18d 100644
--- a/test/integration/remote/test_local_recipes_index.py
+++ b/test/integration/remote/test_local_recipes_index.py
@@ -102,6 +102,13 @@ class TestSearchList:
         revs = listjson["local"]["zlib/1.2.11"]["revisions"]
         assert len(revs) == 1 and "6f5c31bb1219e9393743d1fbf2ee1b52" in revs
 
+    def test_list_revisions_notfound(self, c3i_folder):
+        client = TestClient(light=True)
+        client.run(f"remote add local '{c3i_folder}'")
+        client.run("list potato/1.0#* -r=local")
+        # More like remotes than cache
+        assert "ERROR: Recipe not found: 'potato/1.0'"
+
     def test_list_rrevs(self, c3i_folder):
         client = TestClient(light=True)
         client.run(f"remote add local '{c3i_folder}'")
@@ -349,6 +356,41 @@ class TestErrorsUx:
         c.run("install --requires=zlib/1.2.11#rev1", assert_error=True)
         assert "A specific revision 'zlib/1.2.11#rev1' was requested" in c.out
 
+    def test_no_user_channel(self):
+        # https://github.com/conan-io/conan/issues/18142
+        folder = temp_folder()
+        recipes_folder = os.path.join(folder, "recipes")
+        zlib_config = textwrap.dedent("""
+          versions:
+            "0.1":
+              folder: all
+          """)
+        zlib = GenConanfile("zlib")
+        conandata_yml = textwrap.dedent("""\
+          versions:
+            "0.1":
+          """)
+        save_files(recipes_folder, {"zlib/config.yml": zlib_config,
+                                    "zlib/all/conanfile.py": str(zlib),
+                                    "zlib/all/conandata.yml": conandata_yml})
+        c = TestClient()
+        c.run(f"remote add local '{folder}'")
+        c.run("install --requires=zlib/0.1@myuser/mychannel", assert_error=True)
+        assert "ERROR: Package 'zlib/0.1@myuser/mychannel' not resolved" in c.out
+
+        c = TestClient(default_server_user=True)
+        c.save({"conanfile.py": GenConanfile("zlib", "0.1")})
+        c.run("create . --user=myuser --channel=mychannel")
+        c.run("upload * -r=default -c")
+        c.run(f"remote add local '{folder}' --index=0")
+        c.run("install --requires=zlib/0.1@myuser/mychannel")
+        c.assert_listed_require({"zlib/0.1@myuser/mychannel": "Cache"})
+
+        # Force resolving in remotes
+        c.run("remove * -c")
+        c.run("install --requires=zlib/0.1@myuser/mychannel")
+        c.assert_listed_require({"zlib/0.1@myuser/mychannel": "Downloaded (default)"})
+
 
 class TestPythonRequires:
     @pytest.fixture(scope="class")