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

swap validate-packageid order #11576

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions conans/client/graph/graph_binaries.py
Expand Up @@ -385,12 +385,6 @@ def _compute_package_id(self, node, default_package_id_mode, default_python_requ
if apple_clang_compatible:
conanfile.compatible_packages.append(apple_clang_compatible)

# Once we are done, call package_id() to narrow and change possible values
with conanfile_exception_formatter(str(conanfile), "package_id"):
with conan_v2_property(conanfile, 'cpp_info',
"'self.cpp_info' access in package_id() method is deprecated"):
conanfile.package_id()

if hasattr(conanfile, "validate") and callable(conanfile.validate):
with conanfile_exception_formatter(str(conanfile), "validate"):
try:
Expand All @@ -400,6 +394,12 @@ def _compute_package_id(self, node, default_package_id_mode, default_python_requ
except ConanInvalidConfiguration as e:
conanfile.info.invalid = str(e)

# Once we are done, call package_id() to narrow and change possible values
with conanfile_exception_formatter(str(conanfile), "package_id"):
with conan_v2_property(conanfile, 'cpp_info',
"'self.cpp_info' access in package_id() method is deprecated"):
conanfile.package_id()

info = conanfile.info
node.package_id = info.package_id()

Expand Down
2 changes: 1 addition & 1 deletion conans/model/info.py
Expand Up @@ -433,7 +433,7 @@ def copy(self):
""" Useful for build_id implementation
"""
result = ConanInfo()
result.invalid = self.invalid
result.invalid = None # self.invalid
result.settings = self.settings.copy()
result.options = self.options.copy()
result.requires = self.requires.copy()
Expand Down