Skip to content

Commit

Permalink
Removed conan migration compatibility warning (#15174)
Browse files Browse the repository at this point in the history
removed warning and related test
  • Loading branch information
juansblanco authored Nov 25, 2023
1 parent dde76f6 commit 65ec31c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
10 changes: 0 additions & 10 deletions conan/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,16 +191,6 @@ def _conan2_migrate_recipe_msg(exception):
"If it is your recipe, check if it is updated to 2.0\n" \
"*********************************************************\n"
ConanOutput().writeln(error, fg=Color.BRIGHT_MAGENTA)
result = re.search(r"(.*): Error in build\(\) method, line", message)
if result:
pkg = result.group(1)
error = "*********************************************************\n" \
f"Recipe '{pkg}' cannot build its binary\n" \
f"It is possible that this recipe is not Conan 2.0 ready\n" \
"If the recipe comes from ConanCenter, report it at https://github.com/conan-io/conan-center-index/issues\n" \
"If it is your recipe, check if it is updated to 2.0\n" \
"*********************************************************\n"
ConanOutput().writeln(error, fg=Color.BRIGHT_MAGENTA)

@staticmethod
def exception_exit_error(exception):
Expand Down
17 changes: 0 additions & 17 deletions conans/test/integration/conan_v2/test_legacy_cpp_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,20 +65,3 @@ class Pkg(ConanFile):
assert "Recipe 'pkg/1.0' seems broken." in c.out
assert "It is possible that this recipe is not Conan 2.0 ready" in c.out

def test_legacy_build(self):
c = TestClient()
conanfile = textwrap.dedent("""
from conan import ConanFile
class Pkg(ConanFile):
name = "pkg"
version = "1.0"
def build(self):
raise Exception("Build broken")
""")
c.save({"pkg/conanfile.py": conanfile,
"app/conanfile.py": GenConanfile("app", "1.0").with_requires("pkg/1.0")})
c.run("export pkg")
c.run("install app --build=missing", assert_error=True)
assert "Recipe 'pkg/1.0' cannot build its binary" in c.out
assert "It is possible that this recipe is not Conan 2.0 ready" in c.out

0 comments on commit 65ec31c

Please sign in to comment.