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

[bug] self.info.settings.compiler is not present during validate (2.0 compatibility) #11565

Closed
sobczyk opened this issue Jul 3, 2022 · 4 comments
Milestone

Comments

@sobczyk
Copy link

sobczyk commented Jul 3, 2022

When switching to the info object, compiler is missing.
Either the 2.0 recipe upgrade documentation is missing information that compiler can't be checked, or that part of information is missing

Environment Details (include every applicable attribute)

  • Conan version: 1.50

Steps to reproduce (Include if Applicable)

Switch from self.settings.compiler to self.info.settings.compiler in validate step
good example is the cmake recipe

@czoido czoido self-assigned this Jul 4, 2022
@czoido czoido added this to the 1.51 milestone Jul 4, 2022
@czoido
Copy link
Contributor

czoido commented Jul 4, 2022

Hi @sobczyk,
Yes, looks like in Conan 1 package_id() is executed before validate() so if you delete the compiler it fails when you try to check those values. In Conan 2 it does not fail because among other things the package_id() is executed after the validate().
I'll mark this as look-into so we can check the problem and think of the solution for the migration process.
Thanks for reporting.

@czoido
Copy link
Contributor

czoido commented Jul 5, 2022

Let's open a PR to check what would happen in Conan 1.X if we swap the order of the package_id() and the validate() and see what happens.

@memsharded
Copy link
Member

It seems that it might be possible: #11576, at least tests are not breaking, we need to think further if there could be something not covered by tests.

@czoido czoido removed their assignment Jul 6, 2022
@memsharded
Copy link
Member

This will be solved by #11580, which defines a new validate_build() method, that runs before package_id() removes things, so will use self.settings without problem. Will be released in 1.51, testing and feedback once released would be appreciated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants