-
Notifications
You must be signed in to change notification settings - Fork 991
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
Feature/build compatibles #16871
Feature/build compatibles #16871
Conversation
@czoido @franramirez688 @AbrilRBS This PR contains both the feature + some necessary refactors to support the feature. I have done the refactor in its own PR to simplify the review, please check it first before reviewing this one: #16919 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome! Some comments about user feedback
Co-authored-by: Abril Rincón Blanco <git@rinconblanco.es>
…-io#16876) * allowing ``conan config install-pkg --url`` for initial config * review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would be the behavior if some users define some compatibility.py
for different compiler versions? Some might be ok and might work, like VS, but using a different gcc
version for a dependency build might be challenging, Conan does not configure the environment different for different compiler versions, so it will use the compiler.version=<compatible-one>
as setting, but it will still use the current environment configuration and fail?
@@ -79,6 +70,15 @@ def compute_package_id(node, new_config, config_version): | |||
|
|||
def run_validate_package_id(conanfile): | |||
# IMPORTANT: This validation code must run before calling info.package_id(), to mark "invalid" | |||
if hasattr(conanfile, "validate_build"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the main thing that could accidentally break something.
Previously, the validate_build()
only ran for the main requested configuration. Now it is going to run for the compatible configurations, if there is some config that makes it fail other than ConanInvalidConfiguration, something might break. I think this is unlikely and we can go with this, but not impossible, but we can learn the reasons if it happens to break.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks great!
Co-authored-by: Francisco Ramírez <franchuti688@gmail.com>
Changelog: Feature: Allow building a compatible package still of the current profile one.
Docs: Omit
Lets keep this not documented at the moment, as there is a gap in
conan graph build-order
Close #16148
Close #14291